summaryrefslogtreecommitdiff
path: root/cleopatre/devkit/mt7601udrv/include
diff options
context:
space:
mode:
authorFisher Cheng2013-05-24 16:54:08 +0800
committerJulien Lacour2013-10-01 12:12:48 +0200
commit8c1eb022607c0aba81d93b961abbfb47a2dcc325 (patch)
tree13b1cd55172e93b3d1e5baa7141ba259fd71b0af /cleopatre/devkit/mt7601udrv/include
parent9e4d9d72dcac9686f1b4720e46e3bb88f6375a1e (diff)
cleo/devkit: add MTK MT7601U drv source code, refs #4011
- Enable Wireless LAN and Wireless extension in linux26.config
Diffstat (limited to 'cleopatre/devkit/mt7601udrv/include')
-rw-r--r--cleopatre/devkit/mt7601udrv/include/action.h54
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ags.h102
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap.h454
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_apcli.h275
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_autoChSel.h76
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_autoChSel_cmm.h61
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_cfg.h167
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_diversity.h142
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_ids.h76
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_mbss.h86
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ap_wds.h220
-rw-r--r--cleopatre/devkit/mt7601udrv/include/br_ftph.h81
-rw-r--r--cleopatre/devkit/mt7601udrv/include/cfg80211.h78
-rw-r--r--cleopatre/devkit/mt7601udrv/include/cfg80211extr.h201
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chip/chip_id.h73
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chip/mt7601.h268
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chip/rt28xx.h39
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chip/rt3290.h114
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chip/rt6590.h137
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chip/rtmp_phy.h693
-rw-r--r--cleopatre/devkit/mt7601udrv/include/chlist.h150
-rw-r--r--cleopatre/devkit/mt7601udrv/include/client_wds.h59
-rw-r--r--cleopatre/devkit/mt7601udrv/include/client_wds_cmm.h46
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_aes.h176
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_arc4.h57
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_biginteger.h134
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_dh.h65
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_hmac.h68
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_md5.h63
-rw-r--r--cleopatre/devkit/mt7601udrv/include/crypt_sha2.h92
-rw-r--r--cleopatre/devkit/mt7601udrv/include/cs.h172
-rw-r--r--cleopatre/devkit/mt7601udrv/include/dfs.h571
-rw-r--r--cleopatre/devkit/mt7601udrv/include/dot11ac_vht.h479
-rw-r--r--cleopatre/devkit/mt7601udrv/include/dot11i_wpa.h291
-rw-r--r--cleopatre/devkit/mt7601udrv/include/drs_extr.h326
-rw-r--r--cleopatre/devkit/mt7601udrv/include/eeprom.h321
-rw-r--r--cleopatre/devkit/mt7601udrv/include/firmware.h2396
-rw-r--r--cleopatre/devkit/mt7601udrv/include/frq_cal.h107
-rw-r--r--cleopatre/devkit/mt7601udrv/include/iface/iface_util.h69
-rw-r--r--cleopatre/devkit/mt7601udrv/include/iface/rtmp_reg_pcirbs.h384
-rw-r--r--cleopatre/devkit/mt7601udrv/include/iface/rtmp_usb.h89
-rw-r--r--cleopatre/devkit/mt7601udrv/include/igmp_snoop.h155
-rw-r--r--cleopatre/devkit/mt7601udrv/include/ipv6.h205
-rw-r--r--cleopatre/devkit/mt7601udrv/include/link_list.h182
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/fce.h70
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/mac_pci.h405
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/mac_usb.h490
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac.h782
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pbf.h139
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pci.h368
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_rxwi.h117
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_txwi.h249
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_usb.h144
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac.h168
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pbf.h104
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pci.h270
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rf_ctrl.h92
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rxwi.h147
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_txwi.h143
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_usb.h70
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/pbf.h93
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/rf_ctrl.h146
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mac_ral/rtmp_mac.h2379
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mat.h208
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mcu/MT7601_firmware.h2844
-rw-r--r--cleopatre/devkit/mt7601udrv/include/misc.h32
-rw-r--r--cleopatre/devkit/mt7601udrv/include/misc_cmm.h32
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mlme.h1515
-rw-r--r--cleopatre/devkit/mt7601udrv/include/mlme_sys.h9
-rw-r--r--cleopatre/devkit/mt7601udrv/include/netif_block.h31
-rw-r--r--cleopatre/devkit/mt7601udrv/include/oid.h1320
-rw-r--r--cleopatre/devkit/mt7601udrv/include/os/rt_drv.h1061
-rw-r--r--cleopatre/devkit/mt7601udrv/include/os/rt_linux.h1575
-rw-r--r--cleopatre/devkit/mt7601udrv/include/os/rt_linux_cmm.h412
-rw-r--r--cleopatre/devkit/mt7601udrv/include/os/rt_os.h83
-rw-r--r--cleopatre/devkit/mt7601udrv/include/phy/rlt_phy.h275
-rw-r--r--cleopatre/devkit/mt7601udrv/include/radar.h89
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rt_config.h211
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rt_os_net.h583
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rt_os_util.h1003
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rt_txbf.h215
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp.h9018
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_M51.h53
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_and.h137
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_chip.h1095
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_cmd.h683
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_comm.h502
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_def.h1948
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_dot11.h98
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_iface.h57
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_mcu.h90
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_os.h135
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_osabl.h65
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_timer.h182
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtmp_type.h192
-rw-r--r--cleopatre/devkit/mt7601udrv/include/rtusb_io.h195
-rw-r--r--cleopatre/devkit/mt7601udrv/include/spectrum.h215
-rw-r--r--cleopatre/devkit/mt7601udrv/include/spectrum_def.h249
-rw-r--r--cleopatre/devkit/mt7601udrv/include/sta_cfg.h72
-rw-r--r--cleopatre/devkit/mt7601udrv/include/uapsd.h725
-rw-r--r--cleopatre/devkit/mt7601udrv/include/vht.h28
-rw-r--r--cleopatre/devkit/mt7601udrv/include/video.h12
-rw-r--r--cleopatre/devkit/mt7601udrv/include/vr_ikans.h59
-rw-r--r--cleopatre/devkit/mt7601udrv/include/vrut_ubm.h42
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wapi.h183
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wapi_def.h179
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wapi_sms4.h12
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wfd.h149
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wfd_cmm.h293
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wpa.h506
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wpa_cmm.h211
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wsc.h820
-rw-r--r--cleopatre/devkit/mt7601udrv/include/wsc_tlv.h280
113 files changed, 46413 insertions, 0 deletions
diff --git a/cleopatre/devkit/mt7601udrv/include/action.h b/cleopatre/devkit/mt7601udrv/include/action.h
new file mode 100644
index 0000000000..4922e7419f
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/action.h
@@ -0,0 +1,54 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ aironet.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+ Paul Lin 04-06-15 Initial
+*/
+
+#ifndef __ACTION_H__
+#define __ACTION_H__
+
+typedef struct GNU_PACKED __HT_INFO_OCTET {
+#ifdef RT_BIG_ENDIAN
+ UCHAR Reserved:5;
+ UCHAR STA_Channel_Width:1;
+ UCHAR Forty_MHz_Intolerant:1;
+ UCHAR Request:1;
+#else
+ UCHAR Request:1;
+ UCHAR Forty_MHz_Intolerant:1;
+ UCHAR STA_Channel_Width:1;
+ UCHAR Reserved:5;
+#endif
+} HT_INFORMATION_OCTET;
+
+typedef struct GNU_PACKED __FRAME_HT_INFO {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ HT_INFORMATION_OCTET HT_Info;
+} FRAME_HT_INFO, *PFRAME_HT_INFO;
+
+#endif /* __ACTION_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/ags.h b/cleopatre/devkit/mt7601udrv/include/ags.h
new file mode 100644
index 0000000000..0840400be6
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ags.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All AGS (Adaptive Group Switching) Related Structure & Definition
+
+***************************************************************************/
+
+#ifndef __AGS_H__
+#define __AGS_H__
+
+
+extern UCHAR AGS1x1HTRateTable[];
+extern UCHAR AGS2x2HTRateTable[];
+extern UCHAR AGS3x3HTRateTable[];
+#ifdef DOT11_VHT_AC
+extern UCHAR Ags1x1VhtRateTable[];
+extern UCHAR Ags2x2VhtRateTable[];
+#endif /* DOT11_VHT_AC */
+
+#define AGS_TX_QUALITY_WORST_BOUND 8
+#define AGS_QUICK_RA_TIME_INTERVAL 50 /* 50ms */
+
+/* The size, in bytes, of an AGS entry in the rate switch table */
+#define SIZE_OF_AGS_RATE_TABLE_ENTRY 9
+
+typedef struct _RTMP_RA_AGS_TB {
+ UCHAR ItemNo;
+
+ UCHAR STBC:1;
+ UCHAR ShortGI:1;
+ UCHAR BW:2;
+ UCHAR Mode:3;
+ UCHAR Rsv1:1;
+
+ UCHAR Nss:2; // NSS_XXX (VHT only)
+ UCHAR rsv2:6; // Reserved
+
+ UCHAR CurrMCS;
+ UCHAR TrainUp;
+ UCHAR TrainDown;
+ UCHAR downMcs;
+ UCHAR upMcs3;
+ UCHAR upMcs2;
+ UCHAR upMcs1;
+}RTMP_RA_AGS_TB;
+
+
+/* AGS control */
+typedef struct _AGS_CONTROL {
+ UCHAR MCSGroup; /* The MCS group under testing */
+ UCHAR lastRateIdx;
+} AGS_CONTROL,*PAGS_CONTROL;
+
+
+/* The statistics information for AGS */
+typedef struct _AGS_STATISTICS_INFO {
+ CHAR RSSI;
+ ULONG TxErrorRatio;
+ ULONG AccuTxTotalCnt;
+ ULONG TxTotalCnt;
+ ULONG TxSuccess;
+ ULONG TxRetransmit;
+ ULONG TxFailCount;
+} AGS_STATISTICS_INFO, *PAGS_STATISTICS_INFO;
+
+
+/* Support AGS (Adaptive Group Switching) */
+#define SUPPORT_AGS(__pAd) ((__pAd)->rateAlg == RATE_ALG_AGS)
+
+#ifdef DOT11_VHT_AC
+#define AGS_IS_USING(__pAd, __pRateTable) \
+ (SUPPORT_AGS(__pAd) && \
+ ((__pRateTable == AGS1x1HTRateTable) ||\
+ (__pRateTable == AGS2x2HTRateTable) ||\
+ (__pRateTable == AGS3x3HTRateTable) ||\
+ (__pRateTable == Ags1x1VhtRateTable) ||\
+ (__pRateTable == Ags2x2VhtRateTable)))
+#else
+#define AGS_IS_USING(__pAd, __pRateTable) \
+ (SUPPORT_AGS(__pAd) && \
+ ((__pRateTable == AGS1x1HTRateTable) || \
+ (__pRateTable == AGS2x2HTRateTable) || \
+ (__pRateTable == AGS3x3HTRateTable)))
+#endif /* DOT11_VHT_AC */
+
+#endif /* __AGS_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap.h b/cleopatre/devkit/mt7601udrv/include/ap.h
new file mode 100644
index 0000000000..22c122d238
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap.h
@@ -0,0 +1,454 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ap.h
+
+ Abstract:
+ Miniport generic portion header file
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Paul Lin 08-01-2002 created
+ James Tan 09-06-2002 modified (Revise NTCRegTable)
+ John Chang 12-22-2004 modified for RT2561/2661. merge with STA driver
+*/
+#ifndef __AP_H__
+#define __AP_H__
+
+
+
+
+/* ============================================================= */
+/* Common definition */
+/* ============================================================= */
+#define MBSS_VLAN_INFO_GET( \
+ __pAd, __VLAN_VID, __VLAN_Priority, __FromWhichBSSID) \
+{ \
+ if ((__FromWhichBSSID < __pAd->ApCfg.BssidNum) && \
+ (__FromWhichBSSID < HW_BEACON_MAX_NUM) && \
+ (__pAd->ApCfg.MBSSID[__FromWhichBSSID].VLAN_VID != 0)) \
+ { \
+ __VLAN_VID = __pAd->ApCfg.MBSSID[__FromWhichBSSID].VLAN_VID; \
+ __VLAN_Priority = __pAd->ApCfg.MBSSID[__FromWhichBSSID].VLAN_Priority; \
+ } \
+}
+
+/* ============================================================= */
+/* Function Prototypes */
+/* ============================================================= */
+
+/* ap_data.c */
+
+BOOLEAN APBridgeToWirelessSta(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pHeader,
+ IN UINT HdrLen,
+ IN PUCHAR pData,
+ IN UINT DataLen,
+ IN ULONG fromwdsidx);
+
+VOID RTMP_BASetup(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pMacEntry,
+ IN UINT8 UserPriority);
+
+VOID APSendPackets(
+ IN NDIS_HANDLE MiniportAdapterContext,
+ IN PPNDIS_PACKET ppPacketArray,
+ IN UINT NumberOfPackets);
+
+NDIS_STATUS APSendPacket(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket);
+
+NDIS_STATUS APInsertPsQueue(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN MAC_TABLE_ENTRY *pMacEntry,
+ IN UCHAR QueIdx);
+
+NDIS_STATUS APHardTransmit(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN UCHAR QueIdx);
+
+VOID APRxEAPOLFrameIndicate(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+NDIS_STATUS APCheckRxError(
+ IN RTMP_ADAPTER *pAd,
+ IN RXINFO_STRUC *pRxInfo,
+ IN UCHAR Wcid);
+
+BOOLEAN APCheckClass2Class3Error(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Wcid,
+ IN PHEADER_802_11 pHeader);
+
+VOID APHandleRxPsPoll(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN USHORT Aid,
+ IN BOOLEAN isActive);
+
+VOID RTMPDescriptorEndianChange(
+ IN PUCHAR pData,
+ IN ULONG DescriptorType);
+
+VOID RTMPFrameEndianChange(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pData,
+ IN ULONG Dir,
+ IN BOOLEAN FromRxDoneInt);
+
+/* ap_assoc.c */
+
+VOID APAssocStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+
+VOID MbssKickOutStas(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN USHORT Reason);
+
+VOID APMlmeKickOutSta(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pStaAddr,
+ IN UCHAR Wcid,
+ IN USHORT Reason);
+
+
+
+VOID APCls3errAction(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Wcid,
+ IN PHEADER_802_11 pHeader);
+
+/*
+VOID RTMPAddClientSec(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BssIdx,
+ IN UCHAR KeyIdx,
+ IN UCHAR CipherAlg,
+ IN PUCHAR pKey,
+ IN PUCHAR pTxMic,
+ IN PUCHAR pRxMic,
+ IN MAC_TABLE_ENTRY *pEntry);
+*/
+
+/* ap_auth.c */
+
+void APAuthStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID APCls2errAction(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Wcid,
+ IN PHEADER_802_11 pHeader);
+
+/* ap_connect.c */
+
+#ifdef CONFIG_AP_SUPPORT
+BOOLEAN BeaconTransmitRequired(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN MULTISSID_STRUCT *pMbss);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID APMakeBssBeacon(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx);
+
+VOID APUpdateBeaconFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx);
+
+VOID APMakeAllBssBeacon(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APUpdateAllBeaconFrame(
+ IN PRTMP_ADAPTER pAd);
+
+
+/* ap_sync.c */
+
+VOID APSyncStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID APScanTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID APInvalidStateWhenScan(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APScanTimeoutAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APPeerProbeReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APPeerBeaconAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APMlmeScanReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APPeerBeaconAtScanAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APScanCnclAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID ApSiteSurvey(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_802_11_SSID pSsid,
+ IN UCHAR ScanType,
+ IN BOOLEAN ChannelSel);
+
+VOID SupportRate(
+ IN PUCHAR SupRate,
+ IN UCHAR SupRateLen,
+ IN PUCHAR ExtRate,
+ IN UCHAR ExtRateLen,
+ OUT PUCHAR *Rates,
+ OUT PUCHAR RatesLen,
+ OUT PUCHAR pMaxSupportRate);
+
+
+BOOLEAN ApScanRunning(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef DOT11N_DRAFT3
+VOID APOverlappingBSSScan(
+ IN RTMP_ADAPTER *pAd);
+
+INT GetBssCoexEffectedChRange(
+ IN RTMP_ADAPTER *pAd,
+ IN BSS_COEX_CH_RANGE *pCoexChRange);
+
+#endif /* DOT11N_DRAFT3 */
+
+/* ap_wpa.c */
+VOID WpaStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+/* ap_mlme.c */
+VOID APMlmePeriodicExec(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN APMsgTypeSubst(
+ IN PRTMP_ADAPTER pAd,
+ IN PFRAME_802_11 pFrame,
+ OUT INT *Machine,
+ OUT INT *MsgType);
+
+VOID APQuickResponeForRateUpExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+#ifdef RTMP_MAC_USB
+VOID BeaconUpdateExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+#endif /* RTMP_MAC_USB */
+
+VOID RTMPSetPiggyBack(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bPiggyBack);
+
+VOID APAsicEvaluateRxAnt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APAsicRxAntEvalTimeout(
+ IN PRTMP_ADAPTER pAd);
+
+/* ap.c */
+NDIS_STATUS APInitialize(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APShutdown(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APStartUp(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APStop(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APCleanupPsQueue(
+ IN PRTMP_ADAPTER pAd,
+ IN PQUEUE_HEADER pQueue);
+
+
+VOID MacTableMaintenance(
+ IN PRTMP_ADAPTER pAd);
+
+UINT32 MacTableAssocStaNumGet(
+ IN PRTMP_ADAPTER pAd);
+
+MAC_TABLE_ENTRY *APSsPsInquiry(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ OUT SST *Sst,
+ OUT USHORT *Aid,
+ OUT UCHAR *PsMode,
+ OUT UCHAR *Rate);
+
+BOOLEAN APPsIndicate(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN ULONG Wcid,
+ IN UCHAR Psm);
+
+#ifdef SYSTEM_LOG_SUPPORT
+VOID ApLogEvent(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN USHORT Event);
+#else
+#define ApLogEvent(_pAd, _pAddr, _Event)
+#endif /* SYSTEM_LOG_SUPPORT */
+
+#ifdef DOT11_N_SUPPORT
+VOID APUpdateOperationMode(
+ IN PRTMP_ADAPTER pAd);
+#endif /* DOT11_N_SUPPORT */
+
+VOID APUpdateCapabilityAndErpIe(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN ApCheckAccessControlList(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN UCHAR Apidx);
+
+VOID ApUpdateAccessControlList(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Apidx);
+
+VOID ApEnqueueNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN UCHAR TxRate,
+ IN UCHAR PID,
+ IN UCHAR apidx,
+ IN BOOLEAN bQosNull,
+ IN BOOLEAN bEOSP,
+ IN UCHAR OldUP);
+
+/* ap_sanity.c */
+
+
+BOOLEAN PeerAssocReqCmmSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN isRessoc,
+ IN VOID *Msg,
+ IN INT MsgLen,
+ IN IE_LISTS *ie_lists);
+
+
+BOOLEAN PeerDisassocReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2,
+ OUT UINT16 *SeqNum,
+ OUT USHORT *Reason);
+
+BOOLEAN PeerDeauthReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2,
+ OUT UINT16 *SeqNum,
+ OUT USHORT *Reason);
+
+BOOLEAN APPeerAuthSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr1,
+ OUT PUCHAR pAddr2,
+ OUT USHORT *Alg,
+ OUT USHORT *Seq,
+ OUT USHORT *Status,
+ OUT CHAR *ChlgText
+ );
+
+
+#ifdef DOT1X_SUPPORT
+/* ap_cfg.h */
+INT Set_OwnIPAddr_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_EAPIfName_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PreAuthIfName_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+/* Define in ap.c */
+BOOLEAN DOT1X_InternalCmdAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UINT8 cmd);
+
+BOOLEAN DOT1X_EapTriggerAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+#endif /* DOT1X_SUPPORT */
+#endif /* __AP_H__ */
+
+VOID AP_E2PROM_IOCTL_PostCtrl(
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN PSTRING msg);
+
+VOID IAPP_L2_UpdatePostCtrl(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT8 *mac_p,
+ IN INT bssid);
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_apcli.h b/cleopatre/devkit/mt7601udrv/include/ap_apcli.h
new file mode 100644
index 0000000000..9874a86a4f
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_apcli.h
@@ -0,0 +1,275 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ap_apcli.h
+
+ Abstract:
+ Support AP-Client function.
+
+ Revision History:
+ Who When What
+ -------------- ---------- ----------------------------------------------
+ Shiang, Fonchi 02-13-2007 created
+*/
+
+#ifndef _AP_APCLI_H_
+#define _AP_APCLI_H_
+
+#ifdef APCLI_SUPPORT
+
+#include "rtmp.h"
+
+#define AUTH_TIMEOUT 300 /* unit: msec */
+#define ASSOC_TIMEOUT 300 /* unit: msec */
+/*#define JOIN_TIMEOUT 2000 // unit: msec // not used in Ap-client mode, remove it */
+#define PROBE_TIMEOUT 1000 /* unit: msec */
+
+#define APCLI_ROOT_BSSID_GET(pAd, wcid) ((pAd)->MacTab.Content[(wcid)].Addr)
+
+/* sanity check for apidx */
+#define APCLI_MR_APIDX_SANITY_CHECK(idx) \
+{ \
+ if ((idx) >= MAX_APCLI_NUM) \
+ { \
+ (idx) = 0; \
+ DBGPRINT(RT_DEBUG_ERROR, ("%s> Error! apcli-idx > MAX_APCLI_NUM!\n", __FUNCTION__)); \
+ } \
+}
+
+typedef struct _APCLI_MLME_JOIN_REQ_STRUCT {
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR SsidLen;
+ UCHAR Ssid[MAX_LEN_OF_SSID];
+} APCLI_MLME_JOIN_REQ_STRUCT;
+
+typedef struct _STA_CTRL_JOIN_REQ_STRUCT {
+ USHORT Status;
+} APCLI_CTRL_MSG_STRUCT, *PSTA_CTRL_MSG_STRUCT;
+
+BOOLEAN isValidApCliIf(
+ SHORT ifIndex);
+
+/* */
+/* Private routines in apcli_ctrl.c */
+/* */
+VOID ApCliCtrlStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+/* */
+/* Private routines in apcli_sync.c */
+/* */
+VOID ApCliSyncStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+/* */
+/* Private routines in apcli_auth.c */
+/* */
+VOID ApCliAuthStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+/* */
+/* Private routines in apcli_assoc.c */
+/* */
+VOID ApCliAssocStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+MAC_TABLE_ENTRY *ApCliTableLookUpByWcid(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR wcid,
+ IN PUCHAR pAddrs);
+
+
+BOOLEAN ApCliAllowToSendPacket(
+ IN RTMP_ADAPTER *pAd,
+ IN PNDIS_PACKET pPacket,
+ OUT UCHAR *pWcid);
+
+BOOLEAN ApCliValidateRSNIE(
+ IN PRTMP_ADAPTER pAd,
+ IN PEID_STRUCT pEid_ptr,
+ IN USHORT eid_len,
+ IN USHORT idx);
+
+
+VOID ApCli_Remove(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RT28xx_ApCli_Close(
+ IN PRTMP_ADAPTER pAd);
+
+
+
+INT ApCliIfLookUp(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr);
+
+
+INT ApCli_VirtualIF_PacketSend(
+ IN PNDIS_PACKET skb_p,
+ IN PNET_DEV dev_p);
+
+INT ApCli_VirtualIF_Ioctl(
+ IN PNET_DEV dev_p,
+ IN OUT VOID *rq_p,
+ IN INT cmd);
+
+
+VOID ApCliMgtMacHeaderInit(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT PHEADER_802_11 pHdr80211,
+ IN UCHAR SubType,
+ IN UCHAR ToDs,
+ IN PUCHAR pDA,
+ IN PUCHAR pBssid,
+ IN USHORT ifIndex);
+
+#ifdef DOT11_N_SUPPORT
+BOOLEAN ApCliCheckHt(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT IfIndex,
+ IN OUT HT_CAPABILITY_IE *pHtCapability,
+ IN OUT ADD_HT_INFO_IE *pAddHtInfo);
+#endif /* DOT11_N_SUPPORT */
+
+BOOLEAN ApCliLinkUp(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR ifIndex);
+
+VOID ApCliLinkDown(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR ifIndex);
+
+VOID ApCliIfUp(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ApCliIfDown(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ApCliIfMonitor(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN ApCliMsgTypeSubst(
+ IN PRTMP_ADAPTER pAd,
+ IN PFRAME_802_11 pFrame,
+ OUT INT *Machine,
+ OUT INT *MsgType);
+
+BOOLEAN preCheckMsgTypeSubset(
+ IN PRTMP_ADAPTER pAd,
+ IN PFRAME_802_11 pFrame,
+ OUT INT *Machine,
+ OUT INT *MsgType);
+
+BOOLEAN ApCliPeerAssocRspSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *pMsg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2,
+ OUT USHORT *pCapabilityInfo,
+ OUT USHORT *pStatus,
+ OUT USHORT *pAid,
+ OUT UCHAR SupRate[],
+ OUT UCHAR *pSupRateLen,
+ OUT UCHAR ExtRate[],
+ OUT UCHAR *pExtRateLen,
+ OUT HT_CAPABILITY_IE *pHtCapability,
+ OUT ADD_HT_INFO_IE *pAddHtInfo, /* AP might use this additional ht info IE */
+ OUT UCHAR *pHtCapabilityLen,
+ OUT UCHAR *pAddHtInfoLen,
+ OUT UCHAR *pNewExtChannelOffset,
+ OUT PEDCA_PARM pEdcaParm,
+ OUT UCHAR *pCkipFlag);
+
+VOID ApCliPeerPairMsg1Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID ApCliPeerPairMsg3Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID ApCliPeerGroupMsg1Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+BOOLEAN ApCliCheckRSNIE(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pData,
+ IN UCHAR DataLen,
+ IN MAC_TABLE_ENTRY *pEntry,
+ OUT UCHAR *Offset);
+
+BOOLEAN ApCliParseKeyData(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pKeyData,
+ IN UCHAR KeyDataLen,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR IfIdx,
+ IN UCHAR bPairewise);
+
+BOOLEAN ApCliHandleRxBroadcastFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR FromWhichBSSID);
+
+VOID APCliInstallPairwiseKey(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+BOOLEAN APCliInstallSharedKey(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pKey,
+ IN UCHAR KeyLen,
+ IN UCHAR DefaultKeyIdx,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID ApCliUpdateMlmeRate(
+ IN PRTMP_ADAPTER pAd);
+
+VOID APCli_Init(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_OS_NETDEV_OP_HOOK *pNetDevOps);
+
+BOOLEAN ApCli_Open(
+ IN PRTMP_ADAPTER pAd,
+ IN PNET_DEV dev_p);
+
+BOOLEAN ApCli_Close(
+ IN PRTMP_ADAPTER pAd,
+ IN PNET_DEV dev_p);
+
+BOOLEAN ApCliWaitProbRsp(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT ifIndex);
+
+#endif /* APCLI_SUPPORT */
+
+#endif /* _AP_APCLI_H_ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_autoChSel.h b/cleopatre/devkit/mt7601udrv/include/ap_autoChSel.h
new file mode 100644
index 0000000000..4eed2ac303
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_autoChSel.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Abstract:
+
+
+ */
+
+#include "ap_autoChSel_cmm.h"
+
+#ifndef __AUTOCHSELECT_H__
+#define __AUTOCHSELECT_H__
+
+#define AP_AUTO_CH_SEL(__P, __O) APAutoSelectChannel((__P), (__O))
+
+ULONG AutoChBssSearchWithSSID(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR Bssid,
+ IN PUCHAR pSsid,
+ IN UCHAR SsidLen,
+ IN UCHAR Channel);
+
+VOID APAutoChannelInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID UpdateChannelInfo(
+ IN PRTMP_ADAPTER pAd,
+ IN int ch,
+ IN ChannelSel_Alg Alg);
+
+ULONG AutoChBssInsertEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pBssid,
+ IN CHAR Ssid[],
+ IN UCHAR SsidLen,
+ IN UCHAR ChannelNo,
+ IN UCHAR ExtChOffset,
+ IN CHAR Rssi);
+
+VOID AutoChBssTableInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ChannelInfoInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AutoChBssTableDestroy(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ChannelInfoDestroy(
+ IN PRTMP_ADAPTER pAd);
+
+VOID CheckPhyModeIsABand(
+ IN PRTMP_ADAPTER pAd);
+
+UCHAR SelectBestChannel(
+ IN PRTMP_ADAPTER pAd,
+ IN ChannelSel_Alg Alg);
+
+UCHAR APAutoSelectChannel(
+ IN PRTMP_ADAPTER pAd,
+ IN ChannelSel_Alg Alg);
+
+#endif /* __AUTOCHSELECT_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_autoChSel_cmm.h b/cleopatre/devkit/mt7601udrv/include/ap_autoChSel_cmm.h
new file mode 100644
index 0000000000..21a822a8fc
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_autoChSel_cmm.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Abstract:
+
+
+ */
+
+
+#ifndef __AUTOCHSELECT_CMM_H__
+#define __AUTOCHSELECT_CMM_H__
+
+#define RSSI_TO_DBM_OFFSET 120 /* RSSI-115 = dBm */
+
+
+typedef struct {
+ ULONG dirtyness[MAX_NUM_OF_CHANNELS+1];
+ ULONG ApCnt[MAX_NUM_OF_CHANNELS+1];
+ UINT32 FalseCCA[MAX_NUM_OF_CHANNELS+1];
+ BOOLEAN SkipList[MAX_NUM_OF_CHANNELS+1];
+#ifdef AP_QLOAD_SUPPORT
+ UINT32 chanbusytime[MAX_NUM_OF_CHANNELS+1]; /* QLOAD ALARM */
+#endif /* AP_QLOAD_SUPPORT */
+ BOOLEAN IsABand;
+} CHANNELINFO, *PCHANNELINFO;
+
+typedef struct {
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR SsidLen;
+ CHAR Ssid[MAX_LEN_OF_SSID];
+ UCHAR Channel;
+ UCHAR ExtChOffset;
+ CHAR Rssi;
+} BSSENTRY, *PBSSENTRY;
+
+typedef struct {
+ UCHAR BssNr;
+ BSSENTRY BssEntry[MAX_LEN_OF_BSS_TABLE];
+} BSSINFO, *PBSSINFO;
+
+typedef enum ChannelSelAlg
+{
+ ChannelAlgRandom, /*use by Dfs */
+ ChannelAlgApCnt,
+ ChannelAlgCCA
+} ChannelSel_Alg;
+
+#endif /* __AUTOCHSELECT_CMM_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_cfg.h b/cleopatre/devkit/mt7601udrv/include/ap_cfg.h
new file mode 100644
index 0000000000..81be09272b
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_cfg.h
@@ -0,0 +1,167 @@
+#ifndef __AP_CFG_H__
+#define __AP_CFG_H__
+
+
+#include "rt_config.h"
+
+INT RTMPAPPrivIoctlSet(
+ IN RTMP_ADAPTER *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *pIoctlCmdStr);
+
+INT RTMPAPPrivIoctlShow(
+ IN RTMP_ADAPTER *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *pIoctlCmdStr);
+
+#ifdef INF_AR9
+#ifdef AR9_MAPI_SUPPORT
+INT RTMPAPPrivIoctlAR9Show(
+ IN RTMP_ADAPTER *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *pIoctlCmdStr);
+
+VOID RTMPAR9IoctlGetMacTable(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlGetSTAT2(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlGetRadioDynInfo(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+#endif /*AR9_MAPI_SUPPORT*/
+#endif/* INF_AR9 */
+
+INT RTMPAPSetInformation(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT RTMP_IOCTL_INPUT_STRUCT *rq,
+ IN INT cmd);
+
+INT RTMPAPQueryInformation(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT RTMP_IOCTL_INPUT_STRUCT *rq,
+ IN INT cmd);
+
+VOID RTMPIoctlStatistics(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+
+VOID RTMPIoctlGetMacTable(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+
+VOID RTMPAPIoctlE2PROM(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+#ifdef DBG
+VOID RTMPAPIoctlBBP(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPAPIoctlMAC(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+
+#endif /* DBG */
+
+VOID RtmpDrvMaxRateGet(
+ IN VOID *pReserved,
+/* IN PHTTRANSMIT_SETTING pHtPhyMode, */
+ IN UINT8 MODE,
+ IN UINT8 ShortGI,
+ IN UINT8 BW,
+ IN UINT8 MCS,
+ OUT UINT32 *pRate);
+
+#ifdef WSC_AP_SUPPORT
+VOID RTMPIoctlWscProfile(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlWscProfile(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+/*add by woody */
+#ifdef INF_AR9
+#ifdef AR9_MAPI_SUPPORT
+VOID RTMPAR9IoctlWscProfile(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlWscPINCode(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+
+VOID RTMPIoctlWscStatus(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlGetWscDynInfo(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlGetWscRegsDynInfo(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+#endif/*AR9_MAPI_SUPPORT*/
+#endif/* INF_AR9 */
+#endif /* WSC_AP_SUPPORT */
+
+#ifdef DOT11_N_SUPPORT
+VOID RTMPIoctlQueryBaTable(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef DOT1X_SUPPORT
+VOID RTMPIoctlStaticWepCopy(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlRadiusData(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlAddWPAKey(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlAddPMKIDCache(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+VOID RTMPIoctlSetIdleTimeout(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+#endif /* DOT1X_SUPPORT */
+
+INT ApCfg_Set_AuthMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN PSTRING arg);
+
+INT ApCfg_Set_MaxStaNum_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN PSTRING arg);
+
+INT ApCfg_Set_IdleTimeout_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+
+#ifdef APCLI_SUPPORT
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+VOID RTMPApCliAddKey(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN PNDIS_APCLI_802_11_KEY pApcliKey);
+#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
+#endif /* APCLI_SUPPORT */
+#endif /* __AP_CFG_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_diversity.h b/cleopatre/devkit/mt7601udrv/include/ap_diversity.h
new file mode 100644
index 0000000000..30ba044c10
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_diversity.h
@@ -0,0 +1,142 @@
+/***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ap_diversity.c
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------
+ YY Huang 06-10-2008 Init for RT3052.
+*/
+
+#ifndef _AP_DIVERSITY_H_
+#define _AP_DIVERSITY_H_
+
+#include "rtmp.h"
+
+#define ADDBGPRINT(format,args...) do{if(atomic_read(&DEBUG_VERBOSE_MODE)) printk( format, ##args);}while(0)
+#define PROC_DIR "AntDiv"
+
+/*
+ * For shorter udelay().
+ * (ripped from rtmp.h)
+ */
+/*#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) {} */
+/* Read BBP register by register's ID. Generate PER to test BA */
+#define RTMP_BBP_IO_READ8_BY_REG_ID_SHORT_DELAY(_A, _I, _pV) \
+{ \
+ BBP_CSR_CFG_STRUC BbpCsr; \
+ int i, k; \
+ if ((_A)->bPCIclkOff == FALSE) \
+ { \
+ for (i=0; i<MAX_BUSY_COUNT; i++) \
+ { \
+ RTMP_IO_READ32(_A, H2M_BBP_AGENT, &BbpCsr.word);\
+ if (BbpCsr.field.Busy == BUSY) \
+ continue; \
+ BbpCsr.word = 0; \
+ BbpCsr.field.fRead = 1; \
+ BbpCsr.field.BBP_RW_MODE = 1; \
+ BbpCsr.field.Busy = 1; \
+ BbpCsr.field.RegNum = _I; \
+ RTMP_IO_WRITE32(_A, H2M_BBP_AGENT, BbpCsr.word);\
+ AsicSendCommandToMcu(_A, 0x80, 0xff, 0x0, 0x0, FALSE); \
+ RTMPusecDelay(10); \
+ for (k=0; k<MAX_BUSY_COUNT; k++) \
+ { \
+ RTMP_IO_READ32(_A, H2M_BBP_AGENT, &BbpCsr.word); \
+ if (BbpCsr.field.Busy == IDLE) \
+ break; \
+ else \
+ printk("MCU busy\n"); \
+ } \
+ if ((BbpCsr.field.Busy == IDLE) && \
+ (BbpCsr.field.RegNum == _I)) \
+ { \
+ *(_pV) = (UCHAR)BbpCsr.field.Value; \
+ break; \
+ } \
+ } \
+ if (BbpCsr.field.Busy == BUSY) \
+ { \
+ DBGPRINT_ERR(("BBP read R%d=0x%x fail\n", _I, BbpCsr.word)); \
+ *(_pV) = (_A)->BbpWriteLatch[_I]; \
+ RTMP_IO_READ32(_A, H2M_BBP_AGENT, &BbpCsr.word);\
+ BbpCsr.field.Busy = 0; \
+ RTMP_IO_WRITE32(_A, H2M_BBP_AGENT, BbpCsr.word);\
+ } \
+ } \
+}
+
+
+/*
+ * proc fs related macros.
+ */
+#define CREATE_PROC_ENTRY(x) \
+ if ((pProc##x = create_proc_entry(#x, 0, pProcDir))){ \
+ pProc##x->read_proc = (read_proc_t*)&x##Read; \
+ pProc##x->write_proc = (write_proc_t*)&x##Write; \
+ } \
+
+#define IMPLEMENT_PROC_ENTRY(x,y,z) \
+static struct proc_dir_entry *pProc##x; \
+IMPLEMENT_PROC_ENTRY_READ(x,y,z) \
+IMPLEMENT_PROC_ENTRY_WRITE(x,y,z)
+
+#define IMPLEMENT_PROC_ENTRY_READ(x,y,z) \
+static INT x##Read(char *page, char **start, off_t off, \
+ int count, int *eof, void *data){ \
+ INT len; \
+ sprintf(page, "%d\n", atomic_read(&x)); \
+ len = strlen(page) + 1; \
+ *eof = 1; \
+ return len; \
+}
+#define IMPLEMENT_PROC_ENTRY_WRITE(x,y,z) \
+static INT x##Write(struct file *file, const char *buffer, \
+ unsigned long count, void *data){ \
+ CHAR tmp[32];INT tmp_val; \
+ if (count > 32) count = 32; \
+ memset(tmp, 0, 32); \
+ if (copy_from_user(tmp, buffer, count)) \
+ return -EFAULT; \
+ tmp_val = simple_strtol(tmp, 0, 10); \
+ if(tmp_val > z || tmp_val < y) \
+ return -EFAULT; \
+ atomic_set(&x, (int)tmp_val); \
+ return count; \
+}
+#define DESTORY_PROC_ENTRY(x) if (pProc##x) remove_proc_entry(#x, pProcDir);
+
+/*
+ * function prototype
+ */
+VOID RT3XXX_AntDiversity_Init(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RT3XXX_AntDiversity_Fini(
+ IN RTMP_ADAPTER *pAd);
+
+VOID AntDiversity_Update_Rssi_Sample(
+ IN RTMP_ADAPTER *pAd,
+ IN RSSI_SAMPLE *pRssi,
+ IN RXWI_STRUC *pRxWI);
+
+
+#endif
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_ids.h b/cleopatre/devkit/mt7601udrv/include/ap_ids.h
new file mode 100644
index 0000000000..6d7d23d341
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_ids.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ ap_ids.c
+
+ Abstract:
+ IDS definition
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ */
+
+VOID RTMPIdsPeriodicExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+BOOLEAN RTMPSpoofedMgmtDetection(
+ IN PRTMP_ADAPTER pAd,
+ IN PHEADER_802_11 pHeader,
+ IN CHAR Rssi0,
+ IN CHAR Rssi1,
+ IN CHAR Rssi2,
+ IN UCHAR AntSel);
+
+VOID RTMPConflictSsidDetection(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pSsid,
+ IN UCHAR SsidLen,
+ IN CHAR Rssi0,
+ IN CHAR Rssi1,
+ IN CHAR Rssi2,
+ IN UCHAR AntSel);
+
+BOOLEAN RTMPReplayAttackDetection(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr2,
+ IN CHAR Rssi0,
+ IN CHAR Rssi1,
+ IN CHAR Rssi2,
+ IN UCHAR AntSel,
+ IN UCHAR BW);
+
+VOID RTMPUpdateStaMgmtCounter(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT type);
+
+VOID RTMPClearAllIdsCounter(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPIdsStart(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPIdsStop(
+ IN PRTMP_ADAPTER pAd);
+
+VOID rtmp_read_ids_from_file(
+ IN PRTMP_ADAPTER pAd,
+ char *tmpbuf,
+ char *buffer);
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_mbss.h b/cleopatre/devkit/mt7601udrv/include/ap_mbss.h
new file mode 100644
index 0000000000..7e07e920d2
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_mbss.h
@@ -0,0 +1,86 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ap_mbss.h
+
+ Abstract:
+ Support multi-BSS function.
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Sample Lin 01-02-2007 created
+*/
+
+#ifndef MODULE_MBSS
+
+#define MBSS_EXTERN extern
+
+#else
+
+#define MBSS_EXTERN
+
+#endif /* MODULE_MBSS */
+
+
+/*
+ For MBSS, the phy mode is different;
+ So MBSS_PHY_MODE_RESET() can help us to adjust the correct mode &
+ maximum MCS for the BSS.
+*/
+#define MBSS_PHY_MODE_RESET(__BssId, __HtPhyMode) \
+ { \
+ UCHAR __PhyMode = pAd->ApCfg.MBSSID[__BssId].PhyMode; \
+ if ((__PhyMode == WMODE_B) && \
+ (__HtPhyMode.field.MODE != MODE_CCK)) \
+ { \
+ __HtPhyMode.field.MODE = MODE_CCK; \
+ __HtPhyMode.field.MCS = 3; \
+ } \
+ else if ((!WMODE_CAP_N(__PhyMode)) && \
+ (__PhyMode != WMODE_B) && \
+ (__HtPhyMode.field.MODE != MODE_OFDM)) \
+ { \
+ __HtPhyMode.field.MODE = MODE_OFDM; \
+ __HtPhyMode.field.MCS = 7; \
+ } \
+ }
+
+
+/* Public function list */
+INT Show_MbssInfo_Display_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+VOID MBSS_Init(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_OS_NETDEV_OP_HOOK *pNetDevOps);
+
+VOID MBSS_Remove(
+ IN PRTMP_ADAPTER pAd);
+
+INT MBSS_Open(
+ IN PNET_DEV pDev);
+
+INT MBSS_Close(
+ IN PNET_DEV pDev);
+
+INT32 RT28xx_MBSS_IdxGet(
+ IN PRTMP_ADAPTER pAd,
+ IN PNET_DEV pDev);
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ap_wds.h b/cleopatre/devkit/mt7601udrv/include/ap_wds.h
new file mode 100644
index 0000000000..016ea9edbe
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ap_wds.h
@@ -0,0 +1,220 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ap_wds.h
+
+ Abstract:
+ Support WDS function.
+
+ Revision History:
+ Who When What
+ ------ ---------- ----------------------------------------------
+ Fonchi 02-13-2007 created
+*/
+
+
+#ifndef _AP_WDS_H_
+#define _AP_WDS_H_
+
+#define WDS_ENTRY_RETRY_INTERVAL (100 * OS_HZ / 1000)
+
+#ifdef WDS_VLAN_SUPPORT /* support WDS VLAN */
+#define WDS_VLAN_INFO_GET( \
+ __pAd, __VLAN_VID, __VLAN_Priority, __FromWhichBSSID) \
+{ \
+ if ((__FromWhichBSSID >= MIN_NET_DEVICE_FOR_WDS) && \
+ (__FromWhichBSSID < (MIN_NET_DEVICE_FOR_WDS+MAX_WDS_ENTRY)) && \
+ (__pAd->WdsTab.WdsEntry[ \
+ __FromWhichBSSID - MIN_NET_DEVICE_FOR_WDS].VLAN_VID != 0)) \
+ { \
+ __VLAN_VID = __pAd->WdsTab.WdsEntry[ \
+ __FromWhichBSSID - MIN_NET_DEVICE_FOR_WDS].VLAN_VID; \
+ __VLAN_Priority = __pAd->WdsTab.WdsEntry[ \
+ __FromWhichBSSID - MIN_NET_DEVICE_FOR_WDS].VLAN_Priority;\
+ } \
+}
+#else
+#define WDS_VLAN_INFO_GET( \
+ __pAd, __VLAN_VID, __VLAN_Priority, __FromWhichBSSID)
+#endif /* WDS_VLAN_SUPPORT */
+
+static inline BOOLEAN WDS_IF_UP_CHECK(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG ifidx)
+{
+ if ((pAd->flg_wds_init != TRUE) ||
+ (ifidx >= MAX_WDS_ENTRY))
+ return FALSE;
+
+/* if(RTMP_OS_NETDEV_STATE_RUNNING(pAd->WdsTab.WdsEntry[ifidx].dev)) */
+/* Patch for wds ,when dirver call apmlmeperiod => APMlmeDynamicTxRateSwitching check if wds device ready */
+if ((pAd->WdsTab.WdsEntry[ifidx].dev != NULL) && (RTMP_OS_NETDEV_STATE_RUNNING(pAd->WdsTab.WdsEntry[ifidx].dev)))
+ return TRUE;
+
+ return FALSE;
+}
+
+LONG WdsEntryAlloc(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr);
+
+VOID WdsEntryDel(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr);
+
+MAC_TABLE_ENTRY *MacTableInsertWDSEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ UINT WdsTabIdx);
+
+BOOLEAN MacTableDeleteWDSEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT wcid,
+ IN PUCHAR pAddr);
+
+
+BOOLEAN ApWdsAllowToSendPacket(
+ IN RTMP_ADAPTER *pAd,
+ IN PNDIS_PACKET pPacket,
+ OUT UCHAR *pWcid);
+
+MAC_TABLE_ENTRY *WdsTableLookupByWcid(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR wcid,
+ IN PUCHAR pAddr,
+ IN BOOLEAN bResetIdelCount);
+
+MAC_TABLE_ENTRY *WdsTableLookup(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN BOOLEAN bResetIdelCount);
+
+MAC_TABLE_ENTRY *FindWdsEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN PUCHAR pAddr,
+ IN UINT32 PhyMode);
+
+VOID WdsTableMaintenance(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RT28xx_WDS_Close(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID WdsDown(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicUpdateWdsRxWCIDTable(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicUpdateWdsEncryption(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR wcid);
+
+VOID WdsPeerBeaconProc(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN USHORT CapabilityInfo,
+ IN UCHAR MaxSupportedRateIn500Kbps,
+ IN UCHAR MaxSupportedRateLen,
+ IN BOOLEAN bWmmCapable,
+ IN ULONG ClientRalinkIe,
+ IN HT_CAPABILITY_IE *pHtCapability,
+ IN UCHAR HtCapabilityLen);
+
+VOID APWdsInitialize(
+ IN PRTMP_ADAPTER pAd);
+
+INT Show_WdsTable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+VOID rtmp_read_wds_from_file(
+ IN PRTMP_ADAPTER pAd,
+ PSTRING tmpbuf,
+ PSTRING buffer);
+
+VOID WdsPrepareWepKeyFromMainBss(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID WDS_Init(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_OS_NETDEV_OP_HOOK *pNetDevOps);
+
+VOID WDS_Remove(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN WDS_StatsGet(
+ IN PRTMP_ADAPTER pAd,
+ IN RT_CMD_STATS *pStats);
+
+VOID AP_WDS_KeyNameMakeUp(
+ IN STRING *pKey,
+ IN UINT32 KeyMaxSize,
+ IN INT KeyId);
+
+/*
+ ==========================================================================
+ Description:
+ Check the WDS Entry is valid or not.
+ ==========================================================================
+ */
+static inline BOOLEAN ValidWdsEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR WdsIndex)
+{
+ BOOLEAN result;
+ PMAC_TABLE_ENTRY pMacEntry;
+
+ do
+ {
+ if (WdsIndex >= MAX_WDS_ENTRY)
+ {
+ result = FALSE;
+ break;
+ }
+
+ if (pAd->WdsTab.WdsEntry[WdsIndex].Valid != TRUE)
+ {
+ result = FALSE;
+ break;
+ }
+
+ if ((pAd->WdsTab.WdsEntry[WdsIndex].MacTabMatchWCID==0)
+ || (pAd->WdsTab.WdsEntry[WdsIndex].MacTabMatchWCID >= MAX_LEN_OF_MAC_TABLE))
+ {
+ result = FALSE;
+ break;
+ }
+
+ pMacEntry = &pAd->MacTab.Content[pAd->WdsTab.WdsEntry[WdsIndex].MacTabMatchWCID];
+ if (!IS_ENTRY_WDS(pMacEntry))
+ {
+ result = FALSE;
+ break;
+ }
+
+ result = TRUE;
+ } while(FALSE);
+
+ return result;
+}
+#endif /* _AP_WDS_H_ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/br_ftph.h b/cleopatre/devkit/mt7601udrv/include/br_ftph.h
new file mode 100644
index 0000000000..7810cf1342
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/br_ftph.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All Bridge Fast Path Related Structure & Definition.
+
+***************************************************************************/
+
+#ifndef __BR_FTPH_H__
+#define __BR_FTPH_H__
+
+/* Public function prototype */
+/*
+========================================================================
+Routine Description:
+ Init bridge fast path module.
+
+Arguments:
+ None
+
+Return Value:
+ None
+
+Note:
+ Used in module init.
+========================================================================
+*/
+VOID BG_FTPH_Init(VOID);
+
+/*
+========================================================================
+Routine Description:
+ Remove bridge fast path module.
+
+Arguments:
+ None
+
+Return Value:
+ None
+
+Note:
+ Used in module remove.
+========================================================================
+*/
+VOID BG_FTPH_Remove(VOID);
+
+/*
+========================================================================
+Routine Description:
+ Forward the received packet.
+
+Arguments:
+ pPacket - the received packet
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UINT32 BG_FTPH_PacketFromApHandle(
+ IN PNDIS_PACKET pPacket);
+
+#endif /* __BR_FTPH_H__ */
+
+/* End of br_ftph.h */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/cfg80211.h b/cleopatre/devkit/mt7601udrv/include/cfg80211.h
new file mode 100644
index 0000000000..36139d1149
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/cfg80211.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All MAC80211/CFG80211 Related Structure & Definition.
+
+***************************************************************************/
+
+#ifdef RT_CFG80211_SUPPORT
+
+#include <linux/ieee80211.h>
+
+typedef struct __CFG80211_CB {
+
+ /* we can change channel/rate information on the fly so we backup them */
+ struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
+ struct ieee80211_channel *pCfg80211_Channels;
+ struct ieee80211_rate *pCfg80211_Rates;
+
+ /* used in wiphy_unregister */
+ struct wireless_dev *pCfg80211_Wdev;
+
+ /* used in scan end */
+ struct cfg80211_scan_request *pCfg80211_ScanReq;
+
+ /* monitor filter */
+ UINT32 MonFilterFlag;
+
+ /* channel information */
+ struct ieee80211_channel ChanInfo[MAX_NUM_OF_CHANNELS];
+} CFG80211_CB;
+
+
+
+
+/*
+========================================================================
+Routine Description:
+ Register MAC80211 Module.
+
+Arguments:
+ pAd - WLAN control block pointer
+ pDev - Generic device interface
+ pNetDev - Network device
+
+Return Value:
+ NONE
+
+Note:
+ pDev != pNetDev
+ #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev))
+
+ Can not use pNetDev to replace pDev; Or kernel panic.
+========================================================================
+*/
+BOOLEAN CFG80211_Register(
+ VOID *pAd,
+ struct device *pDev,
+ struct net_device *pNetDev);
+
+
+#endif /* RT_CFG80211_SUPPORT */
+
+/* End of cfg80211.h */
diff --git a/cleopatre/devkit/mt7601udrv/include/cfg80211extr.h b/cleopatre/devkit/mt7601udrv/include/cfg80211extr.h
new file mode 100644
index 0000000000..32032f4800
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/cfg80211extr.h
@@ -0,0 +1,201 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All MAC80211/CFG80211 Function Prototype.
+
+***************************************************************************/
+
+#ifdef RT_CFG80211_SUPPORT
+
+#define RT_CFG80211_REGISTER(__pDev, __pNetDev) \
+ CFG80211_Register(__pDev, __pNetDev);
+
+#define RT_CFG80211_BEACON_CR_PARSE(__pAd, __pVIE, __LenVIE) \
+ CFG80211_BeaconCountryRegionParse((VOID *)__pAd, __pVIE, __LenVIE);
+
+#define RT_CFG80211_CRDA_REG_HINT(__pAd, __pCountryIe, __CountryIeLen) \
+ CFG80211_RegHint((VOID *)__pAd, __pCountryIe, __CountryIeLen);
+
+#define RT_CFG80211_CRDA_REG_HINT11D(__pAd, __pCountryIe, __CountryIeLen) \
+ CFG80211_RegHint11D((VOID *)__pAd, __pCountryIe, __CountryIeLen);
+
+#define RT_CFG80211_CRDA_REG_RULE_APPLY(__pAd) \
+ CFG80211_RegRuleApply((VOID *)__pAd, NULL, __pAd->Cfg80211_Alpha2);
+
+#define RT_CFG80211_SCANNING_INFORM(__pAd, __BssIdx, __ChanId, __pFrame, \
+ __FrameLen, __RSSI) \
+ CFG80211_Scaning((VOID *)__pAd, __BssIdx, __ChanId, __pFrame, \
+ __FrameLen, __RSSI);
+
+#define RT_CFG80211_SCAN_END(__pAd, __FlgIsAborted) \
+ CFG80211_ScanEnd((VOID *)__pAd, __FlgIsAborted);
+
+#define RT_CFG80211_REINIT(__pAd) \
+ CFG80211_SupBandReInit((VOID *)__pAd); \
+
+#define RT_CFG80211_CONN_RESULT_INFORM(__pAd, __pBSSID, __pReqIe, __ReqIeLen,\
+ __pRspIe, __RspIeLen, __FlgIsSuccess) \
+ CFG80211_ConnectResultInform((VOID *)__pAd, __pBSSID, \
+ __pReqIe, __ReqIeLen, __pRspIe, __RspIeLen, __FlgIsSuccess);
+
+#define RT_CFG80211_RFKILL_STATUS_UPDATE(_pAd, _active) \
+ CFG80211_RFKillStatusUpdate(_pAd, _active);
+
+#ifdef SINGLE_SKU
+#define CFG80211_BANDINFO_FILL(__pAd, __pBandInfo) \
+{ \
+ (__pBandInfo)->RFICType = __pAd->RFICType; \
+ (__pBandInfo)->MpduDensity = __pAd->CommonCfg.BACapability.field.MpduDensity;\
+ (__pBandInfo)->TxStream = __pAd->CommonCfg.TxStream; \
+ (__pBandInfo)->RxStream = __pAd->CommonCfg.RxStream; \
+ (__pBandInfo)->MaxTxPwr = __pAd->CommonCfg.DefineMaxTxPwr; \
+ if (WMODE_EQUAL(__pAd->CommonCfg.PhyMode, WMODE_B)) \
+ (__pBandInfo)->FlgIsBMode = TRUE; \
+ else \
+ (__pBandInfo)->FlgIsBMode = FALSE; \
+ (__pBandInfo)->MaxBssTable = MAX_LEN_OF_BSS_TABLE; \
+ (__pBandInfo)->RtsThreshold = pAd->CommonCfg.RtsThreshold; \
+ (__pBandInfo)->FragmentThreshold = pAd->CommonCfg.FragmentThreshold; \
+ (__pBandInfo)->RetryMaxCnt = 0; \
+ RTMP_IO_READ32(__pAd, TX_RTY_CFG, &((__pBandInfo)->RetryMaxCnt)); \
+}
+#else
+#define CFG80211_BANDINFO_FILL(__pAd, __pBandInfo) \
+{ \
+ (__pBandInfo)->RFICType = __pAd->RFICType; \
+ (__pBandInfo)->MpduDensity = __pAd->CommonCfg.BACapability.field.MpduDensity;\
+ (__pBandInfo)->TxStream = __pAd->CommonCfg.TxStream; \
+ (__pBandInfo)->RxStream = __pAd->CommonCfg.RxStream; \
+ (__pBandInfo)->MaxTxPwr = 0; \
+ if (WMODE_EQUAL(__pAd->CommonCfg.PhyMode, WMODE_B)) \
+ (__pBandInfo)->FlgIsBMode = TRUE; \
+ else \
+ (__pBandInfo)->FlgIsBMode = FALSE; \
+ (__pBandInfo)->MaxBssTable = MAX_LEN_OF_BSS_TABLE; \
+ (__pBandInfo)->RtsThreshold = pAd->CommonCfg.RtsThreshold; \
+ (__pBandInfo)->FragmentThreshold = pAd->CommonCfg.FragmentThreshold; \
+ (__pBandInfo)->RetryMaxCnt = 0; \
+ RTMP_IO_READ32(__pAd, TX_RTY_CFG, &((__pBandInfo)->RetryMaxCnt)); \
+}
+#endif /* SINGLE_SKU */
+
+
+/* utilities used in DRV module */
+INT CFG80211DRV_IoctlHandle(
+ IN VOID *pAdSrc,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+
+BOOLEAN CFG80211DRV_OpsSetChannel(
+ VOID *pAdOrg,
+ VOID *pData);
+
+BOOLEAN CFG80211DRV_OpsChgVirtualInf(
+ VOID *pAdOrg,
+ VOID *pFlgFilter,
+ UINT8 IfType);
+
+BOOLEAN CFG80211DRV_OpsScan(
+ VOID *pAdOrg);
+
+BOOLEAN CFG80211DRV_OpsJoinIbss(
+ VOID *pAdOrg,
+ VOID *pData);
+
+BOOLEAN CFG80211DRV_OpsLeave(
+ VOID *pAdOrg);
+
+BOOLEAN CFG80211DRV_StaGet(
+ VOID *pAdOrg,
+ VOID *pData);
+
+BOOLEAN CFG80211DRV_Connect(
+ VOID *pAdOrg,
+ VOID *pData);
+
+BOOLEAN CFG80211DRV_KeyAdd(
+ VOID *pAdOrg,
+ VOID *pData);
+
+VOID CFG80211DRV_RegNotify(
+ VOID *pAdOrg,
+ VOID *pData);
+
+VOID CFG80211DRV_SurveyGet(
+ VOID *pAdOrg,
+ VOID *pData);
+
+VOID CFG80211DRV_PmkidConfig(
+ VOID *pAdOrg,
+ VOID *pData);
+
+VOID CFG80211_RegHint(
+ IN VOID *pAdCB,
+ IN UCHAR *pCountryIe,
+ IN ULONG CountryIeLen);
+
+VOID CFG80211_RegHint11D(
+ IN VOID *pAdCB,
+ IN UCHAR *pCountryIe,
+ IN ULONG CountryIeLen);
+
+VOID CFG80211_ScanEnd(
+ IN VOID *pAdCB,
+ IN BOOLEAN FlgIsAborted);
+
+VOID CFG80211_ConnectResultInform(
+ IN VOID *pAdCB,
+ IN UCHAR *pBSSID,
+ IN UCHAR *pReqIe,
+ IN UINT32 ReqIeLen,
+ IN UCHAR *pRspIe,
+ IN UINT32 RspIeLen,
+ IN UCHAR FlgIsSuccess);
+
+BOOLEAN CFG80211_SupBandReInit(
+ IN VOID *pAdCB);
+
+VOID CFG80211_RegRuleApply(
+ IN VOID *pAdCB,
+ IN VOID *pWiphy,
+ IN UCHAR *pAlpha2);
+
+VOID CFG80211_Scaning(
+ IN VOID *pAdCB,
+ IN UINT32 BssIdx,
+ IN UINT32 ChanId,
+ IN UCHAR *pFrame,
+ IN UINT32 FrameLen,
+ IN INT32 RSSI);
+
+#ifdef RFKILL_HW_SUPPORT
+VOID CFG80211_RFKillStatusUpdate(
+ IN PVOID pAd,
+ IN BOOLEAN active);
+#endif /* RFKILL_HW_SUPPORT */
+
+VOID CFG80211_UnRegister(
+ IN VOID *pAdOrg,
+ IN VOID *pNetDev);
+
+#endif /* RT_CFG80211_SUPPORT */
+
+/* End of cfg80211extr.h */
diff --git a/cleopatre/devkit/mt7601udrv/include/chip/chip_id.h b/cleopatre/devkit/mt7601udrv/include/chip/chip_id.h
new file mode 100644
index 0000000000..8df348a0ec
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chip/chip_id.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ chip_id.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __CHIP_ID_H__
+#define __CHIP_ID_H__
+
+
+#define NIC_PCI_VENDOR_ID 0x1814
+
+#define NIC2860_PCI_DEVICE_ID 0x0601
+#define NIC2860_PCIe_DEVICE_ID 0x0681
+#define NIC2760_PCI_DEVICE_ID 0x0701 /* 1T/2R Cardbus ??? */
+#define NIC2790_PCIe_DEVICE_ID 0x0781 /* 1T/2R miniCard */
+
+#define VEN_AWT_PCIe_DEVICE_ID 0x1059
+#define VEN_AWT_PCI_VENDOR_ID 0x1A3B
+
+#define EDIMAX_PCI_VENDOR_ID 0x1432
+
+#define NIC3090_PCIe_DEVICE_ID 0x3090 /* 1T/1R miniCard */
+#define NIC3091_PCIe_DEVICE_ID 0x3091 /* 1T/2R miniCard */
+#define NIC3092_PCIe_DEVICE_ID 0x3092 /* 2T/2R miniCard */
+#define NIC3390_PCIe_DEVICE_ID 0x3390 /* 1T/1R miniCard */
+
+#define NIC3062_PCI_DEVICE_ID 0x3062 /* 2T/2R miniCard */
+#define NIC3562_PCI_DEVICE_ID 0x3562 /* 2T/2R miniCard */
+#define NIC3060_PCI_DEVICE_ID 0x3060 /* 1T/1R miniCard */
+
+#define NIC3592_PCIe_DEVICE_ID 0x3592 /* 2T/2R miniCard */
+
+
+#define NIC3593_PCI_OR_PCIe_DEVICE_ID 0x3593
+#define NIC5390_PCIe_DEVICE_ID 0x5390
+#define NIC539F_PCIe_DEVICE_ID 0x539F
+#define NIC5392_PCIe_DEVICE_ID 0x5392
+#define NIC5360_PCI_DEVICE_ID 0x5360
+#define NIC5362_PCI_DEVICE_ID 0x5362
+
+#define NIC5592_PCIe_DEVICE_ID 0x5592
+
+#define NIC3290_PCIe_DEVICE_ID 0x3290
+
+#define NIC6590_PCIe_DEVICE_ID 0x6590
+#define NIC7601_PCIe_DEVICE_ID 0x7601
+
+#define NIC8592_5592_PCIe_DEVICE_ID 0x5592
+#define NIC8592_PCIe_DEVICE_ID 0x8592
+
+#define NIC6390_PCIe_DEVICE_ID 0x6390
+
+#endif /* __CHIP_ID_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/chip/mt7601.h b/cleopatre/devkit/mt7601udrv/include/chip/mt7601.h
new file mode 100644
index 0000000000..9879003355
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chip/mt7601.h
@@ -0,0 +1,268 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt6590.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __MT7601_H__
+#define __MT7601_H__
+
+struct _RTMP_ADAPTER;
+
+#define MAC_VERSION ""
+
+#define BBP_VERSION "MT7601E2_BBP_CSD_20121019"
+#define RF_VERSION "RT6390_RF_Register_20121122"
+
+#define NIC6590_PCIe_DEVICE_ID 0x6590
+#define MAX_RF_ID 127
+#define MAC_RF_BANK 7
+
+#define MAX_CHECK_COUNT 200
+#define MT7601_VALID_EEPROM_VERSION 0x0C
+
+#define ENABLE_WLAN_FUN(__WlanFunCtrl)\
+{\
+ __WlanFunCtrl.field.WLAN_CLK_EN = 1;\
+ __WlanFunCtrl.field.WLAN_EN = 1;\
+}
+
+#define DISABLE_WLAN_FUN(__WlanFunCtrl)\
+{\
+ __WlanFunCtrl.field.PCIE_APP0_CLK_REQ = 0;\
+ __WlanFunCtrl.field.WLAN_EN = 0;\
+ __WlanFunCtrl.field.WLAN_CLK_EN = 0;\
+}
+
+#define MT7601_WSC_HDR_BTN_GPIO 0x400
+#define MT7601_WSC_HDR_BTN_MR_PRESS_FLG_GET(__pAd, __FlgIsPressed) \
+ { \
+ UINT32 __gpio_value; \
+ RTMP_IO_READ32(__pAd, WLAN_FUN_CTRL, (&__gpio_value)); \
+ if (__gpio_value & MT7601_WSC_HDR_BTN_GPIO) \
+ __FlgIsPressed = 0; \
+ else \
+ __FlgIsPressed = 1; \
+ }
+
+
+#define RF_PA_MODE0_DECODE 0
+#define RF_PA_MODE1_DECODE 8847 // 1.08 * 8192
+#define RF_PA_MODE2_DECODE -5734 // -0.7 * 8192
+#define RF_PA_MODE3_DECODE -5734 // -0.7 * 8192
+
+#define MT7601_E2_TEMPERATURE_SLOPE 39
+
+#define BW20_MCS_POWER_CCK_1M ((pAd->Tx20MPwrCfgGBand[0] & 0xFF) < 0x20)?(pAd->Tx20MPwrCfgGBand[0] & 0xFF):(CHAR)((pAd->Tx20MPwrCfgGBand[0] & 0xFF) - 0x40)
+#define BW20_MCS_POWER_CCK_2M ((pAd->Tx20MPwrCfgGBand[0] & 0xFF) < 0x20)?(pAd->Tx20MPwrCfgGBand[0] & 0xFF):(CHAR)((pAd->Tx20MPwrCfgGBand[0] & 0xFF) - 0x40)
+#define BW20_MCS_POWER_CCK_5M (((pAd->Tx20MPwrCfgGBand[0] & 0xFF00) >> 8) < 0x20)?((pAd->Tx20MPwrCfgGBand[0] & 0xFF00) >> 8):(CHAR)(((pAd->Tx20MPwrCfgGBand[0] & 0xFF00) >> 8)-0x40)
+#define BW20_MCS_POWER_CCK_11M (((pAd->Tx20MPwrCfgGBand[0] & 0xFF00) >> 8) < 0x20)?((pAd->Tx20MPwrCfgGBand[0] & 0xFF00) >> 8):(CHAR)(((pAd->Tx20MPwrCfgGBand[0] & 0xFF00) >> 8)-0x40)
+#define BW40_MCS_POWER_CCK_1M ((pAd->Tx40MPwrCfgGBand[0] & 0xFF) < 0x20)?(pAd->Tx40MPwrCfgGBand[0] & 0xFF) :(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF) < 0x20)-0x40)
+#define BW40_MCS_POWER_CCK_2M ((pAd->Tx40MPwrCfgGBand[0] & 0xFF) < 0x20)?(pAd->Tx40MPwrCfgGBand[0] & 0xFF) :(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF) < 0x20)-0x40)
+#define BW40_MCS_POWER_CCK_5M (((pAd->Tx40MPwrCfgGBand[0] & 0xFF00) >> 8) < 0x20)?((pAd->Tx40MPwrCfgGBand[0] & 0xFF00) >> 8):(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF00) >> 8)-0x40)
+#define BW40_MCS_POWER_CCK_11M (((pAd->Tx40MPwrCfgGBand[0] & 0xFF00) >> 8) < 0x20)?((pAd->Tx40MPwrCfgGBand[0] & 0xFF00) >> 8):(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF00) >> 8)-0x40)
+
+#define BW20_MCS_POWER_OFDM_6M (((pAd->Tx20MPwrCfgGBand[0] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx20MPwrCfgGBand[0] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx20MPwrCfgGBand[0] & 0xFF0000) >> 16)-0x40)
+#define BW20_MCS_POWER_OFDM_9M (((pAd->Tx20MPwrCfgGBand[0] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx20MPwrCfgGBand[0] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx20MPwrCfgGBand[0] & 0xFF0000) >> 16)-0x40)
+#define BW20_MCS_POWER_OFDM_12M (((pAd->Tx20MPwrCfgGBand[0] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx20MPwrCfgGBand[0] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx20MPwrCfgGBand[0] & 0xFF000000) >> 24)-0x40)
+#define BW20_MCS_POWER_OFDM_18M (((pAd->Tx20MPwrCfgGBand[0] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx20MPwrCfgGBand[0] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx20MPwrCfgGBand[0] & 0xFF000000) >> 24)-0x40)
+#define BW20_MCS_POWER_OFDM_24M ((pAd->Tx20MPwrCfgGBand[1] & 0xFF) < 0x20)?(pAd->Tx20MPwrCfgGBand[1] & 0xFF):(CHAR)((pAd->Tx20MPwrCfgGBand[1] & 0xFF)-0x40)
+#define BW20_MCS_POWER_OFDM_36M ((pAd->Tx20MPwrCfgGBand[1] & 0xFF) < 0x20)?(pAd->Tx20MPwrCfgGBand[1] & 0xFF):(CHAR)((pAd->Tx20MPwrCfgGBand[1] & 0xFF)-0x40)
+#define BW20_MCS_POWER_OFDM_48M (((pAd->Tx20MPwrCfgGBand[1] & 0xFF00) >> 8) < 0x20)?((pAd->Tx20MPwrCfgGBand[1] & 0xFF00) >> 8):(CHAR)(((pAd->Tx20MPwrCfgGBand[1] & 0xFF00) >> 8)-0x40)
+#define BW20_MCS_POWER_OFDM_54M (((pAd->Tx20MPwrCfgGBand[1] & 0xFF00) >> 8) < 0x20)?((pAd->Tx20MPwrCfgGBand[1] & 0xFF00) >> 8):(CHAR)(((pAd->Tx20MPwrCfgGBand[1] & 0xFF00) >> 8)-0x40)
+#define BW40_MCS_POWER_OFDM_6M (((pAd->Tx40MPwrCfgGBand[0] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx40MPwrCfgGBand[0] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF0000) >> 16)-0x40)
+#define BW40_MCS_POWER_OFDM_9M (((pAd->Tx40MPwrCfgGBand[0] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx40MPwrCfgGBand[0] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF0000) >> 16)-0x40)
+#define BW40_MCS_POWER_OFDM_12M (((pAd->Tx40MPwrCfgGBand[0] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx40MPwrCfgGBand[0] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF000000) >> 24)-0x40)
+#define BW40_MCS_POWER_OFDM_18M (((pAd->Tx40MPwrCfgGBand[0] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx40MPwrCfgGBand[0] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx40MPwrCfgGBand[0] & 0xFF000000) >> 24)-0x40)
+#define BW40_MCS_POWER_OFDM_24M ((pAd->Tx40MPwrCfgGBand[1] & 0xFF) < 0x20)?(pAd->Tx40MPwrCfgGBand[1] & 0xFF):(CHAR)((pAd->Tx40MPwrCfgGBand[1] & 0xFF)-0x40)
+#define BW40_MCS_POWER_OFDM_36M ((pAd->Tx40MPwrCfgGBand[1] & 0xFF) < 0x20)?(pAd->Tx40MPwrCfgGBand[1] & 0xFF):(CHAR)((pAd->Tx40MPwrCfgGBand[1] & 0xFF)-0x40)
+#define BW40_MCS_POWER_OFDM_48M (((pAd->Tx40MPwrCfgGBand[1] & 0xFF00) >> 8) < 0x20)?((pAd->Tx40MPwrCfgGBand[1] & 0xFF00) >> 8):(CHAR)(((pAd->Tx40MPwrCfgGBand[1] & 0xFF00) >> 8)-0x40)
+#define BW40_MCS_POWER_OFDM_54M (((pAd->Tx40MPwrCfgGBand[1] & 0xFF00) >> 8) < 0x20)?((pAd->Tx40MPwrCfgGBand[1] & 0xFF00) >> 8):(CHAR)(((pAd->Tx40MPwrCfgGBand[1] & 0xFF00) >> 8)-0x40)
+
+#define BW20_MCS_POWER_HT_MCS0 (((pAd->Tx20MPwrCfgGBand[1] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx20MPwrCfgGBand[1] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx20MPwrCfgGBand[1] & 0xFF0000) >> 16)-0x40)
+#define BW20_MCS_POWER_HT_MCS1 (((pAd->Tx20MPwrCfgGBand[1] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx20MPwrCfgGBand[1] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx20MPwrCfgGBand[1] & 0xFF0000) >> 16)-0x40)
+#define BW20_MCS_POWER_HT_MCS2 (((pAd->Tx20MPwrCfgGBand[1] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx20MPwrCfgGBand[1] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx20MPwrCfgGBand[1] & 0xFF000000) >> 24)-0x40)
+#define BW20_MCS_POWER_HT_MCS3 (((pAd->Tx20MPwrCfgGBand[1] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx20MPwrCfgGBand[1] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx20MPwrCfgGBand[1] & 0xFF000000) >> 24)-0x40)
+#define BW20_MCS_POWER_HT_MCS4 ((pAd->Tx20MPwrCfgGBand[2] & 0xFF) < 0x20)?(pAd->Tx20MPwrCfgGBand[2] & 0xFF):(CHAR)((pAd->Tx20MPwrCfgGBand[2] & 0xFF)-0x40)
+#define BW20_MCS_POWER_HT_MCS5 ((pAd->Tx20MPwrCfgGBand[2] & 0xFF) < 0x20)?(pAd->Tx20MPwrCfgGBand[2] & 0xFF):(CHAR)((pAd->Tx20MPwrCfgGBand[2] & 0xFF)-0x40)
+#define BW20_MCS_POWER_HT_MCS6 (((pAd->Tx20MPwrCfgGBand[2] & 0xFF00 ) >> 8) < 0x20)?((pAd->Tx20MPwrCfgGBand[2] & 0xFF00 ) >> 8):(CHAR)(((pAd->Tx20MPwrCfgGBand[2] & 0xFF00 ) >> 8)-0x40)
+#define BW20_MCS_POWER_HT_MCS7 (((pAd->Tx20MPwrCfgGBand[2] & 0xFF00 ) >> 8) < 0x20)?((pAd->Tx20MPwrCfgGBand[2] & 0xFF00 ) >> 8):(CHAR)(((pAd->Tx20MPwrCfgGBand[2] & 0xFF00 ) >> 8)-0x40)
+#define BW40_MCS_POWER_HT_MCS0 (((pAd->Tx40MPwrCfgGBand[1] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx40MPwrCfgGBand[1] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx40MPwrCfgGBand[1] & 0xFF0000) >> 16)-0x40)
+#define BW40_MCS_POWER_HT_MCS1 (((pAd->Tx40MPwrCfgGBand[1] & 0xFF0000) >> 16) < 0x20)?((pAd->Tx40MPwrCfgGBand[1] & 0xFF0000) >> 16):(CHAR)(((pAd->Tx40MPwrCfgGBand[1] & 0xFF0000) >> 16)-0x40)
+#define BW40_MCS_POWER_HT_MCS2 (((pAd->Tx40MPwrCfgGBand[1] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx40MPwrCfgGBand[1] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx40MPwrCfgGBand[1] & 0xFF000000) >> 24)-0x40)
+#define BW40_MCS_POWER_HT_MCS3 (((pAd->Tx40MPwrCfgGBand[1] & 0xFF000000) >> 24) < 0x20)?((pAd->Tx40MPwrCfgGBand[1] & 0xFF000000) >> 24):(CHAR)(((pAd->Tx40MPwrCfgGBand[1] & 0xFF000000) >> 24)-0x40)
+#define BW40_MCS_POWER_HT_MCS4 ((pAd->Tx40MPwrCfgGBand[2] & 0xFF) < 0x20)?(pAd->Tx40MPwrCfgGBand[2] & 0xFF):(CHAR)((pAd->Tx40MPwrCfgGBand[2] & 0xFF)-0x40)
+#define BW40_MCS_POWER_HT_MCS5 ((pAd->Tx40MPwrCfgGBand[2] & 0xFF) < 0x20)?(pAd->Tx40MPwrCfgGBand[2] & 0xFF):(CHAR)((pAd->Tx40MPwrCfgGBand[2] & 0xFF)-0x40)
+#define BW40_MCS_POWER_HT_MCS6 (((pAd->Tx40MPwrCfgGBand[2] & 0xFF00) >> 8) < 0x20)?((pAd->Tx40MPwrCfgGBand[2] & 0xFF00) >> 8):(CHAR)(((pAd->Tx40MPwrCfgGBand[2] & 0xFF00) >> 8)-0x40)
+#define BW40_MCS_POWER_HT_MCS7 (((pAd->Tx40MPwrCfgGBand[2] & 0xFF00) >> 8) < 0x20)?((pAd->Tx40MPwrCfgGBand[2] & 0xFF00) >> 8):(CHAR)(((pAd->Tx40MPwrCfgGBand[2] & 0xFF00) >> 8)-0x40)
+
+#define RF_PA_MODE_CCK_1M (pAd->chipCap.PAModeCCK[0])
+#define RF_PA_MODE_CCK_2M (pAd->chipCap.PAModeCCK[1])
+#define RF_PA_MODE_CCK_5M (pAd->chipCap.PAModeCCK[2])
+#define RF_PA_MODE_CCK_11M (pAd->chipCap.PAModeCCK[3])
+
+#define RF_PA_MODE_OFDM_6M (pAd->chipCap.PAModeOFDM[0])
+#define RF_PA_MODE_OFDM_9M (pAd->chipCap.PAModeOFDM[1])
+#define RF_PA_MODE_OFDM_12M (pAd->chipCap.PAModeOFDM[2])
+#define RF_PA_MODE_OFDM_18M (pAd->chipCap.PAModeOFDM[3])
+#define RF_PA_MODE_OFDM_24M (pAd->chipCap.PAModeOFDM[4])
+#define RF_PA_MODE_OFDM_36M (pAd->chipCap.PAModeOFDM[5])
+#define RF_PA_MODE_OFDM_48M (pAd->chipCap.PAModeOFDM[6])
+#define RF_PA_MODE_OFDM_54M (pAd->chipCap.PAModeOFDM[7])
+
+#define RF_PA_MODE_HT_MCS0 (pAd->chipCap.PAModeHT[0])
+#define RF_PA_MODE_HT_MCS1 (pAd->chipCap.PAModeHT[1])
+#define RF_PA_MODE_HT_MCS2 (pAd->chipCap.PAModeHT[2])
+#define RF_PA_MODE_HT_MCS3 (pAd->chipCap.PAModeHT[3])
+#define RF_PA_MODE_HT_MCS4 (pAd->chipCap.PAModeHT[4])
+#define RF_PA_MODE_HT_MCS5 (pAd->chipCap.PAModeHT[5])
+#define RF_PA_MODE_HT_MCS6 (pAd->chipCap.PAModeHT[6])
+#define RF_PA_MODE_HT_MCS7 (pAd->chipCap.PAModeHT[7])
+#define RF_PA_MODE_HT_MCS8 (pAd->chipCap.PAModeHT[8])
+#define RF_PA_MODE_HT_MCS9 (pAd->chipCap.PAModeHT[9])
+#define RF_PA_MODE_HT_MCS10 (pAd->chipCap.PAModeHT[10])
+#define RF_PA_MODE_HT_MCS11 (pAd->chipCap.PAModeHT[11])
+#define RF_PA_MODE_HT_MCS12 (pAd->chipCap.PAModeHT[12])
+#define RF_PA_MODE_HT_MCS13 (pAd->chipCap.PAModeHT[13])
+#define RF_PA_MODE_HT_MCS14 (pAd->chipCap.PAModeHT[14])
+#define RF_PA_MODE_HT_MCS15 (pAd->chipCap.PAModeHT[15])
+
+enum TEMPERATURE_MODE {
+ TEMPERATURE_MODE_NORMAL,
+ TEMPERATURE_MODE_LOW,
+ TEMPERATURE_MODE_HIGH,
+};
+
+#ifdef RTMP_INTERNAL_TX_ALC
+#define DEFAULT_BO 4
+#define LIN2DB_ERROR_CODE (-10000)
+
+VOID MT7601_TssiDcGainCalibration(struct _RTMP_ADAPTER *pAd);
+
+typedef struct _MT7601_TX_ALC_DATA {
+ INT32 PowerDiffPre;
+ INT32 MT7601_TSSI_T0_Delta_Offset;
+ INT16 TSSI_DBOFFSET_HVGA;
+ INT16 TSSI0_DB;
+ UCHAR TssiSlope;
+ CHAR TssiDC0;
+ CHAR TssiDC0_HVGA;
+ UINT32 InitTxAlcCfg1;
+ BOOLEAN TSSI_USE_HVGA;
+ BOOLEAN TssiTriggered;
+ CHAR MT7601_TSSI_OFFSET[3];
+} MT7601_TX_ALC_DATA, *PMT7601_TX_ALC_DATA;
+
+#endif /* RTMP_INTERNAL_TX_ALC */
+
+/*
+ rsv: Reserved
+ tcp: packet type, tcp : 1, udp:0
+ tups: TCP/UDP header start offset (in unit of DWORD)
+ ips: IP start offset (in unit of byte), base address of ips is the beginning of TXWI
+ mss: Max Segment size (in unit of byte)
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct _TSO_INFO_{
+ UINT32 mss:16;
+ UINT32 ips:8;
+ UINT32 tups:6;
+ UINT32 tcp:1;
+ UINT32 rsv:1;
+}TSO_INFO;
+#else
+typedef struct _TSO_INFO_{
+ UINT32 rsv:1;
+ UINT32 tcp:1;
+ UINT32 tups:6;
+ UINT32 ips:8;
+ UINT32 mss:16;
+}TSO_INFO;
+#endif /* RT_BIG_ENDIAN */
+
+/*
+ * Frequency plan item for MT7601
+ * K_R17[7:0]: sdm_k[7:0]
+ * K_R18[7:0]: sdm_k[15:8]
+ * K_R19[1:0]: sdm_k[17:16]
+ * K_R19[3]: sdm_clk_sel
+ * R_R20[7:0]: sdm_n[7:0]
+ */
+typedef struct _MT7601_FREQ_ITEM {
+ UINT8 Channel;
+ UINT8 K_R17;
+ UINT8 K_R18;
+ UINT8 K_R19;
+ UINT8 N_R20;
+} MT7601_FREQ_ITEM;
+
+#define RF_G_BAND 0x01
+#define RF_A_BAND 0x02
+#define RF_A_BAND_LB 0x04
+#define RF_A_BAND_MB 0x08
+#define RF_A_BAND_HB 0x10
+typedef struct _RT6590_RF_SWITCH_ITEM {
+ UCHAR Bank;
+ UCHAR Register;
+ UCHAR Band; /* G_Band, A_Band_LB, A_Band_MB, A_Band_HB */
+ UCHAR BW;
+ UCHAR Value;
+} RT6590_RF_SWITCH_ITEM, *PRT6590_RF_SWITCH_ITEM;
+
+VOID MT7601_Init(struct _RTMP_ADAPTER *pAd);
+VOID MT7601_RXDC_CAL(struct _RTMP_ADAPTER *pAd);
+INT MT7601_ReadChannelPwr(struct _RTMP_ADAPTER *pAd);
+VOID MT7601_ReadTxPwrPerRate(struct _RTMP_ADAPTER *pAd);
+VOID MT7601_INIT_CAL(struct _RTMP_ADAPTER *pAd);
+NTSTATUS MT7601DisableTxRx(struct _RTMP_ADAPTER *pAd, UCHAR Level);
+VOID dump_bw_info(struct _RTMP_ADAPTER *pAd);
+VOID MT7601AsicTemperatureCompensation(IN struct _RTMP_ADAPTER *pAd, IN BOOLEAN bPowerOn);
+#ifdef RTMP_INTERNAL_TX_ALC
+INT16 lin2dBd(UINT16 linearValue);
+VOID MT7601_EnableTSSI(struct _RTMP_ADAPTER *pAd);
+#endif /* RTMP_INTERNAL_TX_ALC */
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(SINGLE_SKU_V2)
+VOID MT7601_InitPAModeTable(struct _RTMP_ADAPTER *pAd);
+#endif /* defined(RTMP_INTERNAL_TX_ALC) || defined(SINGLE_SKU_V2) */
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+VOID MT7601_AsicMitigateMicrowave(
+ IN struct _RTMP_ADAPTER *pAd);
+
+VOID MT7601_AsicMeasureFalseCCA(
+ IN struct _RTMP_ADAPTER *pAd);
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+INT MT7601_Read_Temperature(
+ struct _RTMP_ADAPTER *pAd,
+ OUT CHAR* Temperature);
+
+INT MT7601_Bootup_Read_Temperature(
+ struct _RTMP_ADAPTER *pAd,
+ OUT CHAR* Temperature);
+
+VOID MT7601SetRxAnt(
+ struct _RTMP_ADAPTER *pAd,
+ IN UCHAR Ant);
+#endif /* __MT7601_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/chip/rt28xx.h b/cleopatre/devkit/mt7601udrv/include/chip/rt28xx.h
new file mode 100644
index 0000000000..3eacae6497
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chip/rt28xx.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt28xx.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RT28XX_H__
+#define __RT28XX_H__
+
+#ifdef RT28xx
+
+VOID RT28xx_ChipSwitchChannel(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN UCHAR Channel,
+ IN BOOLEAN bScan);
+
+#endif /* RT28xx */
+
+#endif /*__RT28XX_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/chip/rt3290.h b/cleopatre/devkit/mt7601udrv/include/chip/rt3290.h
new file mode 100644
index 0000000000..2ca19e68e6
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chip/rt3290.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt3290.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RT3290_H__
+#define __RT3290_H__
+
+#ifdef RT3290
+
+#error "For RT3290, you should define the compile flag -DRTMP_PCI_SUPPORT"
+
+#error "For RT3290, you should define the compile flag -DRTMP_MAC_PCI"
+
+#error "For RT3290, you should define the compile flag -DRTMP_RF_RW_SUPPORT"
+
+#error "For RT3290, you should define the compile flag -DRT30xx"
+
+#include "chip/mac_pci.h"
+#include "chip/rt30xx.h"
+
+struct _RTMP_ADAPTER;
+
+
+#define NIC3290_PCIe_DEVICE_ID 0x3290
+
+
+#define RT3290_CHECK_SW_EEP_BUSY(pAd) \
+{ \
+ UINT32 _val, _cnt = 0; \
+ do { \
+ RTMP_IO_FORCE_READ32(pAd, WLAN_FUN_INFO, &_val); \
+ if ((_val & 0x80000000) == 0 || (_val == 0xffffffff)) \
+ break; \
+ _cnt++; \
+ DBGPRINT_ERR(("RT3290: EEP is busy!!!! BusyCnt%d : fail\n", _cnt)); \
+ RTMPusecDelay(500); \
+ } while (_cnt<300); \
+} \
+
+#define RT3290_CURRENT_LEAKAGE(_pAd,_A,_e) \
+{ \
+ if (IS_RT3290(_pAd)) \
+ { \
+ UINT32 btFunInfo, _val = 0; \
+ RTMP_IO_FORCE_READ32(_pAd, _A, &_val); \
+ if (_e) \
+ _val &= ~(EESK|EEDI); \
+ else \
+ { \
+ _val &= ~(EESK); \
+ _val |= EEDI; \
+ } \
+ RT3290_CHECK_SW_EEP_BUSY(_pAd); \
+ RTMP_IO_FORCE_READ32(_pAd, BT_FUN_INFO, &btFunInfo); \
+ btFunInfo |= 0x80000000; \
+ RTMP_IO_FORCE_WRITE32(_pAd, BT_FUN_INFO, btFunInfo); \
+ \
+ RTMP_IO_FORCE_WRITE32(_pAd, _A, _V); \
+ \
+ btFunInfo &= ~(0x80000000); \
+ RTMP_IO_FORCE_WRITE32(_pAd, BT_FUN_INFO, btFunInfo); \
+ } \
+}
+
+
+VOID MlmeAntSelection(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN ULONG AccuTxTotalCnt,
+ IN ULONG TxErrorRatio,
+ IN ULONG TxSuccess,
+ IN CHAR Rssi);
+
+INT RT3290_eeprom_access_grant(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN BOOLEAN bGetCtrl);
+
+VOID RTMP_MAC_PWRSV_EN(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN BOOLEAN EnterIdle,
+ IN BOOLEAN use40M);
+
+VOID RTMPEnableWlan(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN BOOLEAN bOn,
+ IN BOOLEAN bResetWLAN);
+
+VOID RT3290_Init(
+ IN struct _RTMP_ADAPTER *pAd);
+
+#endif /* RT3290 */
+
+#endif /* __RT5390_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/chip/rt6590.h b/cleopatre/devkit/mt7601udrv/include/chip/rt6590.h
new file mode 100644
index 0000000000..4841680b1c
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chip/rt6590.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt6590.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RT6590_H__
+#define __RT6590_H__
+
+struct _RTMP_ADAPTER;
+
+#define NIC6590_PCIe_DEVICE_ID 0x6590
+#define MAX_RF_ID 127
+#define MAC_RF_BANK 7
+
+/*
+ rsv: Reserved
+ tcp: packet type, tcp : 1, udp:0
+ tups: TCP/UDP header start offset (in unit of DWORD)
+ ips: IP start offset (in unit of byte), base address of ips is the beginning of TXWI
+ mss: Max Segment size (in unit of byte)
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct _TSO_INFO_{
+ UINT32 mss:16;
+ UINT32 ips:8;
+ UINT32 tups:6;
+ UINT32 tcp:1;
+ UINT32 rsv:1;
+}TSO_INFO;
+#else
+typedef struct _TSO_INFO_{
+ UINT32 rsv:1;
+ UINT32 tcp:1;
+ UINT32 tups:6;
+ UINT32 ips:8;
+ UINT32 mss:16;
+}TSO_INFO;
+#endif /* RT_BIG_ENDIAN */
+
+
+/*
+ * Frequency plan item for RT85592
+ * N: R9[4], R8[7:0]
+ * K: R7[7], R9[3:0]
+ * mod: R9[7:5], R11[3:2] (eg. mod=8 => 0x0, mod=10 => 0x2)
+ * R: R11[1:0] (eg. R=1 => 0x0, R=3 => 0x2)
+ */
+typedef struct _RT8592_FREQ_ITEM {
+ UINT8 Channel;
+ UINT16 N;
+ UINT8 K;
+ UINT8 mod;
+ UINT8 R;
+} RT8592_FREQ_ITEM;
+
+#define RT6590_RF_VER "MT7650_WiFi_RF_Register_20120516.xls"
+//#define RT6590_BBP_VER "TC6008_BBP_CR_20120518.xls"
+#define RT6590_BBP_VER "TC6008_BBP_CR_20120522.xls"
+
+/*
+ Rdiv: R24[1:0] (2-bits)
+ PLL_N: R29[7:0], R30[0] (9-bits)
+ PLL_K(Nominator): R31[4:0] (5-bits)
+ Non-Sigma: !SDM R31[7:5] (3-bits)
+ Den: (Denomina - 8) R32[4:0] (5-bits)
+ Loop Filter Config: R33, R34
+ Pll_idiv: frac comp R35[6:0] (7-bits)
+
+ 5G only
+ Pll_LDO: R16 [6:4] = <010>
+*/
+typedef struct _RT6590_FREQ_ITEM {
+ UINT8 Channel;
+ UINT8 Band;
+ UINT16 PLL_N;
+ UINT8 PLL_K;
+ UINT8 Rdiv;
+ UINT8 NonSigma;
+ UINT8 Den;
+ UINT8 LFC_R33;
+ UINT8 LFC_R34;
+ UINT32 Pll_idiv;
+ UINT8 Pll_LDO; // 5G only
+} RT6590_FREQ_ITEM;
+
+#define RF_G_BAND 0x01
+#define RF_A_BAND 0x02
+#define RF_A_BAND_LB 0x04
+#define RF_A_BAND_MB 0x08
+#define RF_A_BAND_HB 0x10
+typedef struct _RT6590_RF_SWITCH_ITEM {
+ UCHAR Bank;
+ UCHAR Register;
+ UCHAR Band; /* G_Band, A_Band_LB, A_Band_MB, A_Band_HB */
+ UCHAR BW;
+ UCHAR Value;
+} RT6590_RF_SWITCH_ITEM, *PRT6590_RF_SWITCH_ITEM;
+
+typedef struct _RT6590_DCOC_Table {
+ UCHAR Band; /* G_Band, A_Band_LB, A_Band_MB, A_Band_HB */
+ RTMP_REG_PAIR RegDate;
+} RT6590_DOCO_Table, *PRT6590_DOCO_Table;
+
+VOID RT6590_Init(struct _RTMP_ADAPTER *pAd);
+INT RT6590_ReadChannelPwr(struct _RTMP_ADAPTER *pAd);
+
+#ifdef RT8592
+VOID RT85592_Init(struct _RTMP_ADAPTER *pAd);
+INT RT85592_ReadChannelPwr(struct _RTMP_ADAPTER *pAd);
+VOID RT85592ReadTxPwrPerRate(struct _RTMP_ADAPTER *pAd);
+#endif /* RT8592 */
+VOID RT6590ReadTxPwrPerRate(struct _RTMP_ADAPTER *pAd);
+
+VOID dump_bw_info(struct _RTMP_ADAPTER *pAd);
+
+#endif /* __RT6590_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/chip/rtmp_phy.h b/cleopatre/devkit/mt7601udrv/include/chip/rtmp_phy.h
new file mode 100644
index 0000000000..632909fbd1
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chip/rtmp_phy.h
@@ -0,0 +1,693 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_phy.h
+
+ Abstract:
+ Ralink Wireless Chip PHY(BBP/RF) related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_PHY_H__
+#define __RTMP_PHY_H__
+
+
+#include "mac_ral/rf_ctrl.h"
+#ifdef RLT_MAC
+#include "phy/rlt_phy.h"
+#endif /* RLT_MAC */
+
+/*
+ RF sections
+*/
+#define RF_R00 0
+#define RF_R01 1
+#define RF_R02 2
+#define RF_R03 3
+#define RF_R04 4
+#define RF_R05 5
+#define RF_R06 6
+#define RF_R07 7
+#define RF_R08 8
+#define RF_R09 9
+#define RF_R10 10
+#define RF_R11 11
+#define RF_R12 12
+#define RF_R13 13
+#define RF_R14 14
+#define RF_R15 15
+#define RF_R16 16
+#define RF_R17 17
+#define RF_R18 18
+#define RF_R19 19
+#define RF_R20 20
+#define RF_R21 21
+#define RF_R22 22
+#define RF_R23 23
+#define RF_R24 24
+#define RF_R25 25
+#define RF_R26 26
+#define RF_R27 27
+#define RF_R28 28
+#define RF_R29 29
+#define RF_R30 30
+#define RF_R31 31
+#define RF_R32 32
+#define RF_R33 33
+#define RF_R34 34
+#define RF_R35 35
+#define RF_R36 36
+#define RF_R37 37
+#define RF_R38 38
+#define RF_R39 39
+#define RF_R40 40
+#define RF_R41 41
+#define RF_R42 42
+#define RF_R43 43
+#define RF_R44 44
+#define RF_R45 45
+#define RF_R46 46
+#define RF_R47 47
+#define RF_R48 48
+#define RF_R49 49
+#define RF_R50 50
+#define RF_R51 51
+#define RF_R52 52
+#define RF_R53 53
+#define RF_R54 54
+#define RF_R55 55
+#define RF_R56 56
+#define RF_R57 57
+#define RF_R58 58
+#define RF_R59 59
+#define RF_R60 60
+#define RF_R61 61
+#define RF_R62 62
+#define RF_R63 63
+#define RF_R64 64
+#define RF_R65 65
+#define RF_R66 66
+#define RF_R67 67
+#define RF_R68 68
+#define RF_R69 69
+#define RF_R70 70
+#define RF_R71 71
+#define RF_R72 72
+#define RF_R73 73
+#define RF_R74 74
+#define RF_R75 75
+#define RF_R126 126
+#define RF_R127 127
+
+
+/* value domain of pAd->RfIcType */
+#define RFIC_2820 1 /* 2.4G 2T3R */
+#define RFIC_2850 2 /* 2.4G/5G 2T3R */
+#define RFIC_2720 3 /* 2.4G 1T2R */
+#define RFIC_2750 4 /* 2.4G/5G 1T2R */
+#define RFIC_3020 5 /* 2.4G 1T1R */
+#define RFIC_2020 6 /* 2.4G B/G */
+#define RFIC_3021 7 /* 2.4G 1T2R */
+#define RFIC_3022 8 /* 2.4G 2T2R */
+#define RFIC_3052 9 /* 2.4G/5G 2T2R */
+#define RFIC_2853 10 /* 2.4G.5G 3T3R */
+#define RFIC_3320 11 /* 2.4G 1T1R with PA (RT3350/RT3370/RT3390) */
+#define RFIC_3322 12 /* 2.4G 2T2R with PA (RT3352/RT3371/RT3372/RT3391/RT3392) */
+#define RFIC_3053 13 /* 2.4G/5G 3T3R (RT3883/RT3563/RT3573/RT3593/RT3662) */
+#define RFIC_3853 13 /* 2.4G/5G 3T3R (RT3883/RT3563/RT3573/RT3593/RT3662) */
+#define RFIC_5592 14 /* 2.4G/5G */
+#define RFIC_UNKNOWN 0xff
+
+#define RFIC_IS_5G_BAND(__pAd) \
+ ((__pAd->RfIcType == RFIC_2850) || \
+ (__pAd->RfIcType == RFIC_2750) || \
+ (__pAd->RfIcType == RFIC_3052) || \
+ (__pAd->RfIcType == RFIC_2853) || \
+ (__pAd->RfIcType == RFIC_3053) || \
+ (__pAd->RfIcType == RFIC_3853) || \
+ (__pAd->RfIcType == RFIC_5592) || \
+ (__pAd->RfIcType == RFIC_UNKNOWN))
+
+/*
+ BBP sections
+*/
+#define BBP_R0 0 /* version */
+#define BBP_R1 1 /* TSSI */
+#define BBP_R2 2 /* TX configure */
+#define BBP_R3 3
+#define BBP_R4 4
+#define BBP_R5 5
+#define BBP_R6 6
+#define BBP_R10 10 /* Rate report */
+#define BBP_R14 14 /* RX configure */
+#define BBP_R16 16
+#define BBP_R17 17 /* RX sensibility */
+#define BBP_R18 18
+#define BBP_R20 20
+#define BBP_R21 21
+#define BBP_R22 22
+#define BBP_R23 23
+#define BBP_R24 24
+#define BBP_R25 25
+#define BBP_R26 26
+#define BBP_R27 27
+#define BBP_R31 31
+#define BBP_R47 47
+#define BBP_R49 49 /*TSSI */
+#define BBP_R50 50
+#define BBP_R51 51
+#define BBP_R52 52
+#define BBP_R53 53
+#define BBP_R54 54
+#define BBP_R55 55
+#define BBP_R60 60
+#define BBP_R57 57
+#define BBP_R58 58
+#define BBP_R62 62 /* Rx SQ0 Threshold HIGH */
+#define BBP_R63 63
+#define BBP_R64 64
+#define BBP_R65 65
+#define BBP_R66 66
+#define BBP_R67 67
+#define BBP_R68 68
+#define BBP_R69 69
+#define BBP_R70 70 /* Rx AGC SQ CCK Xcorr threshold */
+#define BBP_R73 73
+#define BBP_R74 74
+#define BBP_R75 75
+#define BBP_R76 76
+#define BBP_R77 77
+#define BBP_R78 78
+#define BBP_R79 79
+#define BBP_R80 80
+#define BBP_R81 81
+#define BBP_R82 82
+#define BBP_R83 83
+#define BBP_R84 84
+#define BBP_R85 85
+#define BBP_R86 86
+#define BBP_R88 88
+#define BBP_R91 91
+#define BBP_R92 92
+#define BBP_R94 94 /* Tx Gain Control */
+#define BBP_R95 95
+#define BBP_R98 98
+#define BBP_R99 99
+#define BBP_R101 101
+#define BBP_R103 103
+#define BBP_R104 104
+#define BBP_R105 105
+#define BBP_R106 106
+#define BBP_R107 107
+#define BBP_R108 108
+#define BBP_R109 109
+#define BBP_R110 110
+#define BBP_R113 113
+#define BBP_R114 114
+#define BBP_R115 115
+#define BBP_R116 116
+#define BBP_R117 117
+#define BBP_R118 118
+#define BBP_R119 119
+#define BBP_R120 120
+#define BBP_R121 121
+#define BBP_R122 122
+#define BBP_R123 123
+#define BBP_R126 126
+#define BBP_R127 127
+#define BBP_R128 128
+#define BBP_R129 129
+#define BBP_R130 130
+#define BBP_R131 131
+#define BBP_R133 133
+#define BBP_R134 134
+#define BBP_R135 135
+#define BBP_R137 137
+#define BBP_R138 138 /* add by johnli, RF power sequence setup, ADC dynamic on/off control */
+#define BBP_R140 140
+#define BBP_R141 141
+#define BBP_R142 142
+#define BBP_R143 143
+#define BBP_R148 148
+#define BBP_R150 150
+#define BBP_R151 151
+#define BBP_R152 152
+#define BBP_R153 153
+#define BBP_R154 154
+#define BBP_R155 155
+#define BBP_R158 158 /* Calibration register are accessed through R158 and R159 */
+#define BBP_R159 159
+#define BBP_R160 160 /* Tx BF control */
+#define BBP_R161 161
+#define BBP_R162 162
+#define BBP_R163 163
+#define BBP_R164 164
+#define BBP_R165 165
+#define BBP_R166 166
+#define BBP_R167 167
+
+#define BBP_R173 173
+#define BBP_R174 174
+#define BBP_R175 175
+#define BBP_R176 176
+#define BBP_R177 177
+#define BBP_R178 178
+#define BBP_R179 179
+#define BBP_R180 180
+#define BBP_R181 181
+#define BBP_R182 182
+#define BBP_R184 184
+#define BBP_R185 185
+#define BBP_R186 186
+#define BBP_R187 187
+#define BBP_R188 188
+#define BBP_R189 189
+#define BBP_R190 190
+#define BBP_R191 191
+#define BBP_R195 195
+#define BBP_R196 196
+#define BBP_R241 241
+#define BBP_R242 242
+#define BBP_R244 244
+#define BBP_R250 250
+#define BBP_R253 253
+#define BBP_R254 254
+#define BBP_R255 255
+
+#define BBPR94_DEFAULT 0x06 /* Add 1 value will gain 1db */
+
+typedef enum{
+ RX_CHAIN_0 = 1<<0,
+ RX_CHAIN_1 = 1<<1,
+ RX_CHAIN_2 = 1<<2,
+ RX_CHAIN_ALL = 0xf
+}RX_CHAIN_IDX;
+
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R47_STRUC {
+ struct
+ {
+ UCHAR Adc6On:1;
+ UCHAR Reserved:2;
+ UCHAR TssiMode:2;
+ UCHAR TssiUpdateReq:1;
+ UCHAR TssiReportSel:2;
+ } field;
+
+ UCHAR byte;
+} BBP_R47_STRUC, *PBBP_R47_STRUC;
+#else
+typedef union _BBP_R47_STRUC {
+ struct
+ {
+ UCHAR TssiReportSel:2;
+ UCHAR TssiUpdateReq:1;
+ UCHAR TssiMode:2;
+ UCHAR Reserved:2;
+ UCHAR Adc6On:1;
+ } field;
+
+ UCHAR byte;
+} BBP_R47_STRUC, *PBBP_R47_STRUC;
+#endif
+
+/* */
+/* BBP R49 TSSI (Transmit Signal Strength Indicator) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R49_STRUC {
+ struct
+ {
+ UCHAR adc5_in_sel:1; /* 0: TSSI (from the external components, old version), 1: PSI (internal components, new version - RT3390) */
+ UCHAR bypassTSSIAverage:1; /* 0: the average TSSI (the average of the 16 samples), 1: the current TSSI */
+ UCHAR Reserved:1; /* Reserved field */
+ UCHAR TSSI:5; /* TSSI value */
+ } field;
+
+ UCHAR byte;
+} BBP_R49_STRUC, *PBBP_R49_STRUC;
+#else
+typedef union _BBP_R49_STRUC {
+ struct
+ {
+ UCHAR TSSI:5; /* TSSI value */
+ UCHAR Reserved:1; /* Reserved field */
+ UCHAR bypassTSSIAverage:1; /* 0: the average TSSI (the average of the 16 samples), 1: the current TSSI */
+ UCHAR adc5_in_sel:1; /* 0: TSSI (from the external components, old version), 1: PSI (internal components, new version - RT3390) */
+ } field;
+
+ UCHAR byte;
+} BBP_R49_STRUC, *PBBP_R49_STRUC;
+#endif
+
+/* */
+/* BBP R105 (FEQ control, MLD control and SIG remodulation) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R105_STRUC {
+ struct
+ {
+ UCHAR Reserve1:4; /* Reserved field */
+ UCHAR EnableSIGRemodulation:1; /* Enable the channel estimation updates based on remodulation of L-SIG and HT-SIG symbols. */
+ UCHAR MLDFor2Stream:1; /* Apply Maximum Likelihood Detection (MLD) for 2 stream case (reserved field if single RX) */
+ UCHAR IndependentFeedForwardCompensation:1; /* Apply independent feed-forward compensation for independent stream. */
+ UCHAR DetectSIGOnPrimaryChannelOnly:1; /* Under 40 MHz band, detect SIG on primary channel only. */
+ } field;
+
+ UCHAR byte;
+} BBP_R105_STRUC, *PBBP_R105_STRUC;
+#else
+typedef union _BBP_R105_STRUC {
+ struct
+ {
+ UCHAR DetectSIGOnPrimaryChannelOnly:1; /* Under 40 MHz band, detect SIG on primary channel only. */
+ UCHAR IndependentFeedForwardCompensation:1; /* Apply independent feed-forward compensation for independent stream. */
+ UCHAR MLDFor2Stream:1; /* Apply Maximum Likelihood Detection (MLD) for 2 stream case (reserved field if single RX) */
+ UCHAR EnableSIGRemodulation:1; /* Enable the channel estimation updates based on remodulation of L-SIG and HT-SIG symbols. */
+ UCHAR Reserve1:4; /* Reserved field */
+ } field;
+
+ UCHAR byte;
+} BBP_R105_STRUC, *PBBP_R105_STRUC;
+#endif
+
+/* */
+/* BBP R106 (GI remover) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R106_STRUC {
+ struct
+ {
+ UCHAR EnableLowPowerFSD:1; /* enable/disable the low power FSD */
+ UCHAR ShortGI_Offset40:4; /* Delay GI remover when the short GI is detected in 40MHz band (40M sampling rate) */
+ UCHAR ShortGI_Offset20:3; /* Delay GI remover when the short GI is detected in 20MHz band (20M sampling rate) */
+ } field;
+
+ UCHAR byte;
+} BBP_R106_STRUC, *PBBP_R106_STRUC;
+#else
+typedef union _BBP_R106_STRUC {
+ struct
+ {
+ UCHAR ShortGI_Offset20:3; /* Delay GI remover when the short GI is detected in 20MHz band (20M sampling rate) */
+ UCHAR ShortGI_Offset40:4; /* Delay GI remover when the short GI is detected in 40MHz band (40M sampling rate) */
+ UCHAR EnableLowPowerFSD:1; /* enable/disable the low power FSD */
+ } field;
+
+ UCHAR byte;
+} BBP_R106_STRUC, *PBBP_R106_STRUC;
+#endif
+
+/* */
+/* BBP R109 (Tx power control in 0.1dB step) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R109_STRUC {
+ struct
+ {
+ UCHAR Tx1PowerCtrl:4; /* Tx1 power control in 0.1dB step (valid: 0~10) */
+ UCHAR Tx0PowerCtrl:4; /* Tx0 power control in 0.1dB step (valid: 0~10) */
+ } field;
+
+ UCHAR byte;
+} BBP_R109_STRUC, *PBBP_R109_STRUC;
+#else
+typedef union _BBP_R109_STRUC {
+ struct
+ {
+ UCHAR Tx0PowerCtrl:4; /* Tx0 power control in 0.1dB step (valid: 0~10) */
+ UCHAR Tx1PowerCtrl:4; /* Tx0 power control in 0.1dB step (valid: 0~10) */
+ } field;
+
+ UCHAR byte;
+} BBP_R109_STRUC, *PBBP_R109_STRUC;
+#endif
+
+/* */
+/* BBP R110 (Tx power control in 0.1dB step) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R110_STRUC {
+ struct
+ {
+ UCHAR Tx2PowerCtrl:4; /* Tx2 power control in 0.1dB step (valid: 0~10) */
+ UCHAR AllTxPowerCtrl:4; /* All transmitters' fine power control in 0.1dB (valid: 0~10) */
+ } field;
+
+ UCHAR byte;
+} BBP_R110_STRUC, *PBBP_R110_STRUC;
+#else
+typedef union _BBP_R110_STRUC {
+ struct
+ {
+ UCHAR AllTxPowerCtrl:4; /* All transmitters' fine power control in 0.1dB (valid: 0~10) */
+ UCHAR Tx2PowerCtrl:4; /* Tx2 power control in 0.1dB step (valid: 0~10) */
+ } field;
+
+ UCHAR byte;
+} BBP_R110_STRUC, *PBBP_R110_STRUC;
+#endif
+
+/* */
+/* BBP R179 (Test config #1) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R179_STRUC {
+ struct
+ {
+ UCHAR DataIndex1:8; /* Data index #1 */
+ } field;
+
+ UCHAR byte;
+} BBP_R179_STRUC, *PBBP_R179_STRUC;
+#else
+typedef union _BBP_R179_STRUC {
+ struct
+ {
+ UCHAR DataIndex1:8; /* Data index #1 */
+ } field;
+
+ UCHAR byte;
+} BBP_R179_STRUC, *PBBP_R179_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+/* */
+/* BBP R180 (Test config #2) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R180_STRUC {
+ struct
+ {
+ UCHAR DataIndex2:8; /* Data index #2 */
+ } field;
+
+ UCHAR byte;
+} BBP_R180_STRUC, *PBBP_R180_STRUC;
+#else
+typedef union _BBP_R180_STRUC {
+ struct
+ {
+ UCHAR DataIndex2:8; /* Data index #2 */
+ } field;
+
+ UCHAR byte;
+} BBP_R180_STRUC, *PBBP_R180_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+/* */
+/* BBP R182 (Test data port) */
+/* */
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_R182_STRUC {
+ struct
+ {
+ UCHAR DataArray:8; /* Data array indexed by BBP R179 and R180 */
+ } field;
+
+ UCHAR byte;
+} BBP_R182_STRUC, *PBBP_R182_STRUC;
+#else
+typedef union _BBP_R182_STRUC {
+ struct
+ {
+ UCHAR DataArray:8; /* Data array indexed by BBP R179 and R180 */
+ } field;
+
+ UCHAR byte;
+} BBP_R182_STRUC, *PBBP_R182_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+#if defined(RT5370) || defined(RT5390) || defined(RT3290) //for hw antenna diversity (PPAD)
+ #define MAX_BBP_ID 255
+#elif defined(RT30xx)
+ /* edit by johnli, RF power sequence setup, add BBP R138 for ADC dynamic on/off control */
+ #define MAX_BBP_ID 185
+#elif defined(RT2883)
+ #define MAX_BBP_ID 180
+#else
+ #define MAX_BBP_ID 136
+#endif /* RT30xx */
+
+ #define MAX_BBP_MSG_SIZE 2048
+
+
+
+
+/* */
+/* BBP & RF are using indirect access. Before write any value into it. */
+/* We have to make sure there is no outstanding command pending via checking busy bit. */
+/* */
+#define MAX_BUSY_COUNT 100 /* Number of retry before failing access BBP & RF indirect register */
+
+/*#define PHY_TR_SWITCH_TIME 5 // usec */
+
+/*#define BBP_R17_LOW_SENSIBILITY 0x50 */
+/*#define BBP_R17_MID_SENSIBILITY 0x41 */
+/*#define BBP_R17_DYNAMIC_UP_BOUND 0x40 */
+
+#define RSSI_FOR_VERY_LOW_SENSIBILITY -35
+#define RSSI_FOR_LOW_SENSIBILITY -58
+#define RSSI_FOR_MID_LOW_SENSIBILITY -65 /*-80*/
+#define RSSI_FOR_MID_SENSIBILITY -90
+
+/*****************************************************************************
+ RF register Read/Write marco definition
+ *****************************************************************************/
+
+#ifdef RTMP_MAC_USB
+#define RTMP_RF_IO_WRITE32(_A, _V) RTUSBWriteRFRegister(_A, _V)
+#endif /* RTMP_MAC_USB */
+
+
+/*****************************************************************************
+ BBP register Read/Write marco definitions.
+ we read/write the bbp value by register's ID.
+ Generate PER to test BA
+ *****************************************************************************/
+
+#ifdef CARRIER_DETECTION_SUPPORT
+/*TONE_RADAR_DETECT_V2*/
+#define RTMP_CARRIER_IO_READ8(_A, _I, _V) \
+{ \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, BBP_R184, _I); \
+ RTMP_BBP_IO_READ8_BY_REG_ID(_A, BBP_R185, _V); \
+}
+#define RTMP_CARRIER_IO_WRITE8(_A, _I, _V) \
+{ \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, BBP_R184, _I); \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, BBP_R185, _V); \
+}
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#ifdef DFS_SUPPORT
+#define RTMP_DFS_IO_READ8(_A, _I, _V) \
+{ \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, BBP_R140, _I); \
+ RTMP_BBP_IO_READ8_BY_REG_ID(_A, BBP_R141, _V); \
+}
+
+#define RTMP_DFS_IO_WRITE8(_A, _I, _V) \
+{ \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, BBP_R140, _I); \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, BBP_R141, _V); \
+}
+#endif /*DFS_SUPPORT*/
+
+#ifdef RTMP_MAC_USB
+#ifndef MT7601
+#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTUSBReadBBPRegister(_A, _I, _pV)
+#define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) RTUSBWriteBBPRegister(_A, _I, _V)
+#define BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) RTUSBWriteBBPRegister(_A, _I, _V)
+#define BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTUSBReadBBPRegister(_A, _I, _pV)
+#endif /* MT7601 */
+#endif /* RTMP_MAC_USB */
+
+#ifdef MT7601
+NDIS_STATUS MT7601_BBP_write(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN UCHAR regID,
+ IN UCHAR value);
+
+NDIS_STATUS MT7601_BBP_read(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN UCHAR regID,
+ IN UCHAR *pValue);
+
+#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) MT7601_BBP_read(_A, _I, _pV)
+#define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) MT7601_BBP_write(_A, _I, _V)
+#define BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) MT7601_BBP_write(_A, _I, _V)
+#define BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) MT7601_BBP_read(_A, _I, _pV)
+#endif /* MT7601 */
+
+
+
+#if defined(RT30xx) || defined(MT7601)
+
+#define RTMP_ASIC_MMPS_DISABLE(_pAd) \
+ do{ \
+ UCHAR _bbpData = 0; \
+ UINT32 _macData; \
+ /* disable MMPS BBP control register */ \
+ RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \
+ _bbpData &= ~(0x04); \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_pAd, BBP_R3, _bbpData); \
+ \
+ /* disable MMPS MAC control register */ \
+ RTMP_IO_READ32(_pAd, 0x1210, &_macData); \
+ _macData &= ~(0x09); \
+ RTMP_IO_WRITE32(_pAd, 0x1210, _macData); \
+ }while(0)
+
+
+#define RTMP_ASIC_MMPS_ENABLE(_pAd) \
+ do{ \
+ UCHAR _bbpData = 0; \
+ UINT32 _macData; \
+ /* enable MMPS BBP control register */ \
+ RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \
+ _bbpData |= (0x04); \
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(_pAd, BBP_R3, _bbpData); \
+ \
+ /* enable MMPS MAC control register */ \
+ RTMP_IO_READ32(_pAd, 0x1210, &_macData); \
+ _macData |= (0x09); \
+ RTMP_IO_WRITE32(_pAd, 0x1210, _macData); \
+ }while(0)
+#endif /* defined(RT30xx) || defined(MT7601) */
+
+
+struct _RMTP_ADAPTER;
+
+INT rtmp_bbp_set_bw(struct _RTMP_ADAPTER *pAd, INT bw);
+INT rtmp_bbp_set_ctrlch(struct _RTMP_ADAPTER *pAd, INT ext_ch);
+INT rtmp_bbp_set_rxpath(struct _RTMP_ADAPTER *pAd, INT rxpath);
+INT rtmp_bbp_set_txdac(struct _RTMP_ADAPTER *pAd, INT tx_dac);
+INT rtmp_bbp_set_mmps(struct _RTMP_ADAPTER *pAd, BOOLEAN ReduceCorePower);
+INT rtmp_bbp_is_ready(struct _RTMP_ADAPTER *pAd);
+INT rtmp_bbp_set_agc(struct _RTMP_ADAPTER *pAd, UCHAR agc, RX_CHAIN_IDX idx);
+INT rtmp_bbp_get_agc(struct _RTMP_ADAPTER *pAd, CHAR *agc, RX_CHAIN_IDX idx);
+INT rtmp_bbp_set_filter_coefficient_ctrl(struct _RTMP_ADAPTER *pAd, UCHAR Channel);
+UCHAR rtmp_bbp_get_random_seed(struct _RTMP_ADAPTER *pAd);
+
+NDIS_STATUS NICInitBBP(struct _RTMP_ADAPTER *pAd);
+
+#endif /* __RTMP_PHY_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/chlist.h b/cleopatre/devkit/mt7601udrv/include/chlist.h
new file mode 100644
index 0000000000..4eeb7757e9
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/chlist.h
@@ -0,0 +1,150 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ chlist.c
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __CHLIST_H__
+#define __CHLIST_H__
+
+#include "rtmp_type.h"
+#include "rtmp_def.h"
+
+
+typedef struct _CH_DESC {
+ UCHAR FirstChannel;
+ UCHAR NumOfCh;
+ UCHAR ChannelProp;
+}CH_DESC, *PCH_DESC;
+
+typedef struct _COUNTRY_REGION_CH_DESC {
+ UCHAR RegionIndex;
+ PCH_DESC pChDesc;
+}COUNTRY_REGION_CH_DESC, *PCOUNTRY_REGION_CH_DESC;
+
+#ifdef EXT_BUILD_CHANNEL_LIST
+#define ODOR 0
+#define IDOR 1
+#define BOTH 2
+
+typedef struct _CH_DESP {
+ UCHAR FirstChannel;
+ UCHAR NumOfCh;
+ CHAR MaxTxPwr; /* dBm */
+ UCHAR Geography; /* 0:out door, 1:in door, 2:both */
+ BOOLEAN DfsReq; /* Dfs require, 0: No, 1: yes. */
+} CH_DESP, *PCH_DESP;
+
+typedef struct _CH_REGION {
+ UCHAR CountReg[3];
+ UCHAR DfsType; /* 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56 */
+ CH_DESP *pChDesp;
+} CH_REGION, *PCH_REGION;
+
+extern CH_REGION ChRegion[];
+#endif /* EXT_BUILD_CHANNEL_LIST */
+
+#ifdef SINGLE_SKU_V2
+#define SINGLE_SKU_TABLE_LENGTH (SINGLE_SKU_TABLE_CCK_LENGTH+SINGLE_SKU_TABLE_OFDM_LENGTH+(SINGLE_SKU_TABLE_HT_LENGTH*2))
+
+#define SINGLE_SKU_TABLE_CCK_LENGTH 4
+#define SINGLE_SKU_TABLE_OFDM_LENGTH 8
+#define SINGLE_SKU_TABLE_HT_LENGTH 16
+
+typedef struct _CH_POWER_{
+ struct _CH_POWER_ *pNext;
+ UCHAR StartChannel;
+ UCHAR num;
+ UCHAR *Channel;
+ UCHAR PwrCCK[SINGLE_SKU_TABLE_CCK_LENGTH];
+ UCHAR PwrOFDM[SINGLE_SKU_TABLE_OFDM_LENGTH];
+ UCHAR PwrHT20[SINGLE_SKU_TABLE_HT_LENGTH];
+ UCHAR PwrHT40[SINGLE_SKU_TABLE_HT_LENGTH];
+}CH_POWER;
+#endif /* SINGLE_SKU_V2 */
+
+typedef struct _CH_FREQ_MAP_{
+ UINT16 channel;
+ UINT16 freqKHz;
+}CH_FREQ_MAP;
+
+extern CH_FREQ_MAP CH_HZ_ID_MAP[];
+extern int CH_HZ_ID_MAP_NUM;
+
+
+#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \
+ RTMP_MapChannelID2KHZ(_ch, (UINT32 *)&(_khz))
+#define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \
+ RTMP_MapKHZ2ChannelID(_khz, (INT *)&(_ch))
+
+/* Check if it is Japan W53(ch52,56,60,64) channel. */
+#define JapanChannelCheck(_ch) ((_ch == 52) || (_ch == 56) || (_ch == 60) || (_ch == 64))
+
+
+#ifdef EXT_BUILD_CHANNEL_LIST
+VOID BuildChannelListEx(
+ IN PRTMP_ADAPTER pAd);
+
+VOID BuildBeaconChList(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pBuf,
+ OUT PULONG pBufLen);
+#endif /* EXT_BUILD_CHANNEL_LIST */
+
+#ifdef DOT11_N_SUPPORT
+VOID N_ChannelCheck(RTMP_ADAPTER *pAd);
+UCHAR N_SetCenCh(RTMP_ADAPTER *pAd, UCHAR channel);
+BOOLEAN N_ChannelGroupCheck(RTMP_ADAPTER *pAd, UCHAR channel);
+
+#endif /* DOT11_N_SUPPORT */
+
+UINT8 GetCuntryMaxTxPwr(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT8 channel);
+
+VOID RTMP_MapChannelID2KHZ(
+ IN UCHAR Ch,
+ OUT UINT32 *pFreq);
+
+VOID RTMP_MapKHZ2ChannelID(
+ IN ULONG Freq,
+ OUT INT *pCh);
+
+UCHAR GetChannel_5GHZ(
+ IN PCH_DESC pChDesc,
+ IN UCHAR index);
+
+UCHAR GetChannel_2GHZ(
+ IN PCH_DESC pChDesc,
+ IN UCHAR index);
+
+UCHAR GetChannelFlag(
+ IN PCH_DESC pChDesc,
+ IN UCHAR index);
+
+UINT16 TotalChNum(
+ IN PCH_DESC pChDesc);
+
+#endif /* __CHLIST_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/client_wds.h b/cleopatre/devkit/mt7601udrv/include/client_wds.h
new file mode 100644
index 0000000000..691583498e
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/client_wds.h
@@ -0,0 +1,59 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ client_wds.h
+
+ Abstract:
+*/
+
+#ifndef __CLIENT_WDS_H__
+#define __CLIENT_WDS_H__
+
+#include "client_wds_cmm.h"
+
+VOID CliWds_ProxyTabInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID CliWds_ProxyTabDestory(
+ IN PRTMP_ADAPTER pAd);
+
+PCLIWDS_PROXY_ENTRY CliWdsEntyAlloc(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID CliWdsEntyFree(
+ IN PRTMP_ADAPTER pAd,
+ IN PCLIWDS_PROXY_ENTRY pCliWdsEntry);
+
+
+PUCHAR CliWds_ProxyLookup(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pMac);
+
+
+VOID CliWds_ProxyTabUpdate(
+ IN PRTMP_ADAPTER pAd,
+ IN SHORT Aid,
+ IN PUCHAR pMac);
+
+
+VOID CliWds_ProxyTabMaintain(
+ IN PRTMP_ADAPTER pAd);
+
+#endif /* __CLIENT_WDS_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/client_wds_cmm.h b/cleopatre/devkit/mt7601udrv/include/client_wds_cmm.h
new file mode 100644
index 0000000000..5043b1ae3d
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/client_wds_cmm.h
@@ -0,0 +1,46 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ client_wds_cmm.h
+
+ Abstract:
+*/
+
+#ifndef __CLIENT_WDS_CMM_H__
+#define __CLIENT_WDS_CMM_H__
+
+#include "rtmp_def.h"
+
+#ifdef CLIENT_WDS
+
+
+#define CLI_WDS_ENTRY_AGEOUT 5000 /* seconds */
+
+#define CLIWDS_POOL_SIZE 128
+#define CLIWDS_HASH_TAB_SIZE 64 /* the legth of hash table must be power of 2. */
+typedef struct _CLIWDS_PROXY_ENTRY {
+ struct _CLIWDS_PROXY_ENTRY * pNext;
+ ULONG LastRefTime;
+ SHORT Aid;
+ UCHAR Addr[MAC_ADDR_LEN];
+} CLIWDS_PROXY_ENTRY, *PCLIWDS_PROXY_ENTRY;
+
+#endif /* CLIENT_WDS */
+
+#endif /* __CLIENT_WDS_CMM_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_aes.h b/cleopatre/devkit/mt7601udrv/include/crypt_aes.h
new file mode 100644
index 0000000000..ab763ceb21
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_aes.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ AES
+
+ Abstract:
+ RFC 3394: Advanced Encryption Standard (AES) Key Wrap Algorithm
+ RFC 3601: Counter with CBC-MAC (CCM)
+ RFC 4493: The AES-CMAC Algorithm
+ FIPS PUBS 197: ADVANCED ENCRYPTION STANDARD (AES)
+ NIST 800-38A: Recommendation for Block Cipher Modes of Operation
+ NIST 800-38C: The CCM Mode for Authentication and Confidentiality
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2009/05/19 Create AES-Key Wrap
+ Eddy 2009/04/20 Create AES-CMAC, AES-CCM
+ Eddy 2009/01/19 Create AES-128, AES-192, AES-256, AES-CBC
+***************************************************************************/
+
+#ifndef __CRYPT_AES_H__
+#define __CRYPT_AES_H__
+
+#include "rt_config.h"
+
+
+/* AES definition & structure */
+#define AES_STATE_ROWS 4 /* Block size: 4*4*8 = 128 bits */
+#define AES_STATE_COLUMNS 4
+#define AES_BLOCK_SIZES AES_STATE_ROWS*AES_STATE_COLUMNS
+#define AES_KEY_ROWS 4
+#define AES_KEY_COLUMNS 8 /*Key length: 4*{4,6,8}*8 = 128, 192, 256 bits */
+#define AES_KEY128_LENGTH 16
+#define AES_KEY192_LENGTH 24
+#define AES_KEY256_LENGTH 32
+#define AES_CBC_IV_LENGTH 16
+
+typedef struct {
+ UINT8 State[AES_STATE_ROWS][AES_STATE_COLUMNS];
+ UINT8 KeyWordExpansion[AES_KEY_ROWS][AES_KEY_ROWS*((AES_KEY256_LENGTH >> 2) + 6 + 1)];
+} AES_CTX_STRUC, *PAES_CTX_STRUC;
+
+
+/* AES operations */
+VOID RT_AES_KeyExpansion (
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ INOUT AES_CTX_STRUC *paes_ctx);
+
+VOID RT_AES_Encrypt (
+ IN UINT8 PlainBlock[],
+ IN UINT PlainBlockSize,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ OUT UINT8 CipherBlock[],
+ INOUT UINT *CipherBlockSize);
+
+VOID RT_AES_Decrypt (
+ IN UINT8 CipherBlock[],
+ IN UINT CipherBlockSize,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ OUT UINT8 PlainBlock[],
+ INOUT UINT *PlainBlockSize);
+
+/* AES Counter with CBC-MAC operations */
+VOID AES_CCM_MAC (
+ IN UINT8 Payload[],
+ IN UINT PayloadLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ IN UINT8 Nonce[],
+ IN UINT NonceLength,
+ IN UINT8 AAD[],
+ IN UINT AADLength,
+ IN UINT MACLength,
+ OUT UINT8 MACText[]);
+
+INT AES_CCM_Encrypt (
+ IN UINT8 PlainText[],
+ IN UINT PlainTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ IN UINT8 Nonce[],
+ IN UINT NonceLength,
+ IN UINT8 AAD[],
+ IN UINT AADLength,
+ IN UINT MACLength,
+ OUT UINT8 CipherText[],
+ INOUT UINT *CipherTextLength);
+
+INT AES_CCM_Decrypt (
+ IN UINT8 CipherText[],
+ IN UINT CipherTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ IN UINT8 Nonce[],
+ IN UINT NonceLength,
+ IN UINT8 AAD[],
+ IN UINT AADLength,
+ IN UINT MACLength,
+ OUT UINT8 PlainText[],
+ INOUT UINT *PlainTextLength);
+
+/* AES-CMAC operations */
+VOID AES_CMAC_GenerateSubKey (
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ OUT UINT8 SubKey1[],
+ OUT UINT8 SubKey2[]);
+
+VOID AES_CMAC (
+ IN UINT8 PlainText[],
+ IN UINT PlainTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ OUT UINT8 MACText[],
+ INOUT UINT *MACTextLength);
+
+
+
+/* AES-CBC operations */
+VOID AES_CBC_Encrypt (
+ IN UINT8 PlainText[],
+ IN UINT PlainTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ IN UINT8 IV[],
+ IN UINT IVLength,
+ OUT UINT8 CipherText[],
+ INOUT UINT *CipherTextLength);
+
+VOID AES_CBC_Decrypt (
+ IN UINT8 CipherText[],
+ IN UINT CipherTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ IN UINT8 IV[],
+ IN UINT IVLength,
+ OUT UINT8 PlainText[],
+ INOUT UINT *PlainTextLength);
+
+/* AES key wrap operations */
+INT AES_Key_Wrap (
+ IN UINT8 PlainText[],
+ IN UINT PlainTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ OUT UINT8 CipherText[],
+ OUT UINT *CipherTextLength);
+
+INT AES_Key_Unwrap (
+ IN UINT8 CipherText[],
+ IN UINT CipherTextLength,
+ IN UINT8 Key[],
+ IN UINT KeyLength,
+ OUT UINT8 PlainText [],
+ OUT UINT *PlainTextLength);
+
+
+#endif /* __CRYPT_AES_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_arc4.h b/cleopatre/devkit/mt7601udrv/include/crypt_arc4.h
new file mode 100644
index 0000000000..63d87ce356
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_arc4.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ RC4
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2009/05/13 ARC4
+***************************************************************************/
+
+#ifndef __CRYPT_ARC4_H__
+#define __CRYPT_ARC4_H__
+
+#include "rt_config.h"
+
+/* ARC4 definition & structure */
+#define ARC4_KEY_BLOCK_SIZE 256
+
+typedef struct {
+ UINT BlockIndex1;
+ UINT BlockIndex2;
+ UINT8 KeyBlock[256];
+} ARC4_CTX_STRUC, *PARC4_CTX_STRUC;
+
+/* ARC4 operations */
+VOID ARC4_INIT(
+ IN ARC4_CTX_STRUC * pARC4_CTX,
+ IN PUCHAR pKey,
+ IN UINT KeyLength);
+
+VOID ARC4_Compute(
+ IN ARC4_CTX_STRUC * pARC4_CTX,
+ IN UINT8 InputBlock[],
+ IN UINT InputBlockSize,
+ OUT UINT8 OutputBlock[]);
+
+VOID ARC4_Discard_KeyLength(
+ IN ARC4_CTX_STRUC * pARC4_CTX,
+ IN UINT Length);
+
+#endif /* __CRYPT_ARC4_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_biginteger.h b/cleopatre/devkit/mt7601udrv/include/crypt_biginteger.h
new file mode 100644
index 0000000000..8fe20c6111
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_biginteger.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ BigInteger
+
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2009/01/12 Create
+***************************************************************************/
+
+#ifndef __CRYPT_BIGINTEGER_H__
+#define __CRYPT_BIGINTEGER_H__
+
+#include "rt_config.h"
+
+
+/* BigInteger definition & structure */
+#define SLIDING_WINDOW 16
+typedef struct _BIG_INTEGER_STRUC
+{
+ STRING Name[10];
+ UINT32 *pIntegerArray;
+ UINT AllocSize;
+ UINT ArrayLength;
+ UINT IntegerLength;
+ INT Signed;
+} BIG_INTEGER, *PBIG_INTEGER;
+
+
+/* BigInteger operations */
+VOID BigInteger_Print (
+ IN PBIG_INTEGER pBI);
+
+VOID BigInteger_Init (
+ INOUT PBIG_INTEGER *pBI);
+
+VOID BigInteger_Free_AllocSize (
+ IN PBIG_INTEGER *pBI);
+
+VOID BigInteger_Free (
+ IN PBIG_INTEGER *pBI);
+
+VOID BigInteger_AllocSize (
+ IN PBIG_INTEGER *pBI,
+ IN INT Length);
+
+VOID BigInteger_ClearHighBits (
+ IN PBIG_INTEGER pBI);
+
+VOID BigInteger_BI2Bin (
+ IN PBIG_INTEGER pBI,
+ OUT UINT8 *pValue,
+ OUT UINT *Length);
+
+VOID BigInteger_Bin2BI (
+ IN UINT8 *pValue,
+ IN UINT Length,
+ OUT PBIG_INTEGER *pBI);
+
+VOID BigInteger_BitsOfBI (
+ IN PBIG_INTEGER pBI,
+ OUT UINT *Bits_Of_P);
+
+INT BigInteger_GetBitValue (
+ IN PBIG_INTEGER pBI,
+ IN UINT Index);
+
+UINT8 BigInteger_GetByteValue (
+ IN PBIG_INTEGER pBI,
+ IN UINT Index);
+
+VOID BigInteger_Copy (
+ IN PBIG_INTEGER pBI_Copied,
+ OUT PBIG_INTEGER *pBI_Result);
+
+INT BigInteger_UnsignedCompare (
+ IN PBIG_INTEGER pFirstOperand,
+ IN PBIG_INTEGER pSecondOperand);
+
+VOID BigInteger_Add (
+ IN PBIG_INTEGER pFirstOperand,
+ IN PBIG_INTEGER pSecondOperand,
+ OUT PBIG_INTEGER *pBI_Result);
+
+VOID BigInteger_Sub (
+ IN PBIG_INTEGER pFirstOperand,
+ IN PBIG_INTEGER pSecondOperand,
+ OUT PBIG_INTEGER *pBI_Result);
+
+VOID BigInteger_Mul (
+ IN PBIG_INTEGER pFirstOperand,
+ IN PBIG_INTEGER pSecondOperand,
+ OUT PBIG_INTEGER *pBI_Result);
+
+VOID BigInteger_Square (
+ IN PBIG_INTEGER pBI,
+ OUT PBIG_INTEGER *pBI_Result);
+
+VOID BigInteger_Div (
+ IN PBIG_INTEGER pFirstOperand,
+ IN PBIG_INTEGER pSecondOperand,
+ OUT PBIG_INTEGER *pBI_Result,
+ OUT PBIG_INTEGER *pBI_Remainder);
+
+VOID BigInteger_Montgomery_Reduction (
+ IN PBIG_INTEGER pBI_A,
+ IN PBIG_INTEGER pBI_P,
+ IN PBIG_INTEGER pBI_R,
+ OUT PBIG_INTEGER *pBI_Result);
+
+VOID BigInteger_Montgomery_ExpMod (
+ IN PBIG_INTEGER pBI_G,
+ IN PBIG_INTEGER pBI_E,
+ IN PBIG_INTEGER pBI_P,
+ OUT PBIG_INTEGER *pBI_Result);
+
+
+#endif /* __CRYPT_BIGINTEGER_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_dh.h b/cleopatre/devkit/mt7601udrv/include/crypt_dh.h
new file mode 100644
index 0000000000..b1cdab015c
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_dh.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ DH
+
+ Abstract:
+ RFC 2631: Diffie-Hellman Key Agreement Method
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2009/01/21 Create Diffie-Hellman, Montgomery Algorithm
+***************************************************************************/
+
+#ifndef __CRYPT_DH_H__
+#define __CRYPT_DH_H__
+
+#include "rt_config.h"
+
+
+/* DH operations */
+void DH_PublicKey_Generate (
+ IN UINT8 GValue[],
+ IN UINT GValueLength,
+ IN UINT8 PValue[],
+ IN UINT PValueLength,
+ IN UINT8 PrivateKey[],
+ IN UINT PrivateKeyLength,
+ OUT UINT8 PublicKey[],
+ INOUT UINT *PublicKeyLength);
+
+void DH_SecretKey_Generate (
+ IN UINT8 PublicKey[],
+ IN UINT PublicKeyLength,
+ IN UINT8 PValue[],
+ IN UINT PValueLength,
+ IN UINT8 PrivateKey[],
+ IN UINT PrivateKeyLength,
+ OUT UINT8 SecretKey[],
+ INOUT UINT *SecretKeyLength);
+
+#define RT_DH_PublicKey_Generate(GK, GKL, PV, PVL, PriK, PriKL, PubK, PubKL) \
+ DH_PublicKey_Generate((GK), (GKL), (PV), (PVL), (PriK), (PriKL), (UINT8 *) (PubK), (UINT *) (PubKL))
+
+#define RT_DH_SecretKey_Generate(PubK, PubKL, PV, PVL, PriK, PriKL, SecK, SecKL) \
+ DH_SecretKey_Generate((PubK), (PubKL), (PV), (PVL), (PriK), (PriKL), (UINT8 *) (SecK), (UINT *) (SecKL))
+
+#define RT_DH_FREE_ALL()
+
+
+#endif /* __CRYPT_DH_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_hmac.h b/cleopatre/devkit/mt7601udrv/include/crypt_hmac.h
new file mode 100644
index 0000000000..e6dd220f84
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_hmac.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ HMAC
+
+ Abstract:
+ FIPS 198: The Keyed-Hash Message Authentication Code (HMAC)
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2008/11/24 Create HMAC-SHA1, HMAC-SHA256
+***************************************************************************/
+
+#ifndef __CRYPT_HMAC_H__
+#define __CRYPT_HMAC_H__
+
+#include "rt_config.h"
+
+
+#ifdef SHA1_SUPPORT
+#define HMAC_SHA1_SUPPORT
+VOID RT_HMAC_SHA1(
+ IN const UINT8 Key[],
+ IN UINT KeyLen,
+ IN const UINT8 Message[],
+ IN UINT MessageLen,
+ OUT UINT8 MAC[],
+ IN UINT MACLen);
+#endif /* SHA1_SUPPORT */
+
+#ifdef SHA256_SUPPORT
+#define HMAC_SHA256_SUPPORT
+VOID RT_HMAC_SHA256(
+ IN const UINT8 Key[],
+ IN UINT KeyLen,
+ IN const UINT8 Message[],
+ IN UINT MessageLen,
+ OUT UINT8 MAC[],
+ IN UINT MACLen);
+#endif /* SHA256_SUPPORT */
+
+#ifdef MD5_SUPPORT
+#define HMAC_MD5_SUPPORT
+VOID RT_HMAC_MD5(
+ IN const UINT8 Key[],
+ IN UINT KeyLen,
+ IN const UINT8 Message[],
+ IN UINT MessageLen,
+ OUT UINT8 MAC[],
+ IN UINT MACLen);
+#endif /* MD5_SUPPORT */
+
+
+#endif /* __CRYPT_HMAC_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_md5.h b/cleopatre/devkit/mt7601udrv/include/crypt_md5.h
new file mode 100644
index 0000000000..60cf5d3bae
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_md5.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ MD5
+
+ Abstract:
+ RFC1321: The MD5 Message-Digest Algorithm
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2008/11/24 Create md5
+***************************************************************************/
+
+#ifndef __CRYPT_MD5_H__
+#define __CRYPT_MD5_H__
+
+
+/* Algorithm options */
+#define MD5_SUPPORT
+
+#ifdef MD5_SUPPORT
+#define MD5_BLOCK_SIZE 64 /* 512 bits = 64 bytes */
+#define MD5_DIGEST_SIZE 16 /* 128 bits = 16 bytes */
+typedef struct {
+ UINT32 HashValue[4];
+ UINT64 MessageLen;
+ UINT8 Block[MD5_BLOCK_SIZE];
+ UINT BlockLen;
+} MD5_CTX_STRUC, *PMD5_CTX_STRUC;
+
+VOID RT_MD5_Init(
+ IN MD5_CTX_STRUC * pMD5_CTX);
+VOID RT_MD5_Hash(
+ IN MD5_CTX_STRUC * pMD5_CTX);
+VOID RT_MD5_Append(
+ IN MD5_CTX_STRUC * pMD5_CTX,
+ IN const UINT8 Message[],
+ IN UINT MessageLen);
+VOID RT_MD5_End(
+ IN MD5_CTX_STRUC * pMD5_CTX,
+ OUT UINT8 DigestMessage[]);
+VOID RT_MD5(
+ IN const UINT8 Message[],
+ IN UINT MessageLen,
+ OUT UINT8 DigestMessage[]);
+#endif /* MD5_SUPPORT */
+
+
+#endif /* __CRYPT_MD5_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/crypt_sha2.h b/cleopatre/devkit/mt7601udrv/include/crypt_sha2.h
new file mode 100644
index 0000000000..9d2e43e52f
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/crypt_sha2.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+ Module Name:
+ SHA2
+
+ Abstract:
+ FIPS 180-2: Secure Hash Standard (SHS)
+
+ Revision History:
+ Who When What
+ -------- ---------- ------------------------------------------
+ Eddy 2008/11/24 Create SHA1
+ Eddy 2008/07/23 Create SHA256
+***************************************************************************/
+
+#ifndef __CRYPT_SHA2_H__
+#define __CRYPT_SHA2_H__
+
+
+/* Algorithm options */
+#define SHA1_SUPPORT
+#define SHA256_SUPPORT
+
+#ifdef SHA1_SUPPORT
+#define SHA1_BLOCK_SIZE 64 /* 512 bits = 64 bytes */
+#define SHA1_DIGEST_SIZE 20 /* 160 bits = 20 bytes */
+typedef struct _SHA1_CTX_STRUC {
+ UINT32 HashValue[5]; /* 5 = (SHA1_DIGEST_SIZE / 32) */
+ UINT64 MessageLen; /* total size */
+ UINT8 Block[SHA1_BLOCK_SIZE];
+ UINT BlockLen;
+} SHA1_CTX_STRUC, *PSHA1_CTX_STRUC;
+
+VOID RT_SHA1_Init(
+ IN SHA1_CTX_STRUC * pSHA_CTX);
+VOID RT_SHA1_Hash(
+ IN SHA1_CTX_STRUC * pSHA_CTX);
+VOID RT_SHA1_Append(
+ IN SHA1_CTX_STRUC * pSHA_CTX,
+ IN const UINT8 Message[],
+ IN UINT MessageLen);
+VOID RT_SHA1_End(
+ IN SHA1_CTX_STRUC * pSHA_CTX,
+ OUT UINT8 DigestMessage[]);
+VOID RT_SHA1(
+ IN const UINT8 Message[],
+ IN UINT MessageLen,
+ OUT UINT8 DigestMessage[]);
+#endif /* SHA1_SUPPORT */
+
+#ifdef SHA256_SUPPORT
+#define SHA256_BLOCK_SIZE 64 /* 512 bits = 64 bytes */
+#define SHA256_DIGEST_SIZE 32 /* 256 bits = 32 bytes */
+typedef struct _SHA256_CTX_STRUC {
+ UINT32 HashValue[8]; /* 8 = (SHA256_DIGEST_SIZE / 32) */
+ UINT64 MessageLen; /* total size */
+ UINT8 Block[SHA256_BLOCK_SIZE];
+ UINT BlockLen;
+} SHA256_CTX_STRUC, *PSHA256_CTX_STRUC;
+
+VOID RT_SHA256_Init(
+ IN SHA256_CTX_STRUC * pSHA_CTX);
+VOID RT_SHA256_Hash(
+ IN SHA256_CTX_STRUC * pSHA_CTX);
+VOID RT_SHA256_Append(
+ IN SHA256_CTX_STRUC * pSHA_CTX,
+ IN const UINT8 Message[],
+ IN UINT MessageLen);
+VOID RT_SHA256_End(
+ IN SHA256_CTX_STRUC * pSHA_CTX,
+ OUT UINT8 DigestMessage[]);
+VOID RT_SHA256(
+ IN const UINT8 Message[],
+ IN UINT MessageLen,
+ OUT UINT8 DigestMessage[]);
+#endif /* SHA256_SUPPORT */
+
+
+#endif /* __CRYPT_SHA2_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/cs.h b/cleopatre/devkit/mt7601udrv/include/cs.h
new file mode 100644
index 0000000000..97ead5beaf
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/cs.h
@@ -0,0 +1,172 @@
+#ifndef __CS_H__
+#define __CS_H__
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#define CARRIER_DETECT_RECHECK_TIME 3
+#define CARRIER_GONE_TRESHOLD 10 /* Radar tone count in 1 sec */
+#define CARRIER_DETECT_THRESHOLD 0x0fffffff
+#define CARRIER_DETECT_STOP_RATIO 2
+#define CARRIER_DETECT_STOP_RECHECK_TIME 4
+#define CARRIER_DETECT_DEFAULT_MASK 20
+#define CARRIER_DETECT_DELTA 7
+#define CARRIER_DETECT_DIV_FLAG 0
+#define CD_INT_POLLING_CMD 0x67
+#define CARRIER_DETECT_CRITIRIA 7000
+
+typedef enum CD_STATE_n {
+ CD_NORMAL,
+ CD_SILENCE,
+ CD_MAX_STATE
+} CD_STATE;
+
+typedef enum _TONE_RADAR_VERSION {
+ DISABLE_TONE_RADAR = 0,
+ TONE_RADAR_V1,
+ TONE_RADAR_V2
+} TONE_RADAR_VERSION;
+
+typedef struct CARRIER_DETECTION_s {
+ BOOLEAN Enable;
+ UINT8 CDSessionTime;
+ UINT8 CDPeriod;
+ CD_STATE CD_State;
+ UINT8 delta;
+ UINT8 SymRund;
+ UINT8 div_flag;
+ UINT32 threshold;
+ UINT8 recheck;
+ UINT8 recheck1;
+ UINT32 TimeStamp; /*unit:16us*/
+ UINT32 criteria;
+ ULONG idle_time;
+ ULONG busy_time;
+ ULONG Debug;
+ ULONG OneSecIntCount;
+ UINT8 CarrierGoneThreshold;
+ UCHAR VGA_Mask;
+ UCHAR Packet_End_Mask;
+ UCHAR Rx_PE_Mask;
+} CARRIER_DETECTION_STRUCT, *PCARRIER_DETECTION_STRUCT;
+
+#ifdef CARRIER_DETECTION_FIRMWARE_SUPPORT
+/* Mcu command */
+#define CD_ONOFF_MCU_CMD 0x65
+#define CD_CHECKOUT_MCU_CMD 0x66
+/* share memory offsets */
+#define CD_CRITERIA 0x4CB2
+#define CD_CHECK_COUNT 0x4CB9
+#define RADAR_TONE_COUNT 0x4CBE
+#define CD_RECHECK 0x4CBF
+#undef CARRIER_DETECT_RECHECK_TIME
+#undef CARRIER_GONE_TRESHOLD
+#undef CARRIER_DETECT_THRESHOLD
+#define CARRIER_DETECT_RECHECK_TIME 5
+#define CARRIER_GONE_TRESHOLD 35
+#define CARRIER_DETECT_THRESHOLD 0x4fffffff
+
+/* Parameters needed to decide the Carrier Detect State */
+typedef struct _CARRIER_DETECT_PARAM {
+ UINT8 RadarToneCount; /* Number of radar tones in 100 msec*/
+ UINT8 ReCheck;
+} CARRIER_DETECT_PARAM, *PCARRIER_DETECT_PARAM;
+
+/* For debug print */
+typedef struct _CARRIER_DETECT_DEBUG {
+ UINT8 delta_div;
+ UINT8 internalRadarToneCount;
+ UINT16 Criteria;
+ UINT32 Threshold;
+ UINT8 Count;
+ UINT8 CheckCount;
+ UINT8 Reserved;
+ UINT8 VGA_Mask;
+ UINT8 PckMask;
+ UINT8 RxPeMask;
+ UINT8 RadarToneCount;
+ UINT8 ReCheck;
+} CARRIER_DETECT_DEBUG, *PCARRIER_DETECT_DEBUG;
+#endif /*CARRIER_DETECTION_FIRMWARE_SUPPORT*/
+
+INT isCarrierDetectExist(
+ IN PRTMP_ADAPTER pAd);
+
+INT CarrierDetectReset(
+ IN PRTMP_ADAPTER pAd);
+
+extern VOID RtmpOsMsDelay(
+ IN ULONG msec);
+
+INT Set_CarrierCriteria_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierReCheck_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierGoneThreshold_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierStopCheck_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierDebug_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierDelta_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierDivFlag_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierThrd_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+/* v2 functions */
+INT Set_CarrierSymRund_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CarrierMask_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+VOID CSInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID CarrierDetectionStart(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPHandleRadarInterrupt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID CarrierDetectionStop(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ToneRadarProgram_v1(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG threshold);
+
+VOID ToneRadarProgram_v2(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG threshold);
+
+#ifdef CARRIER_DETECTION_FIRMWARE_SUPPORT
+VOID CarrierDetectionPeriodicStateCtrl(
+ IN PRTMP_ADAPTER pAd);
+#endif /* CARRIER_DETECTION_FIRMWARE_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+INT Set_CarrierDetect_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /*CONFIG_AP_SUPPORT*/
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#endif /*__CS_H__*/
diff --git a/cleopatre/devkit/mt7601udrv/include/dfs.h b/cleopatre/devkit/mt7601udrv/include/dfs.h
new file mode 100644
index 0000000000..ce14884205
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/dfs.h
@@ -0,0 +1,571 @@
+
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ dfs.h
+
+ Abstract:
+ Support DFS function.
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Fonchi 03-12-2007 created
+*/
+#ifndef __DFS_H__
+#define __DFS_H__
+
+/*************************************************************************
+ *
+ * DFS Radar related definitions.
+ *
+ ************************************************************************/
+
+#ifdef DFS_SUPPORT
+#define RADAR_DEBUG_SHOW_RAW_EVENT 0x01 /* Show the 384-bytes raw data of event buffer */
+#define RADAR_DEBUG_EVENT 0x02 /* Show effective event reads out from the event buffer */
+#define RADAR_DEBUG_SILENCE 0x04
+#define RADAR_DEBUG_SW_SILENCE 0x08
+#define RADAR_DONT_SWITCH 0x10 /* Don't Switch channel when hit */
+#define RADAR_DEBUG_DONT_CHECK_BUSY 0x20
+#define RADAR_DEBUG_DONT_CHECK_RSSI 0x40
+#define RADAR_SIMULATE 0x80 /* simulate a short pulse hit this channel */
+
+/* McuCmd */
+#define DFS_ONOFF_MCU_CMD 0x64
+
+/*#define DFS_SW_RADAR_DECLARE_THRES 3*/
+#define DFS_EVENT_SIZE 6 /* Number of bytes of each DFS event */
+#define DFS_EVENT_BUFFER_SIZE 384 /* Number of bytes of a DFS event buffer */
+#define DFS_SW_RADAR_CHECK_LOOP 50
+#define DFS_SW_RADAR_SHIFT 3
+#define DFS_SW_RADAR_CH0_ERR 8
+#define DFS_SW_RADAR_PERIOD_ERR 4
+#define CE_STAGGERED_RADAR_CH0_H_ERR (DFS_SW_RADAR_CH0_ERR + 16) // the step is 16 for every 0.1 us different in width
+#define CE_STAGGERED_RADAR_DECLARE_THRES 2
+
+#define NEW_DFS_FCC_5_ENT_NUM 5
+#define NEW_DFS_DBG_PORT_ENT_NUM_POWER 8
+#define NEW_DFS_DBG_PORT_ENT_NUM (1 << NEW_DFS_DBG_PORT_ENT_NUM_POWER) /* CE Debug Port entry number, 256 */
+#define NEW_DFS_DBG_PORT_MASK (NEW_DFS_DBG_PORT_ENT_NUM - 1) /* 0xff */
+
+#define CH_BUSY_SAMPLE_POWER 3
+#define CH_BUSY_SAMPLE (1 << CH_BUSY_SAMPLE_POWER)
+#define CH_BUSY_MASK (CH_BUSY_SAMPLE - 1)
+
+#define MAX_FDF_NUMBER 5 /* max false-detection-filter number */
+
+/* Matched Period definition */
+#define NEW_DFS_MPERIOD_ENT_NUM_POWER 8
+#define NEW_DFS_MPERIOD_ENT_NUM (1 << NEW_DFS_MPERIOD_ENT_NUM_POWER) /* CE Period Table entry number, 512 */
+#define NEW_DFS_CHANNEL_0 1
+#define NEW_DFS_CHANNEL_1 2
+#define NEW_DFS_CHANNEL_2 4
+#define NEW_DFS_CHANNEL_3 8
+#define NEW_DFS_CHANNEL_4 16
+#define NEW_DFS_CHANNEL_5 32
+
+#define NEW_DFS_MAX_CHANNEL 5
+
+#define CE_SW_CHECK 3
+
+#define NEW_DFS_WATCH_DOG_TIME 1 /* note that carrier detection also need timer interrupt hook*/
+
+#define NEW_DFS_FCC 0x1 /* include Japan*/
+#define NEW_DFS_EU 0x2
+#define NEW_DFS_JAP 0x4
+#define NEW_DFS_JAP_W53 0x8
+#define NEW_DFS_END 0xff
+#define MAX_VALID_RADAR_W 5
+#define MAX_VALID_RADAR_T 5
+
+#define DFS_SW_RADAR_CH1_SHIFT 3
+#define DFS_SW_RADAR_CH2_SHIFT 3
+
+#define CE_STAGGERED_RADAR_PERIOD_MAX ((133333 + 125000 + 117647 + 1000) * 2)
+#define FCC_RADAR_PERIOD_MAX (((28570 << 1) + 1000) * 2)
+#define JAP_RADAR_PERIOD_MAX (((80000 << 1) + 1000) * 2)
+
+#define NEW_DFS_BANDWITH_MONITOR_TIME (NEW_DFS_CHECK_TIME / NEW_DFS_CHECK_TIME_TASKLET)
+#define NEW_DFS_CHECK_TIME 300
+#define NEW_DFS_CHECK_TIME_TASKLET 3
+
+/*#define DFS_SW_RADAR_DECLARE_THRES 3*/
+
+#define DFS_SW_RADAR_SHIFT 3
+
+#define DFS_SW_RADAR_CH0_ERR 8
+
+#define CE_STAGGERED_RADAR_CH0_H_ERR (DFS_SW_RADAR_CH0_ERR + 16) /* the step is 16 for every 0.1 us different in width*/
+
+#define CE_STAGGERED_RADAR_DECLARE_THRES 2
+
+
+/* DFS Macros */
+#define PERIOD_MATCH(a, b, c) ((a >= b)? ((a-b) <= c):((b-a) <= c))
+#define ENTRY_PLUS(a, b, c) (((a+b) < c)? (a+b) : (a+b-c))
+#define ENTRY_MINUS(a, b, c) ((a >= b)? (a - b) : (a+c-b))
+#define MAX_PROCESS_ENTRY 16
+
+#define IS_FCC_RADAR_1(HT_BW, T) (((HT_BW)? ((T > 57120) && (T < 57160)) : (T > 28560) && (T < 28580)))
+#define IS_W53_RADAR_2(HT_BW, T) (((HT_BW)? ((T > 153820) && (T < 153872)) : (T > 76910) && (T < 76936)))
+#define IS_W56_RADAR_3(HT_BW, T) (((HT_BW)? ((T > 159900) && (T < 160100)) : (T > 79950) && (T < 80050)))
+
+#define DFS_EVENT_SANITY_CHECK(_pAd, _DfsEvent) \
+ !(((_DfsEvent).EngineId >= _pAd->chipCap.DfsEngineNum) || \
+ ((_DfsEvent).TimeStamp & 0xffc00000) || \
+ ((_DfsEvent).Width & 0xe000))
+
+#define DFS_EVENT_PRINT(_DfsEvent) \
+ DBGPRINT(RT_DEBUG_ERROR, ( "EngineId = %u, Timestamp = %u, Width = %u\n", \
+ _DfsEvent.EngineId, _DfsEvent.TimeStamp, _DfsEvent.Width));
+
+
+#define DFS_EVENT_BUFF_PRINT(_StarIdx, _TableIdx, _BufSize) \
+{ \
+ UINT32 k; \
+ for (k = _StarIdx; k < _BufSize; k++) \
+ { \
+ DBGPRINT(RT_DEBUG_TRACE, ("0x%02x ", _TableIdx[k])); \
+ if(k%DFS_EVENT_SIZE == ((DFS_EVENT_SIZE-1+_StarIdx)%DFS_EVENT_SIZE)) \
+ DBGPRINT(RT_DEBUG_TRACE, ("\n")); \
+ } \
+}
+
+/* check whether we can do DFS detection or not */
+#define DFS_CHECK_FLAGS(_pAd, _pRadarDetect) \
+ !((_pAd->Dot11_H.RDMode == RD_SWITCHING_MODE) || \
+ (_pRadarDetect->bDfsInit == FALSE) || \
+ (_pRadarDetect->DFSAPRestart == 1))
+
+#ifdef RTMP_MAC_USB
+#define INIT_DFS_EVENT_BUFF_SHARED_MEMORY(_pAd, _StartOffset, _NumOfPages, _InitVal) \
+{ \
+ UINT32 i = 0; \
+ for (i = _StartOffset; i < _StartOffset + (_NumOfPages*384); i++) \
+ RTUSBSingleWrite(_pAd, i, _InitVal, FALSE); \
+ \
+ RTMP_IO_WRITE32(_pAd, BBPR127TABLE_OWNERID, 0x01010101); \
+ RTMP_IO_WRITE32(_pAd, BBPR127TABLE_OWNERID + 4, 0x01010101); \
+}
+#endif /* RTMP_MAC_USB */
+
+typedef enum _DFS_VERSION {
+ SOFTWARE_DFS = 0,
+ HARDWARE_DFS_V1,
+ HARDWARE_DFS_V2
+} DFS_VERSION;
+
+typedef struct _NewDFSValidRadar
+{
+ USHORT type;
+ USHORT channel; /* bit map*/
+ USHORT WLow;
+ USHORT WHigh;
+ USHORT W; /* for fixed width radar*/
+ USHORT WMargin;
+ ULONG TLow;
+ ULONG THigh;
+ ULONG T; /* for fixed period radar */
+ USHORT TMargin;
+}NewDFSValidRadar, *pNewDFSValidRadar;
+
+typedef struct _NewDFSDebugPort {
+ ULONG counter;
+ ULONG timestamp;
+ USHORT width;
+ USHORT start_idx; /* start index to period table */
+ USHORT end_idx; /* end index to period table */
+} NewDFSDebugPort, *pNewDFSDebugPort;
+
+/* Matched Period Table */
+typedef struct _NewDFSMPeriod {
+ USHORT idx;
+ USHORT width;
+ USHORT idx2;
+ USHORT width2;
+ ULONG period;
+} NewDFSMPeriod, *pNewDFSMPeriod;
+
+
+
+typedef struct _NewDFSParam {
+ BOOLEAN valid;
+ UCHAR mode;
+ USHORT avgLen;
+ USHORT ELow;
+ USHORT EHigh;
+ USHORT WLow;
+ USHORT WHigh;
+ UCHAR EpsilonW;
+ ULONG TLow;
+ ULONG THigh;
+ UCHAR EpsilonT;
+ ULONG BLow;
+ ULONG BHigh;
+} NewDFSParam, *pNewDFSParam;
+
+typedef struct _DFS_PROGRAM_PARAM{
+ NewDFSParam NewDFSTableEntry[NEW_DFS_MAX_CHANNEL*4];
+ USHORT ChEnable; /* Enabled Dfs channels (bit wise)*/
+ UCHAR DeltaDelay;
+ /* Support after dfs_func >= 2 */
+ UCHAR Symmetric_Round;
+ UCHAR VGA_Mask;
+ UCHAR Packet_End_Mask;
+ UCHAR Rx_PE_Mask;
+ ULONG RadarEventExpire[NEW_DFS_MAX_CHANNEL];
+}DFS_PROGRAM_PARAM, *PDFS_PROGRAM_PARAM;
+
+typedef struct _NewDFSTable
+{
+ USHORT type;
+ NewDFSParam entry[NEW_DFS_MAX_CHANNEL];
+}NewDFSTable, *pNewDFSTable;
+
+#ifdef DFS_DEBUG
+typedef struct _NewDFSDebugResult
+{
+ char delta_delay_shift;
+ char EL_shift;
+ char EH_shift;
+ char WL_shift;
+ char WH_shift;
+ ULONG hit_time;
+ ULONG false_time;
+}NewDFSDebugResult, *pNewDFSDebugResult;
+#endif
+
+typedef struct _DFS_EVENT{
+ UINT8 EngineId;
+ UINT32 TimeStamp;
+ UINT16 Width;
+}DFS_EVENT, *PDFS_EVENT;
+
+typedef struct _DFS_SW_DETECT_PARAM{
+ NewDFSDebugPort FCC_5[NEW_DFS_FCC_5_ENT_NUM];
+ UCHAR fcc_5_idx;
+ UCHAR fcc_5_last_idx;
+ USHORT fcc_5_threshold; /* to check the width of long pulse radar */
+ USHORT dfs_width_diff_ch1_Shift;
+ USHORT dfs_width_diff_ch2_Shift;
+ USHORT dfs_period_err;
+ ULONG dfs_max_period; /* Max possible Period */
+ USHORT dfs_width_diff;
+ USHORT dfs_width_ch0_err_L;
+ USHORT dfs_width_ch0_err_H;
+ UCHAR dfs_check_loop;
+ UCHAR dfs_declare_thres;
+ ULONG dfs_w_counter;
+ DFS_EVENT PreDfsEvent; /* previous radar event */
+ UINT32 EvtDropAdjTime; /* timing threshold for adjacent event */
+ UINT sw_idx[NEW_DFS_MAX_CHANNEL];
+ UINT hw_idx[NEW_DFS_MAX_CHANNEL];
+ UINT pr_idx[NEW_DFS_MAX_CHANNEL];
+ USHORT dfs_t_idx[NEW_DFS_MAX_CHANNEL];
+ USHORT dfs_w_idx[NEW_DFS_MAX_CHANNEL];
+ USHORT dfs_w_last_idx[NEW_DFS_MAX_CHANNEL];
+ NewDFSDebugPort DFS_W[NEW_DFS_MAX_CHANNEL][NEW_DFS_DBG_PORT_ENT_NUM];
+ NewDFSMPeriod DFS_T[NEW_DFS_MAX_CHANNEL][NEW_DFS_MPERIOD_ENT_NUM]; /* period table */
+ /*UCHAR ce_sw_id_check;*/
+ /*USHORT ce_sw_t_diff;*/
+ /*ULONG fcc_5_counter;*/
+ /* CE Staggered radar / weather radar */
+#ifdef DFS_DEBUG
+ /* Roger debug */
+ UCHAR DebugPort[384];
+ UCHAR DebugPortPrint; /* 0 = stop, 1 = log req, 2 = loging, 3 = log done */
+ ULONG TotalEntries[4];
+ ULONG T_Matched_2;
+ ULONG T_Matched_3;
+ ULONG T_Matched_4;
+ ULONG T_Matched_5;
+ UCHAR BBP127Repeat;
+ ULONG CounterStored[5];
+ ULONG CounterStored2[5];
+ ULONG CounterStored3;
+ NewDFSDebugPort CE_DebugCh0[NEW_DFS_DBG_PORT_ENT_NUM];
+ NewDFSMPeriod CE_TCh0[NEW_DFS_MPERIOD_ENT_NUM];
+#endif
+}DFS_SW_DETECT_PARAM, *PDFS_SW_DETECT_PARAM;
+
+/***************************************************************************
+ * structure for radar detection and channel switch
+ **************************************************************************/
+typedef struct _RADAR_DETECT_STRUCT {
+ UCHAR DFSAPRestart;
+ ULONG MCURadarRegion;
+ CHAR AvgRssiReq;
+ ULONG DfsLowerLimit;
+ ULONG DfsUpperLimit;
+ ULONG upperlimit;
+ ULONG lowerlimit;
+ ULONG TimeStamp; /*unit: 1us*/
+ UCHAR ChirpCheck; /* anounce on second detection of chirp radar */
+ UCHAR bChannelSwitchInProgress; /* RDMode could cover this*/
+ BOOLEAN bDfsSwDisable; /* disable sotfwre check */
+ BOOLEAN bDfsInit; /* to indicate if dfs regs has been initialized */
+ USHORT PollTime;
+ INT DfsRssiHigh;
+ INT DfsRssiLow;
+ BOOLEAN DfsRssiHighFromCfg;
+ BOOLEAN DfsRssiLowFromCfg;
+ BOOLEAN DfsRssiHighCfgValid;
+ BOOLEAN DfsRssiLowCfgValid;
+ BOOLEAN DFSParamFromConfig;
+ BOOLEAN use_tasklet;
+ DFS_VERSION dfs_func;
+ BOOLEAN DFSWatchDogIsRunning;
+ UCHAR radarDeclared;
+ BOOLEAN SymRoundFromCfg;
+ BOOLEAN SymRoundCfgValid;
+ ULONG idle_time;
+ ULONG busy_time;
+ UCHAR ch_busy;
+ CHAR ch_busy_countdown;
+ UCHAR busy_channel;
+ UCHAR ch_busy_idle_ratio;
+ BOOLEAN BusyIdleFromCfg;
+ BOOLEAN BusyIdleCfgValid;
+ UCHAR print_ch_busy_sta;
+ ULONG ch_busy_sta[CH_BUSY_SAMPLE];
+ ULONG ch_idle_sta[CH_BUSY_SAMPLE];
+ UCHAR ch_busy_sta_index;
+ INT ch_busy_sum;
+ INT ch_idle_sum;
+ UCHAR fdf_num;
+ USHORT ch_busy_threshold[MAX_FDF_NUMBER];
+ INT rssi_threshold[MAX_FDF_NUMBER];
+ UCHAR McuRadarDebug;
+ USHORT McuRadarTick;
+ ULONG RadarTimeStampHigh;
+ ULONG RadarTimeStampLow;
+ UCHAR EnabledChMask; /* Bit-wise mask for enabled DFS channels */
+ DFS_PROGRAM_PARAM DfsProgramParam;
+ DFS_SW_DETECT_PARAM DfsSwParam;
+} RADAR_DETECT_STRUCT, *PRADAR_DETECT_STRUCT;
+
+typedef struct _NewDFSProgParam
+{
+ UCHAR channel;
+ UCHAR mode; /* reg 0x10, Detection Mode[2:0]*/
+ USHORT avgLen; /* reg 0x11~0x12, M[7:0] & M[8]*/
+ USHORT ELow; /* reg 0x13~0x14, Energy Low[7:0] & Energy Low[11:8]*/
+ USHORT EHigh; /* reg 0x15~0x16, Energy High[7:0] & Energy High[11:8]*/
+ USHORT WLow; /* reg 0x28~0x29, Width Low[7:0] & Width Low[11:8]*/
+ USHORT WHigh; /* reg 0x2a~0x2b, Width High[7:0] & Width High[11:8]*/
+ UCHAR EpsilonW; /* reg 0x2c, Width Delta[7:0], (Width Measurement Uncertainty) */
+ ULONG TLow; /* reg 0x17~0x1a, Period Low[7:0] & Period Low[15:8] & Period Low[23:16] & Period Low[31:24]*/
+ ULONG THigh; /* reg 0x1b~0x1e, Period High[7:0] & Period High[15:8] & Period High[23:16] & Period High[31:24]*/
+ UCHAR EpsilonT; /* reg 0x27, Period Delt[7:0], (Period Measurement Uncertainty) */
+ ULONG BLow; /* reg 0x1f~0x22, Burst Low[7:0] & Burst Low[15:8] & Burst Low[23:16] & Burst Low[31:24]*/
+ ULONG BHigh; /* reg 0x23~0x26, Burst High[7:0] & Burst High[15:8] & Burst High[23:16] & Burst High[31:24] */
+}NewDFSProgParam, *pNewDFSProgParam;
+
+#ifdef CONFIG_AP_SUPPORT
+VOID NewRadarDetectionStart(
+ IN PRTMP_ADAPTER pAd);
+
+VOID NewRadarDetectionStop(
+ IN PRTMP_ADAPTER pAd);
+
+void modify_table1(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG idx,
+ IN ULONG value);
+
+void modify_table2(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG idx,
+ IN ULONG value);
+
+void schedule_dfs_task(
+ IN PRTMP_ADAPTER pAd);
+
+int SWRadarCheck(
+ IN PRTMP_ADAPTER pAd, USHORT id);
+
+VOID NewRadarDetectionProgram(
+ IN PRTMP_ADAPTER pAd,
+ IN pNewDFSTable pDFS2Table);
+
+BOOLEAN DfsSwCheckOnHwDetection(
+ IN PRTMP_ADAPTER pAd,
+ IN pNewDFSTable pDFS2Table,
+ IN UINT8 DfsChannel,
+ IN ULONG RadarPeriod,
+ IN ULONG RadarWidth);
+
+INT Set_RfReg_Proc(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+INT Show_BlockCh_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RadarDebug_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ResetRadarHwDetect_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DfsSwDisable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DfsEnvtDropAdjTime_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RadarStart_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RadarStop_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RadarSetTbl1_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RadarSetTbl2_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Fcc5Thrd_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ChBusyThrd_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RssiThrd_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PollTime_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PrintBusyIdle_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RadarSim_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BusyIdleRatio_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DfsRssiHigh_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DfsRssiLow_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_EventExpire_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CEPrint_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Ch0LErr_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_MaxPeriod_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PeriodErr_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Ch0HErr_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Ch1Shift_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Ch2Shift_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DeclareThres_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CheckLoop_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef DFS_DEBUG
+INT Set_DfsLowerLimit_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DfsUpperLimit_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_FixDfsLimit_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_AvgRssiReq_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CEPrintDebug_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* DFS_DEBUG */
+
+void dfs_tasklet(unsigned long data);
+
+VOID DFSInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ApRadarDetectPeriodic(
+ IN PRTMP_ADAPTER pAd);
+
+
+
+#ifdef RTMP_MAC_USB
+ VOID NewUsbTimerCB_Radar(
+ IN PRTMP_ADAPTER pAd);
+#endif /* RTMP_MAC_USB */
+
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* DFS_SUPPORT */
+
+#endif /*_DFS_H__*/
+
diff --git a/cleopatre/devkit/mt7601udrv/include/dot11ac_vht.h b/cleopatre/devkit/mt7601udrv/include/dot11ac_vht.h
new file mode 100644
index 0000000000..c35efd9050
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/dot11ac_vht.h
@@ -0,0 +1,479 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ dot11ac_vht.h
+
+ Abstract:
+ Defined IE/frame structures of 802.11ac (D1.2).
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ Shiang Tu 01-11-2012 created for 11ac
+ */
+
+#ifdef DOT11_VHT_AC
+
+
+#ifndef __DOT11AC_VHT_H
+#define __DOT11AC_VHT_H
+
+#include "rtmp_type.h"
+
+
+#define IE_VHT_CAP 191
+#define IE_VHT_OP 192
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.160.2
+ VHT Capabilities Info field
+
+ max_mpdu_len: MAximun MPDU Length
+ ->Indicate the max MPDU length.
+ 0: 3895 octets(Max A-MSDU length in HT Cap set to 3839)
+ 1: 7991 octets(Max A-MSDU length in HT Cap set to 7935)
+ 2: 11454 octets(Max A-MSDU length in HT Cap set to 7935)
+ 3: reserved
+ ch_width: Supported Channel Width Set
+ ->Indicates the channel widths supported by the STA.
+ 0: the STA does not support either 160 or 80+80 MHz
+ 1: the STA support 160 MHz
+ 2: the STA support 160 MHz and 80 + 80 MHz
+ 3: reserved
+ rx_ldpc: Rx LDPC
+ -> Indicates support of receiving LDPC coded packets
+ 0: not support
+ 1: support
+ sgi_80M: Short GI for 80 MHz
+ -> Indicates short GI support for the reception of VHT+CBW80 packet
+ 0: not support
+ 1: support
+ sgi_160M: Short GI for 160 and 80 + 80 MHz
+ ->Indicates rx short GI for VHT+(CBW160 and CBW80+80) packet
+ 0: not support
+ 1: support
+ tx_stbc: Tx STBC
+ -> Indicates support for tx of at least 2x1 STBC
+ 0: not support
+ 1: support
+ rx_stbc: Rx STBC
+ -> Indicates support for rx of PPDUs using STBC
+ 0: not support
+ 1: support 1SS
+ 2: support 1SS and 2SS
+ 3: support 1SS, 2SS and 3SS
+ 4: support 1SS, 2SS, 3SS and 4SS
+ 5,6,7: reserved
+ bfer_cap_su: SU Beamformer Capable
+ ->Indicates support for operation as a single user beamformer
+ 0: not support
+ 1: support
+ bfee_cap_su: SU Beamformee Capable
+ -> Indicates support for operation as a single user beamformee
+ 0: not support
+ 1: support
+ cmp_st_num_bfer: Compressed Steering Number of Beamformer Antenna Supported
+ -> Beamformee's capability indicateing the max number of beamformer
+ antennas the beamformee can support when sending compressed
+ beamforming feedback
+ If SU beamformee capable, set to the max value minus 1.
+ otehrwise, reserved.
+ num_snd_dimension: Number of Sounding Dimensions
+ -> Beamformer's capability indicating the number of antennas used for
+ beamformed transmissions.
+ If SU beamformer capable, set to value minus 1.
+ otehrwise, reserved.
+ bfer_cap_mu: MU Beamformer Capable
+ -> Indicates support for operation as an MU beamformer
+ 0: if not supported or if sent by a non-AP STA
+ 1: supported
+ bfee_cap_mu: MU Beamformee Capable
+ -> Indicates support for operation as an MU beamformer
+ 0: if not supported or if snet by an AP
+ 1: supported
+ vht_txop_ps: VHT TXOP PS
+ -> Indicates whether or not the AP supports VHT TXOP Power Save Mode or
+ whether or not the STA is in VHT TXOP Power Save Mode
+ ->When tx by a VHT AP in the VHT Capabilities element included in Beacon,
+ ProbeResp, AssocResp, and ReassocResp, frames:
+ 0: if the VHT AP does not support VHT TXOP PS in the BSS.
+ 1: if the VHT AP support TXOP PS in the BSS.
+ ->When tx by a VHT non-AP STA in the VHT Capabilities element included
+ in AssocReq, ReassocReq and ProbReq frames:
+ 0: if the VHT STA is not in TXOP Power Save Mode.
+ 1: if the VHT STA is in TXOP Power Save Mode.
+ htc_vht_cap: +HTC-VHT Capable
+ -> Indicates whether or not the STA supports receiving an HT Control
+ field in the VHT format
+ 0: if not support
+ 1: if support
+ max_ampdu_exp: Maximum A-MPDU Length Exponent
+ -> Indicates the maximum length of A-MPDU pre-EOF padding that the STA
+ can receive.
+ ->The length defined by this field is equal to 2^(13 + max_ampdu_exp) -1
+ 0~7 : integer in the range of 0 to 7.
+ vht_link_adapt: VHT Link Adaptation Capable
+ -> Indicates whether or not the STA support link adaptation using VHT
+ variant HT Control field.
+ -> This field is ignored if the _HTC-VHT Capble field is set to 0.
+ 0: (No Feedback), if the STA does not provide VHT MFB
+ 2: (Unsolicited), if the STA provides only unsolicited VHT MFB
+ 3: (Both), if the STA can provide VHT MFB in response to VHT MRQ
+ and if the STA provides unsolicited VHT MFB.
+ 1: reserved
+ rx_ant_consistency: Rx Antenna Pattern Consistency
+ ->Indicates the possibility of Rx antenna pattern change
+ 0: if Rx antenna pattern might change during association
+ 1: if Rx antenna pattern does not change during association
+ tx_ant_consistency: Tx Antenna Pattern Consistency
+ ->Indicates the possibility of Tx antenna pattern change
+ 0: if Tx antenna pattern might change during association
+ 1: if Tx antenna pattern does not change during association
+*/
+typedef struct GNU_PACKED _VHT_CAP_INFO{
+#ifdef RT_BIG_ENDIAN
+ UINT32 rsv:2;
+ UINT32 tx_ant_consistency:1;
+ UINT32 rx_ant_consistency:1;
+ UINT32 vht_link_adapt:2;
+ UINT32 max_ampdu_exp:3;
+ UINT32 htc_vht_cap:1;
+ UINT32 vht_txop_ps:1;
+ UINT32 bfee_cap_mu:1;
+ UINT32 bfer_cap_mu:1;
+ UINT32 num_snd_dimension:3;
+
+ UINT32 cmp_st_num_bfer:3;
+ UINT32 bfee_cap_su:1;
+ UINT32 bfer_cap_su:1;
+ UINT32 rx_stbc:3;
+
+ UINT32 tx_stbc:1;
+ UINT32 sgi_160M:1;
+ UINT32 sgi_80M:1;
+ UINT32 rx_ldpc:1;
+ UINT32 ch_width:2;
+ UINT32 max_mpdu_len:2;
+#else
+ UINT32 max_mpdu_len:2; /* 0: 3895, 1: 7991, 2: 11454, 3: rsv */
+ UINT32 ch_width:2; /* */
+ UINT32 rx_ldpc:1;
+ UINT32 sgi_80M:1;
+ UINT32 sgi_160M:1;
+ UINT32 tx_stbc:1;
+
+ UINT32 rx_stbc:3;
+ UINT32 bfer_cap_su:1;
+ UINT32 bfee_cap_su:1;
+ UINT32 cmp_st_num_bfer:3;
+
+ UINT32 num_snd_dimension:3;
+ UINT32 bfer_cap_mu:1;
+ UINT32 bfee_cap_mu:1;
+ UINT32 vht_txop_ps:1;
+ UINT32 htc_vht_cap:1;
+ UINT32 max_ampdu_exp:3;
+ UINT32 vht_link_adapt:2;
+ UINT32 rx_ant_consistency:1;
+ UINT32 tx_ant_consistency:1;
+ UINT32 rsv:2;
+#endif /* RT_BIG_ENDIAN */
+}VHT_CAP_INFO;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.160.3
+ Rx MCS Map and Tx MCS map, figure 8-401bt
+
+ mcs_ss1: Max MCS for 1SS
+ mcs_ss2: Max MCS for 2SS
+ mcs_ss3: Max MCS for 3SS
+ mcs_ss4: Max MCS for 4SS
+ mcs_ss5: Max MCS for 5SS
+ mcs_ss6: Max MCS for 6SS
+ mcs_ss7: Max MCS for 7SS
+ mcs_ss8: Max MCS for 8SS
+
+ The 2-bit MAx MCS for n SS field for each number of spatial streams n = 1~8
+ is encoded as following:
+ 0: indicates support for MCS 0~7
+ 1: indicates support for MCS 0~8
+ 2: indicates support for MCS 0~9
+ 3: indicates that n spatial streams is not supported.
+ Note: some MCSs are not be valid for particular bandwidth and number of
+ spatial stream combinations.
+*/
+#define VHT_MCS_CAP_7 0
+#define VHT_MCS_CAP_8 1
+#define VHT_MCS_CAP_9 2
+#define VHT_MCS_CAP_NA 3
+
+typedef struct GNU_PACKED _VHT_MCS_MAP{
+#ifdef RT_BIG_ENDIAN
+ UINT16 mcs_ss8:2;
+ UINT16 mcs_ss7:2;
+ UINT16 mcs_ss6:2;
+ UINT16 mcs_ss5:2;
+ UINT16 mcs_ss4:2;
+ UINT16 mcs_ss3:2;
+ UINT16 mcs_ss2:2;
+ UINT16 mcs_ss1:2;
+#else
+ UINT16 mcs_ss1:2;
+ UINT16 mcs_ss2:2;
+ UINT16 mcs_ss3:2;
+ UINT16 mcs_ss4:2;
+ UINT16 mcs_ss5:2;
+ UINT16 mcs_ss6:2;
+ UINT16 mcs_ss7:2;
+ UINT16 mcs_ss8:2;
+#endif /* RT_BIG_ENDIAN */
+}VHT_MCS_MAP;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.160.3
+ VHT Supported MCS Set field, figure 8-401bs
+
+ rx_mcs_map: Rx MCS Map
+ -> Indicates the maximum MCS that can be received for each number of
+ spatial streams
+ See "VHT_MCS_MAP"
+ rx_high_rate: Rx Highest Supported Data Rate
+ -> Indicates the maximum data rate that the STA can receive
+ -> In unit of 1Mb/s where 1 represents 1Mb/s, and incrementing in steps
+ of 1 Mb/s.
+ -> If the maximum data rate expressed in Mb/s is not an integer, then
+ the value is rounded up to the next integer.
+ tx_mcs_map: Tx MCS Map
+ tx_high_rate: Tx Highest Supported Data Rate
+ -> Indicates the maximum data rate that the STA will transmit
+ -> In unit of 1Mb/s where 1 represents 1Mb/s, and incrementing in steps
+ of 1 Mb/s.
+ -> If the maximum data rate expressed in Mb/s is not an integer, then
+ the value is rounded up to the next integer.
+*/
+
+// TODO: shiang-6590, check the layout of this data structure!!!!
+typedef struct GNU_PACKED _VHT_MCS_SET{
+#ifdef RT_BIG_ENDIAN
+ UINT16 rsv2:3;
+ UINT16 tx_high_rate:13;
+ struct _VHT_MCS_MAP tx_mcs_map;
+ UINT16 rsv:3;
+ UINT16 rx_high_rate:13;
+ struct _VHT_MCS_MAP rx_mcs_map;
+#else
+ struct _VHT_MCS_MAP rx_mcs_map;
+ UINT16 rx_high_rate:13;
+ UINT16 rsv:3;
+ struct _VHT_MCS_MAP tx_mcs_map;
+ UINT16 tx_high_rate:13;
+ UINT16 rsv2:3;
+#endif /* RT_BIG_ENDIAN */
+}VHT_MCS_SET;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.160.1
+ VHT Capabilities Element structure
+
+ eid: Element ID
+ 191 (IE_VHT_CAP)
+ len: Length
+ 12
+ vht_cap: VHT Capabilities Info
+ ->contains a numner of fields that are used to advertise VHT capabilities
+ of a VHT STA
+ mcs_set: VHT supported MCS Set
+ ->Used to convey the combinations of MCSs and spatial streams a STA
+ supports for both reception and transmission.
+*/
+typedef struct GNU_PACKED _VHT_CAP_IE{
+ VHT_CAP_INFO vht_cap;
+ VHT_MCS_SET mcs_set;
+}VHT_CAP_IE;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.161
+ VHT Operation Information field, figure 8-401bv
+
+ The operation of VHT STAs in the BSS is controlled by the HT Operation
+ element and the VHT Operation element.
+
+ ch_width: Channel Width
+ -> This field, together with the HT Operation element STA Channel Width
+ field, defines the BSS operating channel width.
+ 0: for 20MHz or 40MHz operating channel width
+ 1: for 80MHz operating channel width
+ 2: for 160MHz operating channel width
+ 3: for 80+80MHz operating channel width
+ 4~255: reserved
+ center_freq_1: Channel Center Frequency Segment 1
+ -> Defines the channel center frequency for an 80 and 160MHz VHT BSS
+ and the segment 1 channel center frequency for an 80+90MHz VHT BSS.
+ -> For 80MHZ or 160MHz operating channel width, indicates the channel
+ center frequency index for the 80MHz or 160MHz channel on which the
+ VHT BSS operates.
+ ->For 80+80MHz operating channel width, indicates the channel center
+ frequency index for the 80MHz channel of frequency segment 1 on
+ which the VHT BSS operates.
+ ->Set 0 for 20MHz or 40MHz operating channel width.
+
+ center_freq_2: Channel Center Frequency Segment 2
+ -> Defines the seg 2 channel center frequency for an 80+80MHz VHT BSS
+ ->For a 80+80MHz operating channel width, indicates the channel center
+ frequency index of the 80MHz channel of frequency segment 2 on
+ which the VHT BSS operates. Reserved otherwise.
+*/
+typedef struct GNU_PACKED _VHT_OP_INFO{
+ UINT8 ch_width;
+ UINT8 center_freq_1;
+ UINT8 center_freq_2;
+}VHT_OP_INFO;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.161
+ VHT Operation element, figure 8-401bu
+
+ The operation of VHT STAs in the BSS is controlled by the HT Operation
+ element and the VHT Operation element.
+
+ eid: Element ID
+ 192 (IE_VHT_OP)
+ len: Length
+ 5
+ vht_op_info: VHT Operation Information
+ basic_mcs_set: VHT Basic MCS Set
+*/
+typedef struct GNU_PACKED _VHT_OP_IE{
+ VHT_OP_INFO vht_op_info;
+ VHT_MCS_MAP basic_mcs_set;
+}VHT_OP_IE;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.163
+ Wide Bandwidth Channel Switch element, figure 8-401bx
+
+ included in the Channel Switch Announcement frames.
+
+ new_ch_width: New STA Channel Width
+ center_freq_1: New Channel Center Frequency Segment 1
+ center_freq_2: New Channel Center Frequency Segment 2
+
+ The definition of upper subfields is the same as "VHT_OP_INFO"
+*/
+typedef struct GNU_PACKED _WIDE_BW_CH_SWITCH_IE{
+ UINT8 e_id;
+ UINT len;
+ UINT8 new_ch_width;
+ UINT8 center_freq_1;
+ UINT8 center_freq_2;
+}WIDE_BW_CH_SWITCH_IE;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.164
+ VHT Transmit Power Envelope element
+
+
+*/
+typedef struct GNU_PACKED _CH_SEG_PAIR{
+ UINT8 ch_center_freq;
+ UINT8 seg_ch_width;
+}CH_SEG_PAIR;
+
+
+/*
+ IEEE 802.11AC D2.0, sec 8.4.2.164
+ VHT Transmit Power Envelope element
+
+ max_txpwr: Maximum Transmit Power
+ -> Define the maximum transmit power limit of the tx bandwidth defined
+ by the VHT Transmit Power Envelop element. The Maximum Transmit
+ Power field is a 8 bit 2's complement signed integer in the range of
+ -64 dBm to 63.5 dBm with a 0.5 dB step.
+
+ NOTE: The following two subfields may repeated as needed.
+ center_freq_1: Channel Center Frequency Segment
+ ch_seg_width: Segment Channel Width
+*/
+typedef struct GNU_PACKED _VHT_TXPWR_ENV_IE{
+ UINT8 e_id;
+ UINT8 len;
+ UINT8 max_txpwr;
+ CH_SEG_PAIR ch_seg_pair[0];
+}VHT_TXPWR_ENV_IE;
+
+
+
+typedef struct GNU_PACKED _VHT_CONTROL{
+#ifdef RT_BIG_ENDIAN
+ UINT32 RDG:1;
+ UINT32 ACConstraint:1;
+ UINT32 unso_mfb:1;
+ UINT32 fb_tx_type:1;
+ UINT32 coding:1;
+ UINT32 gid_h:3;
+ UINT32 mfb_snr:6;
+ UINT32 mfb_bw:2;
+ UINT32 mfb_mcs:4;
+ UINT32 mfb_n_sts:3;
+ UINT32 mfsi_gidl:3;
+ UINT32 stbc_ind:1;
+ UINT32 comp_msi:2;
+ UINT32 mrq:1;
+ UINT32 rsv:1;
+ UINT32 vht:1;
+#else
+ UINT32 vht:1;
+ UINT32 rsv:1;
+ UINT32 mrq:1;
+ UINT32 comp_msi:2;
+ UINT32 stbc_ind:1;
+ UINT32 mfsi_gidl:3;
+ UINT32 mfb_n_sts:3;
+ UINT32 mfb_mcs:4;
+ UINT32 mfb_bw:2;
+ UINT32 mfb_snr:6;
+ UINT32 gid_h:3;
+ UINT32 coding:1;
+ UINT32 fb_tx_type:1;
+ UINT32 unso_mfb:1;
+ UINT32 ACConstraint:1;
+ UINT32 RDG:1;
+#endif
+}VHT_CONTROL;
+
+
+typedef struct GNU_PACKED _NDPA_PKT{
+ USHORT frm_ctrl;
+ USHORT duration;
+ UINT8 ra[MAC_ADDR_LEN];
+ UINT8 ta[MAC_ADDR_LEN];
+ UINT8 snd_seq;
+}DNPA_PKT;
+
+
+
+#endif /* __DOT11AC_VHT_H */
+
+#endif /* DOT11_VHT_AC */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/dot11i_wpa.h b/cleopatre/devkit/mt7601udrv/include/dot11i_wpa.h
new file mode 100644
index 0000000000..904036c65c
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/dot11i_wpa.h
@@ -0,0 +1,291 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 5F., No.36 Taiyuan St., Jhubei City,
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2008, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ dot11i_wpa.h
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+
+*/
+
+#ifndef __DOT11I_WPA_H__
+#define __DOT11I_WPA_H__
+
+#include "rtmp_type.h"
+
+/* The length is the EAPoL-Key frame except key data field.
+ Please refer to 802.11i-2004 ,Figure 43u in p.78 */
+#define MIN_LEN_OF_EAPOL_KEY_MSG 95
+
+/* The related length of the EAPOL Key frame */
+#define LEN_KEY_DESC_NONCE 32
+#define LEN_KEY_DESC_IV 16
+#define LEN_KEY_DESC_RSC 8
+#define LEN_KEY_DESC_ID 8
+#define LEN_KEY_DESC_REPLAY 8
+#define LEN_KEY_DESC_MIC 16
+
+/* EAP Code Type */
+#define EAP_CODE_REQUEST 1
+#define EAP_CODE_RESPONSE 2
+#define EAP_CODE_SUCCESS 3
+#define EAP_CODE_FAILURE 4
+
+/* EAPOL frame Protocol Version */
+#define EAPOL_VER 1
+#define EAPOL_VER2 2
+
+/* EAPOL-KEY Descriptor Type */
+#define WPA1_KEY_DESC 0xfe
+#define WPA2_KEY_DESC 0x02
+
+/* Key Descriptor Version of Key Information */
+#define KEY_DESC_TKIP 1
+#define KEY_DESC_AES 2
+#define KEY_DESC_EXT 3
+
+#define IE_WPA 221
+#define IE_RSN 48
+
+#define WPA_KDE_TYPE 0xdd
+
+/*EAP Packet Type */
+#define EAPPacket 0
+#define EAPOLStart 1
+#define EAPOLLogoff 2
+#define EAPOLKey 3
+#define EAPOLASFAlert 4
+#define EAPTtypeMax 5
+
+#define PAIRWISEKEY 1
+#define GROUPKEY 0
+
+/* RSN IE Length definition */
+#define MAX_LEN_OF_RSNIE 255
+#define MIN_LEN_OF_RSNIE 18
+#define MAX_LEN_GTK 32
+#define MIN_LEN_GTK 5
+
+#define LEN_PMK 32
+#define LEN_PMKID 16
+#define LEN_PMK_NAME 16
+
+#define LEN_GMK 32
+
+#define LEN_PTK_KCK 16
+#define LEN_PTK_KEK 16
+#define LEN_TK 16 /* The length Temporal key. */
+#define LEN_TKIP_MIC 8 /* The length of TX/RX Mic of TKIP */
+#define LEN_TK2 (2 * LEN_TKIP_MIC)
+#define LEN_PTK (LEN_PTK_KCK + LEN_PTK_KEK + LEN_TK + LEN_TK2)
+
+#define LEN_TKIP_PTK LEN_PTK
+#define LEN_AES_PTK (LEN_PTK_KCK + LEN_PTK_KEK + LEN_TK)
+#define LEN_TKIP_GTK (LEN_TK + LEN_TK2)
+#define LEN_AES_GTK LEN_TK
+#define LEN_TKIP_TK (LEN_TK + LEN_TK2)
+#define LEN_AES_TK LEN_TK
+
+#define LEN_WEP64 5
+#define LEN_WEP128 13
+
+#define OFFSET_OF_PTK_TK (LEN_PTK_KCK + LEN_PTK_KEK) /* The offset of the PTK Temporal key in PTK */
+#define OFFSET_OF_AP_TKIP_TX_MIC (OFFSET_OF_PTK_TK + LEN_TK)
+#define OFFSET_OF_AP_TKIP_RX_MIC (OFFSET_OF_AP_TKIP_TX_MIC + LEN_TKIP_MIC)
+#define OFFSET_OF_STA_TKIP_RX_MIC (OFFSET_OF_PTK_TK + LEN_TK)
+#define OFFSET_OF_STA_TKIP_TX_MIC (OFFSET_OF_AP_TKIP_TX_MIC + LEN_TKIP_MIC)
+
+#define LEN_KDE_HDR 6
+#define LEN_NONCE 32
+#define LEN_PN 6
+#define LEN_TKIP_IV_HDR 8
+#define LEN_CCMP_HDR 8
+#define LEN_CCMP_MIC 8
+#define LEN_OUI_SUITE 4
+#define LEN_WEP_TSC 3
+#define LEN_WPA_TSC 6
+#define LEN_WEP_IV_HDR 4
+#define LEN_ICV 4
+
+/* It's defined in IEEE Std 802.11-2007 Table 8-4 */
+typedef enum _WPA_KDE_ID
+{
+ KDE_RESV0,
+ KDE_GTK,
+ KDE_RESV2,
+ KDE_MAC_ADDR,
+ KDE_PMKID,
+ KDE_SMK,
+ KDE_NONCE,
+ KDE_LIFETIME,
+ KDE_ERROR,
+ KDE_RESV_OTHER
+} WPA_KDE_ID;
+
+/* EAPOL Key Information definition within Key descriptor format */
+typedef struct GNU_PACKED _KEY_INFO
+{
+#ifdef RT_BIG_ENDIAN
+ UCHAR KeyAck:1;
+ UCHAR Install:1;
+ UCHAR KeyIndex:2;
+ UCHAR KeyType:1;
+ UCHAR KeyDescVer:3;
+ UCHAR Rsvd:3;
+ UCHAR EKD_DL:1; /* EKD for AP; DL for STA */
+ UCHAR Request:1;
+ UCHAR Error:1;
+ UCHAR Secure:1;
+ UCHAR KeyMic:1;
+#else
+ UCHAR KeyMic:1;
+ UCHAR Secure:1;
+ UCHAR Error:1;
+ UCHAR Request:1;
+ UCHAR EKD_DL:1; /* EKD for AP; DL for STA */
+ UCHAR Rsvd:3;
+ UCHAR KeyDescVer:3;
+ UCHAR KeyType:1;
+ UCHAR KeyIndex:2;
+ UCHAR Install:1;
+ UCHAR KeyAck:1;
+#endif
+} KEY_INFO, *PKEY_INFO;
+
+/* EAPOL Key descriptor format */
+typedef struct GNU_PACKED _KEY_DESCRIPTER
+{
+ UCHAR Type;
+ KEY_INFO KeyInfo;
+ UCHAR KeyLength[2];
+ UCHAR ReplayCounter[LEN_KEY_DESC_REPLAY];
+ UCHAR KeyNonce[LEN_KEY_DESC_NONCE];
+ UCHAR KeyIv[LEN_KEY_DESC_IV];
+ UCHAR KeyRsc[LEN_KEY_DESC_RSC];
+ UCHAR KeyId[LEN_KEY_DESC_ID];
+ UCHAR KeyMic[LEN_KEY_DESC_MIC];
+ UCHAR KeyDataLen[2];
+ UCHAR KeyData[0];
+} KEY_DESCRIPTER, *PKEY_DESCRIPTER;
+
+typedef struct GNU_PACKED _EAPOL_PACKET
+{
+ UCHAR ProVer;
+ UCHAR ProType;
+ UCHAR Body_Len[2];
+ KEY_DESCRIPTER KeyDesc;
+} EAPOL_PACKET, *PEAPOL_PACKET;
+
+typedef struct GNU_PACKED _KDE_HDR
+{
+ UCHAR Type;
+ UCHAR Len;
+ UCHAR OUI[3];
+ UCHAR DataType;
+ UCHAR octet[0];
+} KDE_HDR, *PKDE_HDR;
+
+/*802.11i D10 page 83 */
+typedef struct GNU_PACKED _GTK_KDE
+{
+#ifndef RT_BIG_ENDIAN
+ UCHAR Kid:2;
+ UCHAR tx:1;
+ UCHAR rsv:5;
+ UCHAR rsv1;
+#else
+ UCHAR rsv:5;
+ UCHAR tx:1;
+ UCHAR Kid:2;
+ UCHAR rsv1;
+#endif
+ UCHAR GTK[0];
+} GTK_KDE, *PGTK_KDE;
+
+/* For WPA1 */
+typedef struct GNU_PACKED _RSNIE {
+ UCHAR oui[4];
+ USHORT version;
+ UCHAR mcast[4];
+ USHORT ucount;
+ struct GNU_PACKED {
+ UCHAR oui[4];
+ }ucast[1];
+} RSNIE, *PRSNIE;
+
+/* For WPA2 */
+typedef struct GNU_PACKED _RSNIE2 {
+ USHORT version;
+ UCHAR mcast[4];
+ USHORT ucount;
+ struct GNU_PACKED {
+ UCHAR oui[4];
+ }ucast[1];
+} RSNIE2, *PRSNIE2;
+
+/* AKM Suite */
+typedef struct GNU_PACKED _RSNIE_AUTH {
+ USHORT acount;
+ struct GNU_PACKED {
+ UCHAR oui[4];
+ }auth[1];
+} RSNIE_AUTH,*PRSNIE_AUTH;
+
+/* PMKID List */
+typedef struct GNU_PACKED _RSNIE_PMKID {
+ USHORT pcount;
+ struct GNU_PACKED {
+ UCHAR list[16];
+ }pmkid[1];
+} RSNIE_PMKID,*PRSNIE_PMKID;
+
+typedef union GNU_PACKED _RSN_CAPABILITIES {
+ struct GNU_PACKED {
+#ifdef RT_BIG_ENDIAN
+ USHORT Rsvd:8;
+ USHORT MFPC:1;
+ USHORT MFPR:1;
+ USHORT GTKSA_R_Counter:2;
+ USHORT PTKSA_R_Counter:2;
+ USHORT No_Pairwise:1;
+ USHORT PreAuth:1;
+#else
+ USHORT PreAuth:1;
+ USHORT No_Pairwise:1;
+ USHORT PTKSA_R_Counter:2;
+ USHORT GTKSA_R_Counter:2;
+ USHORT MFPR:1;
+ USHORT MFPC:1;
+ USHORT Rsvd:8;
+#endif
+ } field;
+ USHORT word;
+} RSN_CAPABILITIES, *PRSN_CAPABILITIES;
+
+typedef struct GNU_PACKED _EAP_HDR {
+ UCHAR ProVer;
+ UCHAR ProType;
+ UCHAR Body_Len[2];
+ UCHAR code;
+ UCHAR identifier;
+ UCHAR length[2]; /* including code and identifier, followed by length-2 octets of data */
+} EAP_HDR, *PEAP_HDR;
+
+
+#endif /* __DOT11I_WPA_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/drs_extr.h b/cleopatre/devkit/mt7601udrv/include/drs_extr.h
new file mode 100644
index 0000000000..7791f22e16
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/drs_extr.h
@@ -0,0 +1,326 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2010, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All Dynamic Rate Switch Related Structure & Definition
+
+***************************************************************************/
+
+#ifndef __DRS_EXTR_H__
+#define __DRS_EXTR_H__
+
+struct _RTMP_ADAPTER;
+struct _MAC_TABLE_ENTRY;
+
+
+typedef struct _RTMP_TX_RATE {
+ UCHAR mode;
+ UCHAR bw;
+ UCHAR mcs;
+ UCHAR nss;
+ UCHAR sgi;
+ UCHAR stbc;
+}RTMP_TX_RATE;
+
+
+typedef struct _RTMP_RA_LEGACY_TB
+{
+ UCHAR ItemNo;
+#ifdef RT_BIG_ENDIAN
+ UCHAR Rsv2:1;
+ UCHAR Mode:3;
+ UCHAR BW:2;
+ UCHAR ShortGI:1;
+ UCHAR STBC:1;
+#else
+ UCHAR STBC:1;
+ UCHAR ShortGI:1;
+ UCHAR BW:2;
+ UCHAR Mode:3;
+ UCHAR Rsv2:1;
+#endif
+ UCHAR CurrMCS;
+ UCHAR TrainUp;
+ UCHAR TrainDown;
+} RTMP_RA_LEGACY_TB;
+
+#define PTX_RA_LEGACY_ENTRY(pTable, idx) ((RTMP_RA_LEGACY_TB *)&(pTable[(idx+1)*5]))
+
+
+#ifdef NEW_RATE_ADAPT_SUPPORT
+typedef struct _RTMP_RA_GRP_TB
+{
+ UCHAR ItemNo;
+#ifdef RT_BIG_ENDIAN
+ UCHAR Rsv2:1;
+ UCHAR Mode:3;
+ UCHAR BW:2;
+ UCHAR ShortGI:1;
+ UCHAR STBC:1;
+#else
+ UCHAR STBC:1;
+ UCHAR ShortGI:1;
+ UCHAR BW:2;
+ UCHAR Mode:3;
+ UCHAR Rsv2:1;
+#endif
+ UCHAR CurrMCS;
+ UCHAR TrainUp;
+ UCHAR TrainDown;
+ UCHAR downMcs;
+ UCHAR upMcs3;
+ UCHAR upMcs2;
+ UCHAR upMcs1;
+ UCHAR dataRate;
+} RTMP_RA_GRP_TB;
+
+#define PTX_RA_GRP_ENTRY(pTable, idx) ((RTMP_RA_GRP_TB *)&(pTable[(idx+1)*10]))
+#endif /* NEW_RATE_ADAPT_SUPPORT */
+
+#define RATE_TABLE_SIZE(pTable) ((pTable)[0]) /* Byte 0 is number of rate indices */
+#define RATE_TABLE_INIT_INDEX(pTable) ((pTable)[1]) /* Byte 1 is initial rate index */
+
+enum RATE_ADAPT_ALG{
+ RATE_ALG_LEGACY = 1,
+ RATE_ALG_GRP = 2,
+ RATE_ALG_AGS = 3,
+ RATE_ALG_MAX_NUM
+};
+
+
+typedef enum {
+ RAL_OLD_DRS,
+ RAL_NEW_DRS,
+ RAL_QUICK_DRS
+}RA_LOG_TYPE;
+
+
+extern UCHAR RateSwitchTable11B[];
+extern UCHAR RateSwitchTable11G[];
+extern UCHAR RateSwitchTable11BG[];
+
+#ifdef DOT11_N_SUPPORT
+extern UCHAR RateSwitchTable11BGN1S[];
+extern UCHAR RateSwitchTable11BGN2S[];
+extern UCHAR RateSwitchTable11BGN2SForABand[];
+extern UCHAR RateSwitchTable11N1S[];
+extern UCHAR RateSwitchTable11N1SForABand[];
+extern UCHAR RateSwitchTable11N2S[];
+extern UCHAR RateSwitchTable11N2SForABand[];
+extern UCHAR RateSwitchTable11BGN3S[];
+extern UCHAR RateSwitchTable11BGN3SForABand[];
+
+#ifdef NEW_RATE_ADAPT_SUPPORT
+extern UCHAR RateSwitchTableAdapt11N1S[];
+extern UCHAR RateSwitchTableAdapt11N2S[];
+extern UCHAR RateSwitchTableAdapt11N3S[];
+
+#define PER_THRD_ADJ 1
+
+/* ADAPT_RATE_TABLE - true if pTable is one of the Adaptive Rate Switch tables */
+#ifdef DOT11_VHT_AC
+extern UCHAR RateTableVht1S[];
+extern UCHAR RateTableVht2S[];
+
+#define ADAPT_RATE_TABLE(pTable) ((pTable)==RateSwitchTableAdapt11N1S ||\
+ (pTable)==RateSwitchTableAdapt11N2S ||\
+ (pTable)==RateSwitchTableAdapt11N3S ||\
+ (pTable)==RateTableVht1S ||\
+ (pTable)==RateTableVht2S)
+#else
+#define ADAPT_RATE_TABLE(pTable) ((pTable)==RateSwitchTableAdapt11N1S || \
+ (pTable)==RateSwitchTableAdapt11N2S || \
+ (pTable)==RateSwitchTableAdapt11N3S)
+#endif /* DOT11_VHT_AC */
+#endif /* NEW_RATE_ADAPT_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+
+
+/* FUNCTION */
+VOID MlmeGetSupportedMcs(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN UCHAR *pTable,
+ OUT CHAR mcs[]);
+
+UCHAR MlmeSelectTxRate(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN CHAR mcs[],
+ IN CHAR Rssi,
+ IN CHAR RssiOffset);
+
+VOID MlmeClearTxQuality(struct _MAC_TABLE_ENTRY *pEntry);
+VOID MlmeClearAllTxQuality(struct _MAC_TABLE_ENTRY *pEntry);
+VOID MlmeDecTxQuality(struct _MAC_TABLE_ENTRY *pEntry, UCHAR rateIndex);
+USHORT MlmeGetTxQuality(struct _MAC_TABLE_ENTRY *pEntry, UCHAR rateIndex);
+VOID MlmeSetTxQuality(
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR rateIndex,
+ IN USHORT txQuality);
+
+
+
+VOID MlmeOldRateAdapt(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR CurrRateIdx,
+ IN UCHAR UpRateIdx,
+ IN UCHAR DownRateIdx,
+ IN ULONG TrainUp,
+ IN ULONG TrainDown,
+ IN ULONG TxErrorRatio);
+
+VOID MlmeRestoreLastRate(
+ IN struct _MAC_TABLE_ENTRY *pEntry);
+
+VOID MlmeCheckRDG(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry);
+
+VOID RTMPSetSupportMCS(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN UCHAR OpMode,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR SupRate[],
+ IN UCHAR SupRateLen,
+ IN UCHAR ExtRate[],
+ IN UCHAR ExtRateLen,
+#ifdef DOT11_VHT_AC
+ IN UCHAR vht_cap_len,
+ IN VHT_CAP_IE *vht_cap,
+#endif /* DOT11_VHT_AC */
+ IN HT_CAPABILITY_IE *pHtCapability,
+ IN UCHAR HtCapabilityLen);
+
+#ifdef NEW_RATE_ADAPT_SUPPORT
+VOID MlmeSetMcsGroup(struct _RTMP_ADAPTER *pAd, struct _MAC_TABLE_ENTRY *pEnt);
+
+UCHAR MlmeSelectUpRate(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN RTMP_RA_GRP_TB *pCurrTxRate);
+
+UCHAR MlmeSelectDownRate(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR CurrRateIdx);
+
+VOID MlmeGetSupportedMcsAdapt(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR mcs23GI,
+ OUT CHAR mcs[]);
+
+UCHAR MlmeSelectTxRateAdapt(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN CHAR mcs[],
+ IN CHAR Rssi,
+ IN CHAR RssiOffset);
+
+BOOLEAN MlmeRAHybridRule(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN RTMP_RA_GRP_TB *pCurrTxRate,
+ IN ULONG NewTxOkCount,
+ IN ULONG TxErrorRatio);
+
+VOID MlmeNewRateAdapt(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR UpRateIdx,
+ IN UCHAR DownRateIdx,
+ IN ULONG TrainUp,
+ IN ULONG TrainDown,
+ IN ULONG TxErrorRatio);
+
+INT Set_PerThrdAdj_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_LowTrafficThrd_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_TrainUpRule_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_TrainUpRuleRSSI_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_TrainUpLowThrd_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_TrainUpHighThrd_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_RateTable_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+#ifdef CONFIG_AP_SUPPORT
+VOID APMlmeDynamicTxRateSwitchingAdapt(struct _RTMP_ADAPTER *pAd, ULONG idx);
+VOID APQuickResponeForRateUpExecAdapt(struct _RTMP_ADAPTER *pAd, ULONG idx);
+#endif /* CONFIG_AP_SUPPORT */
+
+#endif /* NEW_RATE_ADAPT_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+VOID APMlmeDynamicTxRateSwitching(
+ IN struct _RTMP_ADAPTER *pAd);
+
+VOID APQuickResponeForRateUpExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID APMlmeSetTxRate(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN RTMP_RA_LEGACY_TB *pTxRate);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+VOID MlmeRAInit(struct _RTMP_ADAPTER *pAd, struct _MAC_TABLE_ENTRY *pEntry);
+VOID MlmeNewTxRate(struct _RTMP_ADAPTER *pAd, struct _MAC_TABLE_ENTRY *pEntry);
+
+VOID MlmeRALog(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN RA_LOG_TYPE raLogType,
+ IN ULONG TxErrorRatio,
+ IN ULONG TxTotalCnt);
+
+VOID MlmeSelectTxRateTable(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN struct _MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR **ppTable,
+ IN UCHAR *pTableSize,
+ IN UCHAR *pInitTxRateIdx);
+
+/* normal rate switch */
+#define RTMP_DRS_ALG_INIT(__pAd, __Alg) \
+ (__pAd)->rateAlg = __Alg;
+
+#endif /* __DRS_EXTR_H__ */
+
+/* End of drs_extr.h */
diff --git a/cleopatre/devkit/mt7601udrv/include/eeprom.h b/cleopatre/devkit/mt7601udrv/include/eeprom.h
new file mode 100644
index 0000000000..7e90d97802
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/eeprom.h
@@ -0,0 +1,321 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ eeprom.h
+
+ Abstract:
+ Miniport header file for eeprom related information
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+#ifndef __EEPROM_H__
+#define __EEPROM_H__
+
+/* For ioctl check usage */
+#define EEPROM_IS_PROGRAMMED 0x80
+
+
+#ifdef RTMP_MAC_USB
+#define EEPROM_SIZE 0x400
+#endif /* RTMP_MAC_USB */
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_WORD_STRUC {
+ struct {
+ UCHAR Byte1; // High Byte
+ UCHAR Byte0; // Low Byte
+ } field;
+ USHORT word;
+} EEPROM_WORD_STRUC;
+#else
+typedef union _EEPROM_WORD_STRUC {
+ struct {
+ UCHAR Byte0;
+ UCHAR Byte1;
+ } field;
+ USHORT word;
+} EEPROM_WORD_STRUC;
+#endif
+
+
+/* ------------------------------------------------------------------- */
+/* E2PROM data layout */
+/* ------------------------------------------------------------------- */
+
+/* Board type */
+
+#define BOARD_TYPE_MINI_CARD 0 /* Mini card */
+#define BOARD_TYPE_USB_PEN 1 /* USB pen */
+
+/*
+ EEPROM antenna select format
+*/
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_NIC_CINFIG2_STRUC {
+ struct {
+ USHORT DACTestBit:1; /* control if driver should patch the DAC issue */
+ USHORT CoexBit:1;
+ USHORT bInternalTxALC:1; /* Internal Tx ALC */
+ USHORT AntOpt:1; /* Fix Antenna Option: 0:Main; 1: Aux */
+ USHORT AntDiversity:1; /* Antenna diversity */
+ USHORT Rsv1:1; /* must be 0 */
+ USHORT BW40MAvailForA:1; /* 0:enable, 1:disable */
+ USHORT BW40MAvailForG:1; /* 0:enable, 1:disable */
+ USHORT EnableWPSPBC:1; /* WPS PBC Control bit */
+ USHORT BW40MSidebandForA:1;
+ USHORT BW40MSidebandForG:1;
+ USHORT CardbusAcceleration:1; /* !!! NOTE: 0 - enable, 1 - disable */
+ USHORT ExternalLNAForA:1; /* external LNA enable for 5G */
+ USHORT ExternalLNAForG:1; /* external LNA enable for 2.4G */
+ USHORT DynamicTxAgcControl:1; /* */
+ USHORT HardwareRadioControl:1; /* Whether RF is controlled by driver or HW. 1:enable hw control, 0:disable */
+ } field;
+ USHORT word;
+} EEPROM_NIC_CONFIG2_STRUC, *PEEPROM_NIC_CONFIG2_STRUC;
+#else
+typedef union _EEPROM_NIC_CINFIG2_STRUC {
+ struct {
+ USHORT HardwareRadioControl:1; /* 1:enable, 0:disable */
+ USHORT DynamicTxAgcControl:1; /* */
+ USHORT ExternalLNAForG:1; /* */
+ USHORT ExternalLNAForA:1; /* external LNA enable for 2.4G */
+ USHORT CardbusAcceleration:1; /* !!! NOTE: 0 - enable, 1 - disable */
+ USHORT BW40MSidebandForG:1;
+ USHORT BW40MSidebandForA:1;
+ USHORT EnableWPSPBC:1; /* WPS PBC Control bit */
+ USHORT BW40MAvailForG:1; /* 0:enable, 1:disable */
+ USHORT BW40MAvailForA:1; /* 0:enable, 1:disable */
+ USHORT Rsv1:1; /* must be 0 */
+ USHORT AntDiversity:1; /* Antenna diversity */
+ USHORT AntOpt:1; /* Fix Antenna Option: 0:Main; 1: Aux */
+ USHORT bInternalTxALC:1; /* Internal Tx ALC */
+ USHORT CoexBit:1;
+ USHORT DACTestBit:1; /* control if driver should patch the DAC issue */
+ } field;
+ USHORT word;
+} EEPROM_NIC_CONFIG2_STRUC, *PEEPROM_NIC_CONFIG2_STRUC;
+#endif
+
+
+#if defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290)
+#ifdef RTMP_USB_SUPPORT
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_NIC_CINFIG3_STRUC {
+ struct {
+ USHORT Rsv1:7; /* must be 0 */
+ USHORT CoexMethod:1;
+ USHORT TxStream:4; /* Number of Tx stream */
+ USHORT RxStream:4; /* Number of rx stream */
+ } field;
+ USHORT word;
+} EEPROM_NIC_CONFIG3_STRUC, *PEEPROM_NIC_CONFIG3_STRUC;
+#else
+typedef union _EEPROM_NIC_CINFIG3_STRUC {
+ struct {
+ USHORT RxStream:4; /* Number of rx stream */
+ USHORT TxStream:4; /* Number of Tx stream */
+ USHORT CoexMethod:1;
+ USHORT Rsv1:7; /* must be 0 */
+ } field;
+ USHORT word;
+} EEPROM_NIC_CONFIG3_STRUC, *PEEPROM_NIC_CONFIG3_STRUC;
+#endif
+#endif /* RTMP_USB_SUPPORT */
+
+#endif /* defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290) */
+
+
+
+/*
+ TX_PWR Value valid range 0xFA(-6) ~ 0x24(36)
+*/
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_TX_PWR_STRUC {
+ struct {
+ signed char Byte1; /* High Byte */
+ signed char Byte0; /* Low Byte */
+ } field;
+ USHORT word;
+} EEPROM_TX_PWR_STRUC, *PEEPROM_TX_PWR_STRUC;
+#else
+typedef union _EEPROM_TX_PWR_STRUC {
+ struct {
+ signed char Byte0; /* Low Byte */
+ signed char Byte1; /* High Byte */
+ } field;
+ USHORT word;
+} EEPROM_TX_PWR_STRUC, *PEEPROM_TX_PWR_STRUC;
+#endif
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_VERSION_STRUC {
+ struct {
+ UCHAR Version; /* High Byte */
+ UCHAR FaeReleaseNumber; /* Low Byte */
+ } field;
+ USHORT word;
+} EEPROM_VERSION_STRUC, *PEEPROM_VERSION_STRUC;
+#else
+typedef union _EEPROM_VERSION_STRUC {
+ struct {
+ UCHAR FaeReleaseNumber; /* Low Byte */
+ UCHAR Version; /* High Byte */
+ } field;
+ USHORT word;
+} EEPROM_VERSION_STRUC, *PEEPROM_VERSION_STRUC;
+#endif
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_LED_STRUC {
+ struct {
+ USHORT Rsvd:3; /* Reserved */
+ USHORT LedMode:5; /* Led mode. */
+ USHORT PolarityGPIO_4:1; /* Polarity GPIO#4 setting. */
+ USHORT PolarityGPIO_3:1; /* Polarity GPIO#3 setting. */
+ USHORT PolarityGPIO_2:1; /* Polarity GPIO#2 setting. */
+ USHORT PolarityGPIO_1:1; /* Polarity GPIO#1 setting. */
+ USHORT PolarityGPIO_0:1; /* Polarity GPIO#0 setting. */
+ USHORT PolarityACT:1; /* Polarity ACT setting. */
+ USHORT PolarityRDY_A:1; /* Polarity RDY_A setting. */
+ USHORT PolarityRDY_G:1; /* Polarity RDY_G setting. */
+ } field;
+ USHORT word;
+} EEPROM_LED_STRUC, *PEEPROM_LED_STRUC;
+#else
+typedef union _EEPROM_LED_STRUC {
+ struct {
+ USHORT PolarityRDY_G:1; /* Polarity RDY_G setting. */
+ USHORT PolarityRDY_A:1; /* Polarity RDY_A setting. */
+ USHORT PolarityACT:1; /* Polarity ACT setting. */
+ USHORT PolarityGPIO_0:1; /* Polarity GPIO#0 setting. */
+ USHORT PolarityGPIO_1:1; /* Polarity GPIO#1 setting. */
+ USHORT PolarityGPIO_2:1; /* Polarity GPIO#2 setting. */
+ USHORT PolarityGPIO_3:1; /* Polarity GPIO#3 setting. */
+ USHORT PolarityGPIO_4:1; /* Polarity GPIO#4 setting. */
+ USHORT LedMode:5; /* Led mode. */
+ USHORT Rsvd:3; /* Reserved */
+ } field;
+ USHORT word;
+} EEPROM_LED_STRUC, *PEEPROM_LED_STRUC;
+#endif
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_TXPOWER_DELTA_STRUC {
+ struct {
+ UCHAR TxPowerEnable:1; /* Enable */
+ UCHAR Type:1; /* 1: plus the delta value, 0: minus the delta value */
+ UCHAR DeltaValue:6; /* Tx Power dalta value (MAX=4) */
+ } field;
+ UCHAR value;
+} EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
+#else
+typedef union _EEPROM_TXPOWER_DELTA_STRUC {
+ struct {
+ UCHAR DeltaValue:6; /* Tx Power dalta value (MAX=4) */
+ UCHAR Type:1; /* 1: plus the delta value, 0: minus the delta value */
+ UCHAR TxPowerEnable:1; /* Enable */
+ } field;
+ UCHAR value;
+} EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_TX_PWR_OFFSET_STRUC
+{
+ struct
+ {
+ UCHAR Byte1; /* High Byte */
+ UCHAR Byte0; /* Low Byte */
+ } field;
+
+ USHORT word;
+} EEPROM_TX_PWR_OFFSET_STRUC, *PEEPROM_TX_PWR_OFFSET_STRUC;
+#else
+typedef union _EEPROM_TX_PWR_OFFSET_STRUC
+{
+ struct
+ {
+ UCHAR Byte0; /* Low Byte */
+ UCHAR Byte1; /* High Byte */
+ } field;
+
+ USHORT word;
+} EEPROM_TX_PWR_OFFSET_STRUC, *PEEPROM_TX_PWR_OFFSET_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+
+struct _RTMP_ADAPTER;
+
+
+
+#ifdef RTMP_USB_SUPPORT
+NTSTATUS RTUSBReadEEPROM16(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN USHORT offset,
+ OUT USHORT *pData);
+
+NTSTATUS RTUSBWriteEEPROM16(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN USHORT offset,
+ IN USHORT value);
+#endif /* RTMP_USB_SUPPORT */
+
+
+#if defined(RTMP_RBUS_SUPPORT) || defined(RTMP_FLASH_SUPPORT)
+NDIS_STATUS rtmp_nv_init(struct _RTMP_ADAPTER *pAd);
+int rtmp_ee_flash_read(struct _RTMP_ADAPTER *pAd, USHORT Offset, USHORT *pVal);
+int rtmp_ee_flash_write(struct _RTMP_ADAPTER *pAd, USHORT Offset, USHORT data);
+VOID rtmp_ee_flash_read_all(struct _RTMP_ADAPTER *pAd, USHORT *Data);
+VOID rtmp_ee_flash_write_all(struct _RTMP_ADAPTER *pAd, USHORT *Data);
+#endif /* defined(RTMP_RBUS_SUPPORT) || defined(RTMP_FLASH_SUPPORT) */
+
+
+#ifdef RTMP_EFUSE_SUPPORT
+INT eFuseLoadEEPROM(struct _RTMP_ADAPTER *pAd);
+INT eFuseWriteEeeppromBuf(struct _RTMP_ADAPTER *pAd);
+VOID eFuseGetFreeBlockCount(struct _RTMP_ADAPTER *pAd, UINT *EfuseFreeBlock);
+
+int rtmp_ee_efuse_read16(struct _RTMP_ADAPTER *pAd, USHORT Offset, USHORT *pVal);
+int rtmp_ee_efuse_write16(struct _RTMP_ADAPTER *pAd, USHORT Offset, USHORT data);
+
+
+NTSTATUS eFuseRead(struct _RTMP_ADAPTER *pAd, USHORT Offset, USHORT *pData, USHORT len);
+NTSTATUS eFuseWrite(struct _RTMP_ADAPTER *pAd, USHORT Offset, USHORT *pData, USHORT len);
+
+INT eFuse_init(struct _RTMP_ADAPTER *pAd);
+INT efuse_probe(struct _RTMP_ADAPTER *pAd);
+
+#ifdef RALINK_ATE
+INT Set_LoadEepromBufferFromEfuse_Proc(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+#endif /* RALINK_ATE */
+#endif /* RTMP_EFUSE_SUPPORT */
+
+
+/*************************************************************************
+ * Public function declarations for prom operation callback functions setting
+ ************************************************************************/
+INT RtmpChipOpsEepromHook(struct _RTMP_ADAPTER *pAd, INT infType);
+
+#endif /* __EEPROM_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/firmware.h b/cleopatre/devkit/mt7601udrv/include/firmware.h
new file mode 100644
index 0000000000..a4904e9903
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/firmware.h
@@ -0,0 +1,2396 @@
+/* AUTO GEN PLEASE DO NOT MODIFY IT */
+/* AUTO GEN PLEASE DO NOT MODIFY IT */
+
+
+UCHAR FirmwareImage [] = {
+0x48, 0x00, 0x00, 0x52, 0x48, 0x00, 0x00, 0x1e, 0x48, 0x00, 0x00, 0x1c, 0x48, 0x00, 0x00, 0x1a,
+0x48, 0x00, 0x00, 0x18, 0x48, 0x00, 0x00, 0x16, 0x48, 0x00, 0x00, 0x14, 0x48, 0x00, 0x00, 0x12,
+0x48, 0x00, 0x00, 0x10, 0x48, 0x00, 0x00, 0x0e, 0x48, 0x00, 0x00, 0x10, 0x48, 0x00, 0x00, 0x0a,
+0x48, 0x00, 0x00, 0x08, 0x48, 0x00, 0x00, 0x06, 0x48, 0x00, 0x00, 0x04, 0x48, 0x00, 0x00, 0x02,
+0x92, 0x00, 0x48, 0x00, 0x00, 0x00, 0x92, 0x00, 0x3a, 0x0f, 0xab, 0xbc, 0x3a, 0xff, 0xbc, 0x3c,
+0x64, 0x62, 0x04, 0x02, 0x64, 0x72, 0xa4, 0x02, 0x64, 0x82, 0x00, 0x02, 0x3a, 0x6f, 0xa0, 0x3c,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x05, 0xa0, 0xb4, 0x00, 0x15, 0xf0, 0x00, 0x00, 0x46, 0x10,
+0x00, 0x04, 0x58, 0x10, 0x8f, 0xb0, 0xdd, 0x21, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x05, 0xa0,
+0xb4, 0x00, 0x05, 0xf0, 0x00, 0x00, 0x3a, 0x6f, 0xa0, 0x04, 0x64, 0x62, 0x04, 0x03, 0x64, 0x72,
+0xa4, 0x03, 0x64, 0x82, 0x00, 0x03, 0x3a, 0xff, 0xbc, 0x04, 0x3a, 0x0f, 0xab, 0x84, 0x64, 0x00,
+0x00, 0x04, 0x92, 0x00, 0x84, 0x0a, 0x64, 0x02, 0x00, 0x03, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00,
+0x02, 0x00, 0x44, 0x10, 0x04, 0x01, 0xa8, 0x41, 0x84, 0x00, 0x64, 0x02, 0x24, 0x03, 0x46, 0x0c,
+0x00, 0x00, 0x58, 0x00, 0x00, 0x02, 0x64, 0x03, 0x00, 0x03, 0x47, 0xf0, 0x00, 0x0f, 0x59, 0xff,
+0x8f, 0x00, 0x46, 0x00, 0x00, 0x08, 0x58, 0x00, 0x0b, 0x60, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10,
+0x83, 0x60, 0x84, 0x40, 0xd5, 0x02, 0xaa, 0x81, 0x4c, 0x10, 0x7f, 0xff, 0x46, 0x00, 0x00, 0x09,
+0x58, 0x00, 0x05, 0x70, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0xd4, 0x84, 0x40, 0xd5, 0x02,
+0xaa, 0x81, 0x4c, 0x10, 0x7f, 0xff, 0x48, 0x00, 0x26, 0xab, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0xb4, 0x20, 0xc1, 0x17, 0xa1, 0x41, 0x84, 0x80, 0xa9, 0x49, 0xb6, 0x25, 0xb6, 0x80,
+0xa9, 0x01, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x50, 0xa0, 0xc2, 0xb4, 0x20, 0x9e, 0x99,
+0xa8, 0x82, 0x4c, 0x10, 0x40, 0x08, 0xa0, 0x0b, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x44,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x27, 0x80, 0x97, 0x80, 0xe0, 0xc2, 0x11, 0x80, 0x02,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x44, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07,
+0x80, 0x97, 0x80, 0x27, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0xcc, 0xdd, 0x2f, 0xec, 0x04,
+0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x84, 0xe4, 0xdd, 0x2f, 0x46, 0x17, 0xff, 0xff, 0x58, 0x10, 0x8f, 0xff,
+0x46, 0x20, 0x00, 0x0c, 0x58, 0x21, 0x02, 0x50, 0x81, 0x00, 0x40, 0xa0, 0x04, 0x00, 0x44, 0x00,
+0xea, 0x60, 0x14, 0xa1, 0x00, 0x04, 0x80, 0xe2, 0xb4, 0xc2, 0x41, 0xc4, 0x00, 0x00, 0xd5, 0x2d,
+0xa0, 0x32, 0x40, 0x34, 0x00, 0x01, 0x4e, 0x35, 0x00, 0x20, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x81, 0x0c, 0xdd, 0x2f, 0xa4, 0x36, 0xc0, 0x10, 0x9e, 0x01, 0xac, 0x36, 0x15, 0xc3,
+0x00, 0x02, 0x05, 0xe3, 0x80, 0x01, 0xa9, 0xb9, 0xb6, 0xe6, 0x15, 0xe3, 0x00, 0x01, 0xb6, 0xde,
+0xa1, 0x7a, 0x9d, 0x29, 0xa9, 0x3a, 0xd5, 0x05, 0xa0, 0x75, 0xc1, 0x03, 0xa0, 0x34, 0xdd, 0x21,
+0x14, 0xa3, 0x80, 0x04, 0xd5, 0x09, 0xa0, 0xbc, 0x40, 0x90, 0x08, 0x01, 0x4e, 0x95, 0x00, 0x03,
+0xd5, 0x02, 0xa8, 0x3c, 0x81, 0x26, 0xb4, 0xc9, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x50,
+0x4c, 0x64, 0xff, 0xd0, 0xb4, 0xa6, 0xd6, 0x09, 0xa0, 0xf4, 0x40, 0x01, 0xa0, 0x01, 0x46, 0xf0,
+0x00, 0x00, 0x58, 0xf7, 0x81, 0x4c, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x02, 0x50, 0xa0, 0x33, 0x84, 0x20,
+0xa8, 0x72, 0xb6, 0xc6, 0xa9, 0xb1, 0xc8, 0x08, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x86, 0xd4,
+0xdd, 0x2f, 0xa8, 0x33, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x44, 0xdd, 0x2f,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0,
+0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0xa0, 0x32,
+0xc8, 0x02, 0xd5, 0x09, 0x9e, 0x01, 0xa8, 0x32, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x81, 0x80, 0xdd, 0x2f, 0x80, 0xc0, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c,
+0xdd, 0x2f, 0x80, 0x06, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xf4, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04, 0x80, 0xe1, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x8f, 0xf8, 0xdd, 0x2f, 0xa0, 0xb2, 0x80, 0x06, 0x9c, 0x51, 0xa8, 0x72, 0x80, 0x27, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x81, 0x74, 0xdd, 0x2f, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x80, 0x0c, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0x6c,
+0xdd, 0x2f, 0x46, 0x70, 0x00, 0x09, 0x58, 0x73, 0x85, 0x90, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63,
+0x0f, 0xc0, 0x46, 0x80, 0x00, 0x00, 0x58, 0x84, 0x02, 0xbc, 0xa9, 0xf2, 0x80, 0x26, 0x46, 0x00,
+0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x4b, 0xe0, 0x20, 0x01, 0x50, 0x73, 0x86, 0x40, 0x46, 0x50,
+0x00, 0x0b, 0x58, 0x52, 0x8b, 0x10, 0x8c, 0xd8, 0xdf, 0xf1, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00,
+0x02, 0x74, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0x6c, 0xdd, 0x2f, 0x46, 0x70, 0x00, 0x0b,
+0x58, 0x73, 0x8b, 0x10, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x00, 0x50, 0x46, 0x80, 0x00, 0x00,
+0x58, 0x84, 0x02, 0xbc, 0xa9, 0xf2, 0x80, 0x26, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x74,
+0x4b, 0xe0, 0x20, 0x01, 0x50, 0x73, 0x80, 0xc8, 0x46, 0x50, 0x00, 0x0b, 0x58, 0x52, 0x8f, 0xc0,
+0x8c, 0xd8, 0xdf, 0xf1, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x84, 0xe0, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x85, 0x0c, 0xdd, 0x2f, 0x46, 0xf0,
+0x00, 0x09, 0x10, 0x77, 0x85, 0x83, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x77, 0x85, 0x84, 0x46, 0x60,
+0x00, 0x02, 0x58, 0x63, 0x08, 0xac, 0x44, 0x00, 0x00, 0x10, 0x46, 0x10, 0x00, 0x02, 0x58, 0x10,
+0x89, 0xf4, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x11, 0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8a, 0x04,
+0xdd, 0x26, 0x84, 0x00, 0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8a, 0x14, 0xdd, 0x26, 0x84, 0x01,
+0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8a, 0x24, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x19, 0x46, 0x10,
+0x00, 0x02, 0x58, 0x10, 0x8a, 0x34, 0xdd, 0x26, 0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8b, 0x30,
+0x44, 0x00, 0x00, 0x18, 0xdd, 0x26, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0xfc, 0xdd, 0x2f,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x84, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x89, 0x00,
+0xdd, 0x2f, 0x84, 0xc0, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x84, 0x88, 0xdd, 0x2f, 0x46, 0x40,
+0x00, 0x0c, 0x58, 0x42, 0x02, 0x84, 0x10, 0x72, 0x02, 0x64, 0x14, 0x62, 0x00, 0x2d, 0x80, 0x26,
+0x50, 0x02, 0x02, 0x66, 0x84, 0x48, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f,
+0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x08, 0x00, 0xa9, 0x84, 0x46, 0x20, 0x30, 0x00, 0xa0, 0xc3,
+0x40, 0x11, 0x88, 0x04, 0xa8, 0x43, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x9c, 0x3c, 0x96, 0x00, 0x96, 0x48, 0x95, 0x82, 0x99, 0x71, 0x44, 0x32, 0x0d, 0x60,
+0x99, 0x2b, 0x00, 0x31, 0x00, 0x40, 0x95, 0x25, 0x84, 0xa0, 0x38, 0x71, 0x14, 0x00, 0x99, 0xac,
+0xaf, 0xf0, 0x9d, 0x69, 0x44, 0x70, 0x00, 0x10, 0xdf, 0xf9, 0x9b, 0x94, 0x50, 0x52, 0x00, 0x18,
+0x50, 0x22, 0x00, 0x10, 0x38, 0x73, 0x08, 0x00, 0x18, 0x71, 0x00, 0x01, 0xda, 0xfc, 0x50, 0x42,
+0x00, 0x20, 0x38, 0x23, 0x14, 0x00, 0x18, 0x22, 0x80, 0x01, 0xdc, 0xfc, 0x46, 0x40, 0x01, 0x06,
+0x40, 0x20, 0x04, 0x09, 0x58, 0x42, 0x0c, 0x00, 0x99, 0x54, 0x94, 0xaa, 0x97, 0x04, 0xb4, 0x02,
+0xcc, 0x1d, 0xc9, 0x05, 0x54, 0x31, 0x80, 0x0f, 0x84, 0xd0, 0xd5, 0x39, 0x84, 0xa1, 0xd9, 0x07,
+0x54, 0x11, 0x80, 0x0f, 0x94, 0xcc, 0x44, 0x6f, 0xff, 0x0f, 0xd5, 0x31, 0x84, 0x82, 0x54, 0x31,
+0x80, 0x0f, 0x4c, 0x12, 0x40, 0x07, 0x40, 0x31, 0xa0, 0x08, 0x44, 0x6f, 0xf0, 0xff, 0xd5, 0x27,
+0x40, 0x31, 0xb0, 0x08, 0x44, 0x1f, 0x0f, 0xff, 0xd5, 0x2b, 0xc9, 0x0c, 0x46, 0x5f, 0xff, 0x0f,
+0x54, 0x31, 0x80, 0x0f, 0x58, 0x52, 0x8f, 0xff, 0x40, 0x31, 0xc0, 0x08, 0x40, 0x00, 0x14, 0x02,
+0xd5, 0x21, 0x84, 0xa1, 0xd9, 0x0a, 0x54, 0x11, 0x80, 0x0f, 0x40, 0x30, 0xd0, 0x08, 0x46, 0x1f,
+0xf0, 0xff, 0x58, 0x10, 0x8f, 0xff, 0xd5, 0x14, 0x84, 0xa2, 0xd9, 0x0c, 0x54, 0x61, 0x80, 0x0f,
+0x40, 0x33, 0x60, 0x08, 0x46, 0x6f, 0x0f, 0xff, 0x58, 0x63, 0x0f, 0xff, 0x40, 0x00, 0x18, 0x02,
+0xd5, 0x09, 0x46, 0x10, 0xff, 0xff, 0x40, 0x31, 0xf0, 0x08, 0x58, 0x10, 0x8f, 0xff, 0x40, 0x00,
+0x04, 0x02, 0x40, 0x00, 0x0c, 0x04, 0xb6, 0x02, 0x3a, 0x6f, 0x9c, 0x04, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa0, 0xbc, 0x84, 0x41, 0x96, 0x48, 0x4c, 0x11, 0x40, 0x23, 0x04, 0x80, 0x00, 0x04,
+0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xd4, 0x50, 0x64, 0x00, 0x1c, 0x80, 0x06, 0x46, 0x10,
+0x00, 0x09, 0x58, 0x10, 0x84, 0x44, 0x84, 0x46, 0x4b, 0xe0, 0x1c, 0x01, 0xc8, 0x11, 0x50, 0x84,
+0x00, 0x7c, 0x9d, 0xb6, 0x80, 0x06, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0x74, 0x84, 0x46,
+0x4b, 0xe0, 0x1c, 0x01, 0xc8, 0x05, 0x4c, 0x64, 0x7f, 0xf6, 0x84, 0x01, 0xd5, 0x02, 0x84, 0x00,
+0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x44, 0x30,
+0x01, 0x0c, 0x54, 0xa0, 0x80, 0xff, 0x42, 0x65, 0x0c, 0x24, 0x54, 0x91, 0x00, 0xff, 0x44, 0x20,
+0x00, 0x43, 0x42, 0x64, 0x88, 0x73, 0x97, 0xc0, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x03, 0xb4,
+0x99, 0xb0, 0x84, 0x20, 0x97, 0x20, 0x80, 0x06, 0x81, 0x05, 0xf4, 0x81, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x84, 0x24, 0x4c, 0x70, 0xc0, 0x04, 0x84, 0x03, 0xd5, 0x09,
+0x84, 0x46, 0x4c, 0x71, 0x40, 0x04, 0x84, 0x04, 0xd5, 0x04, 0x84, 0xab, 0xdf, 0x04, 0x84, 0x02,
+0x10, 0x03, 0x00, 0x40, 0x41, 0xe0, 0x88, 0x08, 0x11, 0xe3, 0x00, 0x41, 0x80, 0x28, 0x46, 0x70,
+0x01, 0x02, 0x58, 0x73, 0x86, 0xa4, 0x80, 0x06, 0x80, 0x5e, 0xdd, 0x27, 0x01, 0xc3, 0x00, 0x40,
+0x84, 0x23, 0x4d, 0xc0, 0xc0, 0x1b, 0xf4, 0x01, 0x50, 0x54, 0x00, 0x18, 0x50, 0x33, 0x00, 0x10,
+0x8d, 0x10, 0x51, 0xc3, 0x00, 0x18, 0xc4, 0x09, 0xb6, 0xbf, 0x80, 0x03, 0x80, 0x28, 0x84, 0x48,
+0xdd, 0x27, 0xb4, 0x3f, 0x80, 0x1c, 0xd5, 0x07, 0x80, 0x25, 0x80, 0x03, 0x84, 0x48, 0xdd, 0x27,
+0x80, 0x1c, 0x80, 0x28, 0x84, 0x48, 0xdd, 0x27, 0x80, 0x0a, 0x80, 0x29, 0x80, 0x46, 0x46, 0xf0,
+0x00, 0x00, 0x58, 0xf7, 0x84, 0x80, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa0, 0xbc, 0x44, 0x30, 0x01, 0x0c, 0x97, 0x00, 0x42, 0x62, 0x0c, 0x24, 0x46, 0x20,
+0x00, 0x0c, 0x58, 0x21, 0x03, 0xb4, 0x99, 0xb2, 0x81, 0x01, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x43, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0c,
+0x00, 0x07, 0x84, 0xc1, 0x84, 0xa4, 0xd8, 0x03, 0x84, 0x03, 0xd5, 0x04, 0x84, 0xa6, 0xd8, 0x24,
+0x84, 0x04, 0x45, 0xe0, 0x00, 0x10, 0x10, 0x03, 0x00, 0x40, 0x11, 0xe3, 0x00, 0x41, 0x50, 0x14,
+0x00, 0x20, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xa4, 0x80, 0x06, 0x80, 0x5e, 0x4b, 0xe0,
+0x1c, 0x01, 0x00, 0x03, 0x00, 0x40, 0x84, 0xa3, 0xd8, 0x0f, 0x50, 0x14, 0x00, 0x38, 0x84, 0x48,
+0x50, 0x03, 0x00, 0x10, 0x4b, 0xe0, 0x1c, 0x01, 0x50, 0x03, 0x00, 0x18, 0x50, 0x14, 0x00, 0x30,
+0x84, 0x48, 0x4b, 0xe0, 0x1c, 0x01, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xdc, 0x97, 0x20, 0x55, 0xc0, 0x80, 0xff, 0x54, 0x91, 0x00, 0xff, 0x96, 0xd8, 0xc4, 0x44,
+0x84, 0x23, 0x4c, 0x30, 0x80, 0x05, 0x84, 0x45, 0x4c, 0x31, 0x40, 0x70, 0x85, 0x40, 0x80, 0xe0,
+0x81, 0x2a, 0x81, 0x0a, 0x80, 0xdf, 0xd5, 0x30, 0xa6, 0x38, 0x44, 0x30, 0x00, 0xdd, 0x4c, 0x01,
+0xc0, 0x26, 0x9c, 0x3a, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x20, 0x84, 0x43, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x86, 0xd4, 0xdd, 0x2f, 0xc8, 0x19, 0xa7, 0x7d, 0x87, 0xc1, 0x4c, 0x5f,
+0x40, 0x16, 0xa7, 0x39, 0x00, 0x93, 0x80, 0x06, 0x50, 0x82, 0x7f, 0xfa, 0x54, 0x84, 0x00, 0xff,
+0x50, 0x13, 0x80, 0x08, 0x80, 0x1f, 0x80, 0x48, 0x54, 0x94, 0x80, 0x03, 0xe7, 0x10, 0xe9, 0x40,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xa6, 0xb9, 0x9c, 0x52, 0x89, 0x41,
+0x99, 0xf9, 0x54, 0xa5, 0x00, 0xff, 0xa7, 0x79, 0x9c, 0xea, 0x40, 0x01, 0xa8, 0x00, 0x40, 0xfe,
+0x00, 0x07, 0xe8, 0xcb, 0xd5, 0x0f, 0x84, 0xc5, 0x4c, 0x33, 0x40, 0x30, 0x80, 0x20, 0x80, 0x5c,
+0x80, 0x1f, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xe7, 0x24, 0xe8, 0x20,
+0x81, 0x1c, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x02, 0x84, 0x80, 0x48, 0x80, 0x3f, 0x50, 0x03,
+0x01, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x84, 0x20, 0x00, 0x03,
+0x02, 0x3d, 0x10, 0x93, 0x02, 0x3c, 0x80, 0x49, 0x50, 0x53, 0x01, 0x10, 0x80, 0x61, 0x80, 0x81,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x85, 0xd8, 0xdd, 0x2f, 0x84, 0x01, 0xd5, 0x02, 0x84, 0x00,
+0xec, 0x24, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x85, 0x20, 0x81, 0x09, 0xd5, 0xdb, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x94, 0x85, 0x40, 0x80, 0xc2, 0x55, 0xc0, 0x00, 0xff, 0x44, 0x00,
+0x02, 0x00, 0x81, 0x21, 0x14, 0xaf, 0x80, 0x19, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0x9c,
+0xdd, 0x2f, 0xa7, 0x32, 0xa6, 0x73, 0x40, 0x32, 0x20, 0x08, 0x40, 0x21, 0x84, 0x04, 0x9c, 0x94,
+0x50, 0x1f, 0x80, 0x64, 0x80, 0x66, 0x84, 0x9f, 0x50, 0x8f, 0x80, 0x54, 0x80, 0xe0, 0x46, 0xf0,
+0x00, 0x02, 0x58, 0xf7, 0x84, 0x3c, 0xdd, 0x2f, 0x80, 0x2a, 0x80, 0x08, 0x44, 0x20, 0x00, 0x10,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x84, 0x02, 0x4d, 0xc0, 0x40, 0x1a,
+0x50, 0xaf, 0x80, 0x04, 0xf3, 0x19, 0x80, 0x09, 0x80, 0x47, 0x80, 0x8a, 0x44, 0x50, 0x00, 0x14,
+0x9e, 0x6c, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x81, 0x54, 0xdd, 0x2f, 0x80, 0x08, 0x80, 0x2a,
+0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xd5, 0x0d,
+0x44, 0x10, 0x00, 0x10, 0xf3, 0x19, 0x80, 0x09, 0x80, 0x88, 0x80, 0x47, 0x80, 0xa1, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x80, 0x10, 0xdd, 0x2f, 0x50, 0x1f, 0x80, 0x54, 0x44, 0x20, 0x00, 0x10,
+0x50, 0x03, 0x00, 0x51, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x80, 0x07,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0xb0, 0xdd, 0x2f, 0xec, 0x6c, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x87,
+0x84, 0xc2, 0xf6, 0x0c, 0x84, 0xe3, 0x85, 0x21, 0x84, 0xa0, 0x44, 0x00, 0x00, 0x5f, 0xaf, 0xf1,
+0x10, 0x93, 0x00, 0x00, 0xaf, 0x72, 0xae, 0x33, 0x83, 0x83, 0xf4, 0x81, 0x97, 0xc8, 0x96, 0x90,
+0x4e, 0x82, 0x00, 0x04, 0x84, 0x02, 0xd5, 0x02, 0x84, 0x1e, 0xae, 0x34, 0x46, 0x90, 0x00, 0x0c,
+0x58, 0x94, 0x82, 0x84, 0x00, 0x54, 0x82, 0x3d, 0xa7, 0x36, 0x56, 0x02, 0x80, 0x06, 0x85, 0x41,
+0x87, 0xc2, 0x40, 0x9f, 0x00, 0x1a, 0x40, 0x95, 0x00, 0x1b, 0x40, 0x12, 0x0c, 0x09, 0x94, 0x4b,
+0x40, 0x50, 0xa4, 0x04, 0xaf, 0x76, 0xe6, 0xe5, 0xe9, 0x04, 0x42, 0x52, 0x8c, 0x09, 0xd5, 0x03,
+0x58, 0x52, 0x80, 0x08, 0xaf, 0x76, 0x4e, 0x83, 0x00, 0x14, 0xe6, 0xe5, 0xe9, 0x11, 0xa7, 0x76,
+0x54, 0x01, 0x00, 0x03, 0x44, 0x3f, 0xff, 0xcf, 0x41, 0xe0, 0x10, 0x08, 0x40, 0xa2, 0x8c, 0x02,
+0x40, 0x45, 0x78, 0x04, 0x84, 0x43, 0xaf, 0x36, 0x4c, 0x71, 0x40, 0x0e, 0xd5, 0x0e, 0x84, 0x23,
+0x4c, 0x70, 0xc0, 0x07, 0xa7, 0x36, 0x58, 0x22, 0x00, 0x40, 0xae, 0xb6, 0xd5, 0x06, 0x85, 0x41,
+0x4c, 0x75, 0x00, 0x04, 0x84, 0xa5, 0xdf, 0x09, 0xa6, 0x36, 0x44, 0x1f, 0xff, 0x80, 0x40, 0x30,
+0x04, 0x04, 0x84, 0xa1, 0xae, 0xf6, 0xd7, 0x05, 0xa7, 0x35, 0x58, 0x22, 0x00, 0x01, 0xae, 0xb5,
+0x4e, 0x82, 0x00, 0x05, 0xe6, 0xe3, 0xe8, 0x04, 0xd5, 0x0d, 0xe6, 0xe5, 0xe9, 0x18, 0x01, 0xe3,
+0x00, 0x05, 0x58, 0xaf, 0x00, 0x02, 0x10, 0xa3, 0x00, 0x05, 0x4e, 0x82, 0x00, 0x11, 0x84, 0xa3,
+0xd7, 0x03, 0x84, 0xa5, 0xdf, 0x05, 0xa6, 0x75, 0x58, 0x00, 0x80, 0x10, 0xae, 0x35, 0x4e, 0x82,
+0x00, 0x07, 0x84, 0x41, 0x4c, 0x71, 0x00, 0x04, 0x84, 0xa3, 0xdf, 0x11, 0x46, 0xf0, 0x00, 0x0c,
+0x00, 0x17, 0x84, 0xc1, 0x45, 0xe0, 0x00, 0x10, 0x56, 0x30, 0x80, 0x04, 0x40, 0x5f, 0x04, 0x08,
+0x40, 0xa2, 0x8c, 0x1a, 0x40, 0xaf, 0x0c, 0x1b, 0x10, 0xa3, 0x00, 0x08, 0x50, 0x03, 0x00, 0x09,
+0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x83, 0x4c, 0x84, 0x48, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x86, 0xa4, 0xdd, 0x2f, 0xe6, 0xe4, 0xe9, 0x05, 0x4e, 0x83, 0x00, 0x26, 0x84, 0xa5, 0xdf, 0x23,
+0x46, 0xa0, 0x01, 0x02, 0x58, 0xa5, 0x06, 0xa4, 0x50, 0x03, 0x00, 0x11, 0x80, 0x3c, 0x44, 0x20,
+0x00, 0x20, 0x4b, 0xe0, 0x28, 0x01, 0x4e, 0x83, 0x00, 0x12, 0x84, 0xa5, 0xdf, 0x0f, 0x50, 0x1e,
+0x00, 0x10, 0x50, 0x03, 0x00, 0x31, 0x44, 0x20, 0x00, 0x10, 0x4b, 0xe0, 0x28, 0x01, 0x00, 0x33,
+0x00, 0x40, 0x9d, 0x5a, 0x10, 0x53, 0x00, 0x40, 0xd5, 0x08, 0x84, 0xa3, 0xdf, 0x04, 0x4e, 0x83,
+0x00, 0x05, 0xd5, 0x0c, 0x84, 0xa5, 0xdf, 0x0a, 0xf1, 0x01, 0x50, 0x03, 0x00, 0x41, 0x84, 0x46,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x50, 0x03, 0x00, 0x51, 0x84, 0x20,
+0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x84, 0xa1,
+0xd7, 0x0c, 0x80, 0x09, 0x80, 0x46, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x83, 0x54, 0x46, 0xf0,
+0x00, 0x00, 0x58, 0xf7, 0x88, 0x30, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xee, 0x84, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x07, 0x08, 0x50, 0x60,
+0x00, 0x5b, 0x84, 0x20, 0x97, 0xd0, 0x50, 0x0f, 0x81, 0x60, 0x44, 0x20, 0x00, 0x10, 0xdd, 0x28,
+0x84, 0x20, 0x44, 0x20, 0x00, 0x50, 0x50, 0x0f, 0x81, 0x00, 0xdd, 0x28, 0x50, 0x9f, 0x81, 0x74,
+0x84, 0x20, 0x44, 0x20, 0x00, 0xff, 0x80, 0x1f, 0xdd, 0x28, 0x84, 0x20, 0x84, 0x42, 0x80, 0x09,
+0xdd, 0x28, 0x50, 0x13, 0x7f, 0xaa, 0x80, 0x09, 0x84, 0x42, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x86, 0xa4, 0xdd, 0x2f, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x87, 0x84, 0xc2, 0x4c, 0x70,
+0x00, 0x08, 0x84, 0x43, 0x4c, 0x71, 0x00, 0x05, 0x84, 0x65, 0x4c, 0x71, 0xc0, 0x26, 0x51, 0xcf,
+0x81, 0x50, 0x84, 0x20, 0x84, 0x48, 0x80, 0x1c, 0x50, 0xa3, 0x7f, 0xae, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x46, 0x90, 0x00, 0x02, 0x58, 0x94, 0x84, 0x14, 0x80, 0x0a,
+0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x83, 0x4c, 0x84, 0x48, 0x4b, 0xe0, 0x24, 0x01, 0x84, 0x81,
+0x4c, 0x02, 0x00, 0x09, 0x80, 0x0a, 0x80, 0x3c, 0x84, 0x48, 0x4b, 0xe0, 0x24, 0x01, 0x4e, 0x03,
+0x00, 0xcc, 0x84, 0xa1, 0xd7, 0x6a, 0x00, 0xa3, 0x7f, 0xa7, 0x00, 0x93, 0x7f, 0xa8, 0x41, 0xe5,
+0x20, 0x08, 0x50, 0xa3, 0x7f, 0xf6, 0x41, 0xcf, 0x24, 0x04, 0x80, 0x2a, 0x44, 0x20, 0x00, 0x10,
+0x46, 0x90, 0x01, 0x02, 0x58, 0x94, 0x86, 0xa4, 0x50, 0x0f, 0x81, 0x50, 0x4b, 0xe0, 0x24, 0x01,
+0x84, 0x20, 0x80, 0x0a, 0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08,
+0xdd, 0x2f, 0x00, 0x0f, 0x81, 0x75, 0x84, 0x21, 0x54, 0x00, 0x00, 0x07, 0x51, 0xce, 0x00, 0x04,
+0x4c, 0x00, 0xc0, 0x18, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x84, 0x85, 0x44, 0x8c, 0x2f,
+0x10, 0xa4, 0x82, 0x3d, 0x50, 0x04, 0x80, 0xd0, 0x80, 0x7c, 0x50, 0x23, 0x7f, 0xa5, 0x50, 0x4f,
+0x81, 0x60, 0x80, 0xa1, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x80, 0x10, 0xdd, 0x2f, 0xd5, 0x21,
+0x84, 0x42, 0x4c, 0x01, 0x40, 0x1f, 0x46, 0xa0, 0x00, 0x0c, 0x58, 0xa5, 0x02, 0x84, 0x80, 0x7c,
+0x87, 0x86, 0x11, 0xc5, 0x02, 0x3d, 0x50, 0x05, 0x00, 0xd0, 0x8c, 0x2f, 0x50, 0x23, 0x7f, 0xa5,
+0x50, 0x4f, 0x81, 0x00, 0x9d, 0x4c, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x81, 0x54, 0xdd, 0x2f,
+0x50, 0x1f, 0x81, 0x00, 0x50, 0x0f, 0x81, 0x60, 0x44, 0x20, 0x00, 0x10, 0x4b, 0xe0, 0x24, 0x01,
+0x50, 0x0f, 0x81, 0x50, 0x50, 0x1f, 0x81, 0x60, 0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x86, 0xd4, 0xdd, 0x2f, 0xc8, 0x60, 0xa7, 0x76, 0xa7, 0x37, 0x40, 0x32, 0xa0, 0x08,
+0x40, 0x31, 0x90, 0x04, 0x4e, 0x36, 0x00, 0x04, 0x84, 0x01, 0xd5, 0x57, 0x84, 0x23, 0x4c, 0x70,
+0xc0, 0x05, 0x4e, 0x83, 0x00, 0x06, 0xd5, 0x42, 0x84, 0x05, 0x4c, 0x70, 0x40, 0x40, 0x00, 0x5f,
+0x81, 0x75, 0x84, 0x42, 0x55, 0xe2, 0x80, 0x07, 0x80, 0x9f, 0x50, 0x03, 0x00, 0x08, 0x4d, 0xe1,
+0x40, 0x1e, 0xa6, 0x76, 0x01, 0xe3, 0x00, 0x07, 0x40, 0x90, 0xa0, 0x08, 0x40, 0x14, 0xf8, 0x04,
+0x94, 0xd3, 0x46, 0x20, 0x00, 0x0c, 0x58, 0x21, 0x03, 0x64, 0x50, 0x5f, 0x81, 0x70, 0x85, 0x20,
+0x14, 0x9f, 0x80, 0x5c, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x8e, 0x98, 0xdd, 0x2f, 0xf3, 0x5c,
+0x00, 0x4f, 0x81, 0x71, 0xae, 0xf7, 0xaf, 0x36, 0xd5, 0x0d, 0x80, 0x40, 0x46, 0x00, 0x00, 0x0c,
+0x58, 0x00, 0x03, 0x64, 0x50, 0x13, 0x7f, 0xd6, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x8c,
+0xdd, 0x2f, 0x4e, 0x83, 0x00, 0x0c, 0x84, 0x05, 0x4c, 0x70, 0x40, 0x09, 0x00, 0x5f, 0x81, 0x75,
+0x40, 0x22, 0x90, 0x09, 0x54, 0x21, 0x00, 0x03, 0xd5, 0x02, 0x84, 0x40, 0xa6, 0x77, 0x80, 0x67,
+0x80, 0x88, 0x80, 0x1f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x87, 0x2c, 0xdd, 0x2f, 0x84, 0x60,
+0x40, 0x01, 0x80, 0x06, 0xd5, 0x02, 0x84, 0x00, 0xed, 0x7c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xd4, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x84, 0x00, 0x34,
+0x82, 0x3d, 0x84, 0x45, 0x80, 0xc0, 0xf3, 0x85, 0x01, 0xc4, 0x82, 0x3c, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x8a, 0xe0, 0xdd, 0x2f, 0xc0, 0x69, 0x50, 0x13, 0x00, 0x09, 0x84, 0x48, 0x46, 0x80,
+0x01, 0x02, 0x58, 0x84, 0x06, 0xa4, 0x50, 0x04, 0x80, 0xc8, 0xdd, 0x28, 0x46, 0xf0, 0x00, 0x08,
+0x58, 0xf7, 0x89, 0x60, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x46, 0xf0,
+0x00, 0x00, 0x58, 0xf7, 0x82, 0x78, 0xdd, 0x2f, 0x81, 0x40, 0xc0, 0x4f, 0xa1, 0xc2, 0xc7, 0x4d,
+0x84, 0xc0, 0x80, 0x26, 0x44, 0x20, 0x04, 0x00, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x87, 0x08, 0xdd, 0x2f, 0xf0, 0x05, 0x80, 0x66, 0x80, 0x86, 0x80, 0xa6, 0x80, 0x5c, 0x84, 0x26,
+0x51, 0xc3, 0x80, 0x0e, 0xb6, 0xdf, 0xf6, 0x81, 0x15, 0xcf, 0x80, 0x02, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x89, 0x04, 0xdd, 0x2f, 0x50, 0x14, 0x82, 0x3f, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x18,
+0xdd, 0x28, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0x74, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x1e,
+0xdd, 0x28, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x38, 0x84, 0x42, 0x50, 0x0f, 0x80, 0x24,
+0xdd, 0x28, 0x00, 0x2e, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x03, 0x40, 0x81, 0x20, 0x08, 0x40, 0x84,
+0x00, 0x04, 0x50, 0x1f, 0x80, 0x18, 0x84, 0x4e, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x86, 0xf0, 0xdd, 0x2f, 0x50, 0x14, 0x00, 0x12, 0x80, 0x0a, 0x96, 0x49, 0x80, 0x46, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x8f, 0xd4, 0xdd, 0x2f, 0xec, 0x2c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa0, 0xbc, 0xef, 0xf8, 0x50, 0x6f, 0x80, 0x04, 0x80, 0xe0, 0x84, 0x42, 0x81, 0x01,
+0x80, 0x06, 0x84, 0x20, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x84, 0x42,
+0x80, 0x06, 0x9c, 0x7d, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xa6, 0xb1,
+0x54, 0x01, 0x00, 0x80, 0xc0, 0x16, 0xa6, 0x30, 0x54, 0x10, 0x00, 0x0e, 0xc9, 0x04, 0x54, 0x31,
+0x00, 0x08, 0xcb, 0x0f, 0x54, 0x40, 0x00, 0x0f, 0x84, 0xa3, 0xdc, 0x0b, 0x54, 0x21, 0x00, 0x08,
+0xca, 0x08, 0x80, 0x07, 0x80, 0x28, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x8d, 0x30, 0xdd, 0x2f,
+0xec, 0x08, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x9c, 0x80, 0xc0,
+0x44, 0x00, 0x00, 0x10, 0xf3, 0x83, 0xf2, 0x88, 0xf4, 0x89, 0xf5, 0x8a, 0x4c, 0x30, 0x00, 0x0d,
+0x44, 0x20, 0x00, 0x18, 0x4c, 0x31, 0x00, 0x09, 0x41, 0xe0, 0x04, 0x08, 0x4c, 0x3f, 0x00, 0x05,
+0x84, 0x1f, 0x48, 0x00, 0x00, 0xa2, 0x8e, 0x28, 0x80, 0x01, 0x84, 0xe0, 0xf1, 0x81, 0xf7, 0x97,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0x9c, 0xdd, 0x2f, 0xf0, 0x82, 0xc8, 0x04, 0x84, 0x1e,
+0x48, 0x00, 0x00, 0x93, 0x50, 0x0f, 0x80, 0x54, 0x46, 0xa0, 0x01, 0x02, 0x58, 0xa5, 0x06, 0xa4,
+0x80, 0x26, 0x84, 0x48, 0x4b, 0xe0, 0x28, 0x01, 0xf2, 0x01, 0xf0, 0x02, 0x40, 0x91, 0x0c, 0x09,
+0x50, 0x13, 0x00, 0x08, 0x4b, 0xe0, 0x28, 0x01, 0x84, 0xe5, 0x54, 0x04, 0x80, 0xff, 0x80, 0x89,
+0x42, 0x40, 0x1c, 0x73, 0x40, 0x24, 0x8c, 0x08, 0x05, 0xef, 0x80, 0x02, 0x50, 0x31, 0x7f, 0xf8,
+0x52, 0x50, 0x00, 0x00, 0x54, 0x82, 0x80, 0xff, 0x55, 0xc2, 0x00, 0xff, 0x40, 0xaf, 0x0c, 0x00,
+0x50, 0x64, 0xff, 0xff, 0x14, 0x8f, 0x80, 0x07, 0x15, 0xcf, 0x80, 0x04, 0xf7, 0x85, 0x14, 0xaf,
+0x80, 0x0b, 0xf6, 0x86, 0xf6, 0x06, 0x04, 0xaf, 0x80, 0x0b, 0x05, 0xcf, 0x80, 0x04, 0x46, 0x90,
+0x01, 0x02, 0x58, 0x94, 0x86, 0xa4, 0x50, 0x8f, 0x80, 0x5c, 0x50, 0x7f, 0x80, 0x4c, 0xd5, 0x2f,
+0xa7, 0x0f, 0x9f, 0xb1, 0x40, 0x3e, 0x10, 0x03, 0xae, 0xcf, 0xdd, 0x29, 0x80, 0x2a, 0x84, 0x48,
+0x50, 0x0f, 0x80, 0x3c, 0xdd, 0x29, 0xf3, 0x03, 0x46, 0xf0, 0x00, 0x09, 0x04, 0x17, 0x80, 0xd8,
+0xf2, 0x08, 0x45, 0xe0, 0x00, 0x10, 0x50, 0x4f, 0x80, 0x44, 0x80, 0xa8, 0x50, 0x0f, 0x80, 0x34,
+0x15, 0xef, 0x80, 0x17, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x88, 0xac, 0xdd, 0x2f, 0x50, 0x1f,
+0x80, 0x44, 0x84, 0x48, 0x50, 0x0f, 0x80, 0x54, 0xdd, 0x29, 0x80, 0x0a, 0x80, 0x27, 0x84, 0x48,
+0xdd, 0x29, 0x50, 0x1e, 0x7f, 0xff, 0x55, 0xc0, 0x80, 0xff, 0x8f, 0x48, 0x84, 0x48, 0x50, 0x0f,
+0x80, 0x34, 0x50, 0x1f, 0x80, 0x54, 0x4e, 0x64, 0xff, 0xcd, 0x05, 0xef, 0x80, 0x04, 0xf4, 0x07,
+0xf1, 0x05, 0x40, 0x3f, 0x10, 0x00, 0x9e, 0x89, 0x96, 0x18, 0x84, 0xbf, 0xf2, 0x85, 0xf0, 0x84,
+0xda, 0xb2, 0xf2, 0x01, 0xf5, 0x0a, 0xb6, 0x45, 0xf2, 0x01, 0xf1, 0x02, 0xf0, 0x09, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xf0, 0x02, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x81, 0xb0, 0xdd, 0x2f, 0x84, 0x00, 0xec, 0x64, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xee, 0xe4, 0xb6, 0x5f, 0xf3, 0x81, 0x80, 0xc1, 0x46, 0x70, 0x01, 0x02,
+0x58, 0x73, 0x87, 0x08, 0x84, 0x20, 0x44, 0x20, 0x00, 0x60, 0x83, 0x80, 0x50, 0x0f, 0x80, 0x68,
+0x81, 0x44, 0x81, 0x25, 0x50, 0x8f, 0x80, 0xc8, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x60, 0x50, 0x0f, 0x80, 0x08, 0x4b, 0xe0, 0x1c, 0x01, 0x80, 0x08, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x40, 0x4b, 0xe0, 0x1c, 0x01, 0x5c, 0xf3, 0x00, 0x41, 0xe8, 0x0f, 0x80, 0x08, 0x80, 0x3c,
+0x80, 0x46, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x50, 0x6f, 0x80, 0xc8,
+0x51, 0xcf, 0x81, 0x08, 0x80, 0xe6, 0xd5, 0x0a, 0x80, 0x1c, 0x80, 0x26, 0x80, 0x48, 0x46, 0xf0,
+0x01, 0x03, 0x58, 0xf7, 0x8e, 0x98, 0xdd, 0x2f, 0xd5, 0xf2, 0xa6, 0x78, 0x56, 0x00, 0x80, 0x36,
+0x18, 0x03, 0x80, 0x01, 0x4c, 0x7e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x68, 0x80, 0x07, 0x46, 0xf0,
+0x01, 0x03, 0x58, 0xf7, 0x8e, 0x54, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84, 0x0d, 0xc0,
+0x80, 0x07, 0x50, 0x1f, 0x80, 0xc8, 0x44, 0x20, 0x00, 0x40, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0x3f,
+0xf2, 0x01, 0x80, 0x07, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x50, 0x1f, 0x81, 0x08, 0x46, 0xf0,
+0x01, 0x03, 0x58, 0xf7, 0x8d, 0x48, 0xdd, 0x2f, 0xa6, 0xf0, 0x56, 0x21, 0x80, 0x6a, 0x18, 0x23,
+0x00, 0x01, 0x4c, 0x6e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x08, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x03,
+0x58, 0xf7, 0x8e, 0x54, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84, 0x0d, 0xc0, 0x80, 0x07,
+0x50, 0x1f, 0x80, 0xc8, 0x44, 0x20, 0x00, 0x40, 0x50, 0x6f, 0x81, 0x08, 0x4b, 0xe0, 0x20, 0x01,
+0x44, 0x20, 0x00, 0x10, 0x80, 0x07, 0x80, 0x26, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x80, 0x26,
+0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7, 0x8d, 0x48, 0xdd, 0x2f, 0x46, 0x30, 0x01, 0x02, 0x58, 0x31,
+0x86, 0xa4, 0xe7, 0x31, 0xe9, 0x06, 0x80, 0x0a, 0x80, 0x26, 0x44, 0x20, 0x00, 0x10, 0xd5, 0x04,
+0x80, 0x0a, 0x80, 0x26, 0x80, 0x49, 0x4b, 0xe0, 0x0c, 0x01, 0xed, 0x1c, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xee, 0xcc, 0xb6, 0x5f, 0xf3, 0x81, 0x80, 0xc1,
+0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x87, 0x08, 0x84, 0x20, 0x44, 0x20, 0x00, 0x68, 0x83, 0x80,
+0x50, 0x0f, 0x80, 0x70, 0x81, 0x44, 0x81, 0x25, 0x50, 0x8f, 0x80, 0xdc, 0x4b, 0xe0, 0x1c, 0x01,
+0x84, 0x20, 0x44, 0x20, 0x00, 0x68, 0x50, 0x0f, 0x80, 0x08, 0x4b, 0xe0, 0x1c, 0x01, 0x80, 0x08,
+0x84, 0x20, 0x44, 0x20, 0x00, 0x40, 0x4b, 0xe0, 0x1c, 0x01, 0x5c, 0xf3, 0x00, 0x41, 0xe8, 0x0f,
+0x80, 0x08, 0x80, 0x3c, 0x80, 0x46, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f,
+0x50, 0x6f, 0x80, 0xdc, 0x51, 0xcf, 0x81, 0x1c, 0x80, 0xe6, 0xd5, 0x0a, 0x80, 0x1c, 0x80, 0x26,
+0x80, 0x48, 0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7, 0x81, 0xbc, 0xdd, 0x2f, 0xd5, 0xf2, 0xa6, 0x78,
+0x56, 0x00, 0x80, 0x36, 0x18, 0x03, 0x80, 0x01, 0x4c, 0x7e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x70,
+0x80, 0x07, 0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7, 0x81, 0x78, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03,
+0x58, 0x84, 0x00, 0xe4, 0x80, 0x07, 0x50, 0x1f, 0x80, 0xdc, 0x44, 0x20, 0x00, 0x40, 0x4b, 0xe0,
+0x20, 0x01, 0xb4, 0x3f, 0xf2, 0x01, 0x80, 0x07, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x50, 0x1f,
+0x81, 0x1c, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x8f, 0xd8, 0xdd, 0x2f, 0xa6, 0xf0, 0x56, 0x21,
+0x80, 0x6a, 0x18, 0x23, 0x00, 0x01, 0x4c, 0x6e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x08, 0x80, 0x07,
+0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7, 0x81, 0x78, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84,
+0x00, 0xe4, 0x80, 0x07, 0x50, 0x1f, 0x80, 0xdc, 0x44, 0x20, 0x00, 0x40, 0x50, 0x6f, 0x81, 0x1c,
+0x4b, 0xe0, 0x20, 0x01, 0x44, 0x20, 0x00, 0x14, 0x80, 0x07, 0x80, 0x26, 0x4b, 0xe0, 0x20, 0x01,
+0x80, 0x07, 0x80, 0x26, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x8f, 0xd8, 0xdd, 0x2f, 0x46, 0x30,
+0x01, 0x02, 0x58, 0x31, 0x86, 0xa4, 0xe7, 0x35, 0xe9, 0x06, 0x80, 0x0a, 0x80, 0x26, 0x44, 0x20,
+0x00, 0x14, 0xd5, 0x04, 0x80, 0x0a, 0x80, 0x26, 0x80, 0x49, 0x4b, 0xe0, 0x0c, 0x01, 0xed, 0x34,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x04, 0x00, 0x04, 0x10, 0x00, 0x20,
+0x54, 0x10, 0x81, 0x00, 0xc1, 0x0c, 0x80, 0x60, 0x46, 0x00, 0x04, 0x00, 0x44, 0x21, 0x00, 0x00,
+0x58, 0x00, 0x02, 0x80, 0x14, 0x21, 0x80, 0x9f, 0x84, 0x20, 0xd5, 0x08, 0x80, 0x80, 0x46, 0x00,
+0x04, 0x00, 0x14, 0x12, 0x00, 0x9f, 0x58, 0x00, 0x02, 0x80, 0xb6, 0x20, 0x46, 0x30, 0x04, 0x00,
+0x58, 0x31, 0x82, 0x70, 0xb4, 0x23, 0x40, 0x50, 0xa0, 0x09, 0x40, 0x52, 0xa0, 0x08, 0xb6, 0xa3,
+0x46, 0x50, 0x04, 0x00, 0xb4, 0x83, 0x58, 0x22, 0x00, 0x80, 0xb6, 0x43, 0x04, 0x02, 0x80, 0x96,
+0x58, 0x10, 0x00, 0x03, 0x14, 0x12, 0x80, 0x96, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x04, 0x00,
+0x04, 0x20, 0x80, 0x97, 0x96, 0x14, 0xc0, 0x45, 0x80, 0x81, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10,
+0x82, 0x84, 0x04, 0x32, 0x00, 0x20, 0x04, 0x40, 0x80, 0x98, 0x54, 0x31, 0x81, 0x00, 0x58, 0x52,
+0x00, 0x40, 0x14, 0x50, 0x80, 0x98, 0xc3, 0x1d, 0x46, 0x30, 0x04, 0x00, 0x44, 0x51, 0x00, 0x00,
+0x80, 0x03, 0x14, 0x51, 0x80, 0x9f, 0x84, 0x60, 0x14, 0x30, 0x00, 0xa0, 0x46, 0x00, 0x04, 0x00,
+0x58, 0x00, 0x02, 0x70, 0xb4, 0x60, 0x92, 0x68, 0x40, 0x31, 0xa0, 0x08, 0xb6, 0x60, 0x58, 0x42,
+0x00, 0xc0, 0xb4, 0x60, 0x58, 0x51, 0x80, 0x80, 0xb6, 0xa0, 0x14, 0x40, 0x80, 0x98, 0xd5, 0x19,
+0x46, 0x40, 0x04, 0x00, 0x80, 0x04, 0x14, 0x32, 0x00, 0x9f, 0x14, 0x30, 0x00, 0xa0, 0x46, 0x00,
+0x04, 0x00, 0x58, 0x00, 0x02, 0x70, 0xb4, 0x60, 0x42, 0x52, 0x9c, 0x09, 0x92, 0x68, 0x40, 0x31,
+0xa0, 0x08, 0xb6, 0x60, 0xb4, 0x60, 0x58, 0x41, 0x80, 0x80, 0xb6, 0x80, 0x14, 0x50, 0x80, 0x98,
+0x54, 0x11, 0x10, 0x00, 0xc1, 0x06, 0x84, 0x61, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x37, 0x82, 0x44,
+0x46, 0x00, 0x04, 0x00, 0x14, 0x20, 0x00, 0x97, 0xdd, 0x9e, 0x92, 0x00, 0xc8, 0x0a, 0x46, 0xf0,
+0x00, 0x0c, 0x00, 0x07, 0x80, 0xe6, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x27, 0x80, 0xe8, 0xd5, 0x1c,
+0x84, 0xa1, 0xd8, 0x10, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x47, 0x80, 0xe6, 0x46, 0xf0, 0x00, 0x0c,
+0x00, 0x37, 0x80, 0xe8, 0x40, 0x02, 0x10, 0x09, 0x42, 0x21, 0x98, 0x0b, 0x54, 0x00, 0x00, 0x03,
+0xd5, 0x21, 0x84, 0xa2, 0xd8, 0x0e, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x07, 0x80, 0xe7, 0x46, 0xf0,
+0x00, 0x0c, 0x00, 0x27, 0x80, 0xe9, 0x54, 0x00, 0x00, 0x03, 0x42, 0x21, 0x08, 0x0b, 0xd5, 0x12,
+0x84, 0x83, 0x4c, 0x02, 0x40, 0x31, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x57, 0x80, 0xe7, 0x46, 0xf0,
+0x00, 0x0c, 0x00, 0x27, 0x80, 0xe9, 0x40, 0x02, 0x90, 0x09, 0x42, 0x21, 0x18, 0x0b, 0x40, 0x00,
+0x10, 0x02, 0x84, 0xa1, 0xd8, 0x22, 0x46, 0x50, 0x04, 0x00, 0x80, 0x25, 0x44, 0x41, 0x00, 0x00,
+0x84, 0x60, 0x14, 0x42, 0x80, 0x9f, 0x14, 0x30, 0x80, 0xa0, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10,
+0x82, 0x70, 0xb4, 0xa1, 0x40, 0x32, 0xa0, 0x09, 0x40, 0x31, 0xa0, 0x08, 0xb6, 0x61, 0x4c, 0x20,
+0x40, 0x06, 0xb4, 0x01, 0x58, 0x00, 0x00, 0x82, 0xd5, 0x04, 0xb4, 0x41, 0x58, 0x01, 0x00, 0x80,
+0xb6, 0x01, 0xd5, 0x44, 0x84, 0x00, 0x80, 0x40, 0x9e, 0x42, 0x96, 0x90, 0xe6, 0x22, 0xe8, 0x21,
+0x46, 0x30, 0x04, 0x00, 0x46, 0x00, 0x30, 0x70, 0x80, 0xa3, 0x58, 0x00, 0x03, 0x07, 0x14, 0x01,
+0x80, 0x9d, 0x14, 0x02, 0x80, 0x9e, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x70, 0xb4, 0x80,
+0x40, 0x52, 0x20, 0x09, 0x40, 0x52, 0xa0, 0x08, 0x84, 0x61, 0xb6, 0xa0, 0x4c, 0x21, 0xc0, 0x06,
+0xb4, 0x40, 0x58, 0x11, 0x00, 0x86, 0xd5, 0x21, 0xb4, 0x80, 0x58, 0x12, 0x00, 0x84, 0xd5, 0x1d,
+0x46, 0x10, 0x04, 0x00, 0x80, 0x01, 0x84, 0xa0, 0x14, 0x50, 0x80, 0x9f, 0x14, 0x50, 0x00, 0xa0,
+0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x70, 0xb4, 0x80, 0x40, 0x52, 0x20, 0x09, 0x40, 0x52,
+0xa0, 0x08, 0x84, 0x21, 0xb6, 0xa0, 0x4c, 0x20, 0xc0, 0x06, 0xb4, 0x40, 0x58, 0x11, 0x00, 0x82,
+0xd5, 0x04, 0xb4, 0x80, 0x58, 0x12, 0x00, 0x80, 0xb6, 0x20, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xe4, 0x96, 0x49, 0x40, 0x20, 0x88, 0x09, 0xf2, 0x83, 0x4e, 0x12, 0x01, 0xc4, 0x54, 0x10,
+0x80, 0x03, 0x4e, 0x13, 0x01, 0xc0, 0x46, 0x30, 0xa0, 0xa0, 0x46, 0x90, 0x04, 0x00, 0x58, 0x94,
+0x82, 0x88, 0x46, 0xa0, 0x04, 0x00, 0x58, 0x31, 0x80, 0x01, 0x14, 0x9f, 0x80, 0x02, 0x83, 0x80,
+0xf3, 0x81, 0x50, 0x8f, 0x80, 0x16, 0x81, 0x21, 0x48, 0x00, 0x01, 0xa7, 0xb4, 0xbc, 0xb4, 0xfc,
+0xb4, 0xdc, 0x40, 0x43, 0xa0, 0x09, 0x40, 0x13, 0x40, 0x09, 0x96, 0x48, 0x44, 0x00, 0x00, 0x52,
+0x97, 0xa8, 0x97, 0xe0, 0x4c, 0x10, 0x01, 0x6f, 0x5c, 0xf0, 0x80, 0x53, 0xe8, 0x0a, 0x45, 0xe0,
+0x00, 0x50, 0x4c, 0x1f, 0x00, 0x12, 0x9e, 0x81, 0x4c, 0x11, 0x41, 0x95, 0x48, 0x00, 0x01, 0x5a,
+0x9c, 0x02, 0x4c, 0x10, 0x01, 0x76, 0xe2, 0x20, 0x4e, 0xf3, 0x01, 0x68, 0x9c, 0xc1, 0x4c, 0x11,
+0xc1, 0x8a, 0x48, 0x00, 0x01, 0x7f, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x77, 0x80, 0xe0, 0x4e, 0x72,
+0x01, 0x79, 0x9f, 0x79, 0x97, 0x28, 0xe6, 0x86, 0x4e, 0xf2, 0x00, 0xaa, 0x44, 0x50, 0x00, 0x10,
+0xd6, 0x21, 0xe6, 0xd1, 0xe8, 0x06, 0xc6, 0x10, 0x84, 0xa8, 0x4c, 0x62, 0xc0, 0xa1, 0xd5, 0x66,
+0x44, 0x50, 0x00, 0x60, 0xd6, 0x13, 0x40, 0x5f, 0x04, 0x08, 0xd6, 0x12, 0x44, 0x50, 0x00, 0x20,
+0x4c, 0x62, 0xc0, 0x96, 0xd5, 0x03, 0x80, 0x06, 0xd5, 0x02, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x83, 0xac, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0x8b, 0x84, 0x02, 0xd5, 0xf8, 0x84, 0x03,
+0xd5, 0xf6, 0x84, 0xa4, 0xdf, 0x1a, 0x46, 0x50, 0x04, 0x00, 0x80, 0x25, 0x44, 0x41, 0x00, 0x00,
+0x84, 0x00, 0x14, 0x42, 0x80, 0x9f, 0x14, 0x00, 0x80, 0xa0, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10,
+0x82, 0x70, 0xb4, 0x41, 0x41, 0xe1, 0x20, 0x09, 0x41, 0xef, 0x20, 0x08, 0x15, 0xe0, 0x80, 0x00,
+0xb4, 0xa1, 0x58, 0x22, 0x80, 0x80, 0xd5, 0x1a, 0x84, 0xa5, 0xdf, 0x19, 0x46, 0x20, 0x04, 0x00,
+0x80, 0x22, 0x45, 0xe1, 0x00, 0x00, 0x84, 0xa0, 0x15, 0xe1, 0x00, 0x9f, 0x14, 0x50, 0x80, 0xa0,
+0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x70, 0xb4, 0x81, 0x40, 0x02, 0x20, 0x09, 0x40, 0x00,
+0x20, 0x08, 0xb6, 0x01, 0xb4, 0x41, 0x58, 0x21, 0x00, 0x82, 0xb6, 0x41, 0x46, 0x50, 0x04, 0x00,
+0x47, 0xe0, 0x06, 0x40, 0x80, 0x65, 0x44, 0x10, 0x01, 0x90, 0x59, 0xef, 0x00, 0x64, 0x15, 0xe2,
+0x80, 0x9f, 0x14, 0x11, 0x80, 0xa0, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x70, 0xb4, 0x81,
+0x40, 0x22, 0x20, 0x09, 0x40, 0x21, 0x20, 0x08, 0xd5, 0x35, 0x84, 0xa2, 0xdf, 0x1b, 0x46, 0x40,
+0x04, 0x00, 0x46, 0x20, 0x30, 0x70, 0x83, 0xc4, 0x58, 0x21, 0x03, 0x20, 0x84, 0x21, 0x14, 0x22,
+0x00, 0x9f, 0x14, 0x1f, 0x00, 0xa0, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x70, 0xb4, 0xa1,
+0x40, 0x02, 0xa0, 0x09, 0x40, 0x00, 0x20, 0x08, 0xb6, 0x01, 0xb4, 0x81, 0x58, 0x22, 0x00, 0x80,
+0xd5, 0x1d, 0x84, 0xa3, 0xdf, 0x1c, 0x46, 0x40, 0x04, 0x00, 0x46, 0x20, 0x06, 0x40, 0x83, 0xc4,
+0x58, 0x21, 0x00, 0x64, 0x44, 0x10, 0x01, 0x90, 0x14, 0x22, 0x00, 0x9f, 0x14, 0x1f, 0x00, 0xa0,
+0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x70, 0xb4, 0xa1, 0x40, 0x22, 0xa0, 0x09, 0x40, 0x21,
+0x20, 0x08, 0xb6, 0x41, 0xb4, 0x01, 0x58, 0x20, 0x00, 0x81, 0xb6, 0x41, 0x9f, 0x7f, 0x96, 0x68,
+0xe6, 0x23, 0xe9, 0x04, 0x84, 0xac, 0x4c, 0x72, 0xc0, 0xc5, 0x84, 0xa3, 0xd6, 0x78, 0xe6, 0xc4,
+0xe8, 0x06, 0xc6, 0x0c, 0x84, 0xa1, 0x4c, 0x62, 0xc0, 0xbd, 0xd5, 0x14, 0x84, 0xae, 0xd6, 0x12,
+0x44, 0x50, 0x00, 0x62, 0x4c, 0x62, 0xc0, 0xb6, 0xd5, 0x4c, 0x46, 0x50, 0x04, 0x00, 0x46, 0x30,
+0xa1, 0x40, 0x80, 0x05, 0x58, 0x31, 0x80, 0x01, 0x14, 0x32, 0x80, 0x9f, 0x14, 0x60, 0x00, 0xa0,
+0xd5, 0x31, 0x84, 0xa7, 0xdf, 0x1c, 0x46, 0x10, 0x04, 0x00, 0x83, 0xc1, 0x46, 0x40, 0x10, 0x00,
+0x58, 0x42, 0x00, 0x01, 0x44, 0x21, 0x75, 0x30, 0x14, 0x20, 0x80, 0x9f, 0x14, 0x4f, 0x00, 0xa0,
+0x46, 0x40, 0x04, 0x00, 0x58, 0x42, 0x02, 0x70, 0xb4, 0xa4, 0x40, 0x02, 0xa0, 0x09, 0x40, 0x00,
+0x20, 0x08, 0xb6, 0x04, 0xb4, 0x44, 0x58, 0x11, 0x00, 0x80, 0xb6, 0x24, 0x50, 0x53, 0xff, 0xf8,
+0x96, 0x28, 0xe6, 0x02, 0x4e, 0xf2, 0x00, 0x86, 0x46, 0x10, 0x04, 0x00, 0x83, 0xc1, 0x46, 0x40,
+0x10, 0x00, 0x58, 0x42, 0x00, 0x01, 0x44, 0x31, 0x75, 0x30, 0x14, 0x30, 0x80, 0x9f, 0x14, 0x4f,
+0x00, 0xa0, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x70, 0x05, 0xe0, 0x00, 0x00, 0x40, 0x5f,
+0x20, 0x09, 0x40, 0x52, 0xa0, 0x08, 0xb6, 0xa0, 0xb4, 0x40, 0x58, 0x11, 0x00, 0x80, 0xd5, 0x37,
+0xe6, 0x22, 0xe8, 0x03, 0xf0, 0x01, 0xd5, 0x07, 0x84, 0xac, 0xdf, 0x63, 0x46, 0x00, 0xa0, 0xa2,
+0x58, 0x00, 0x0e, 0xe0, 0x14, 0x05, 0x00, 0xa1, 0x87, 0xc0, 0xf4, 0x02, 0x46, 0x00, 0x04, 0x00,
+0x15, 0xe2, 0x00, 0x00, 0x58, 0x00, 0x02, 0x70, 0xb4, 0xa0, 0x44, 0x2f, 0x00, 0xff, 0x40, 0x32,
+0x88, 0x02, 0xb6, 0x60, 0xb4, 0x20, 0x42, 0x10, 0xbc, 0x08, 0xd5, 0x19, 0xe6, 0x22, 0xe9, 0x03,
+0x84, 0xac, 0xdf, 0x47, 0xf0, 0x01, 0x87, 0xc0, 0x14, 0x05, 0x00, 0xa1, 0x46, 0x00, 0x04, 0x00,
+0xf4, 0x02, 0x58, 0x00, 0x02, 0x70, 0x15, 0xe2, 0x00, 0x00, 0x44, 0x3f, 0x00, 0xff, 0xb4, 0x40,
+0x40, 0x51, 0x0c, 0x02, 0xb6, 0xa0, 0xb4, 0x20, 0x42, 0x10, 0xbc, 0x08, 0xb6, 0x20, 0xd5, 0x31,
+0x46, 0xf0, 0x00, 0x0c, 0x10, 0x67, 0x80, 0xe2, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x77, 0x80, 0xe1,
+0xd5, 0x28, 0x40, 0x23, 0x20, 0x08, 0x40, 0x31, 0x1c, 0x04, 0x80, 0x28, 0x84, 0x42, 0x46, 0x00,
+0x00, 0x0c, 0x58, 0x00, 0x00, 0xe4, 0xd5, 0x16, 0x41, 0xe3, 0x20, 0x08, 0x40, 0x3f, 0x1c, 0x04,
+0x80, 0x28, 0x84, 0x42, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x00, 0xe6, 0xd5, 0x0b, 0x40, 0x43,
+0x20, 0x08, 0x40, 0x32, 0x1c, 0x04, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x00, 0xe8, 0x80, 0x28,
+0x84, 0x42, 0x12, 0x3f, 0x80, 0x0b, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f,
+0x8d, 0x21, 0x51, 0xce, 0x00, 0x04, 0xf3, 0x03, 0xe3, 0x23, 0x4e, 0xf3, 0xfe, 0x59, 0x84, 0x00,
+0xd5, 0x02, 0x84, 0x01, 0xec, 0x1c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x96, 0x49, 0x54, 0x20,
+0x80, 0x03, 0x40, 0x30, 0x88, 0x09, 0xca, 0x10, 0x5c, 0xf0, 0x80, 0xc8, 0xe8, 0x0d, 0x80, 0x20,
+0xb4, 0x40, 0x84, 0x01, 0xd5, 0x04, 0xb4, 0x81, 0x9c, 0x01, 0xab, 0x11, 0x9c, 0x4c, 0xe2, 0x03,
+0xe9, 0xfb, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0x3c,
+0xa4, 0x88, 0x84, 0xa8, 0xda, 0x16, 0x80, 0x80, 0xa2, 0xa1, 0xb4, 0xa4, 0x5c, 0xf2, 0x80, 0x40,
+0xe8, 0x10, 0x84, 0x60, 0xd5, 0x04, 0xa3, 0x91, 0x80, 0x64, 0xb6, 0xc0, 0x40, 0x21, 0x20, 0x08,
+0x92, 0x48, 0x9c, 0x04, 0x9d, 0x19, 0xdb, 0xf8, 0x94, 0x22, 0xac, 0x08, 0x84, 0x00, 0xd5, 0x02,
+0x84, 0x01, 0x3a, 0x6f, 0x98, 0x04, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x94, 0xb5, 0x20,
+0x80, 0xc0, 0x84, 0x01, 0x4c, 0x90, 0x40, 0x7f, 0x51, 0xe3, 0x00, 0x08, 0x51, 0xc3, 0x00, 0x0c,
+0x50, 0xa3, 0x00, 0x20, 0x50, 0x83, 0x00, 0x04, 0xb5, 0x08, 0xb4, 0xbe, 0xb4, 0x9c, 0xb4, 0x6a,
+0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xf0, 0x50, 0x13, 0x00, 0x14, 0x84, 0x46, 0x50, 0x0f,
+0x80, 0x60, 0x01, 0xc3, 0x00, 0x6c, 0x00, 0xa3, 0x00, 0x6d, 0xf3, 0x83, 0xf4, 0x82, 0xf5, 0x81,
+0xdd, 0x27, 0x50, 0x13, 0x00, 0x1a, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x58, 0xdd, 0x27, 0x50, 0x13,
+0x00, 0x24, 0x44, 0x20, 0x00, 0x40, 0x50, 0x0f, 0x80, 0x10, 0xdd, 0x27, 0x50, 0x13, 0x00, 0x64,
+0x50, 0x0f, 0x80, 0x50, 0x84, 0x48, 0xdd, 0x27, 0x54, 0x04, 0x00, 0x01, 0xf3, 0x03, 0xf4, 0x02,
+0xf5, 0x01, 0xc0, 0x05, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x97, 0x84, 0xd1, 0x54, 0x84, 0x00, 0x02,
+0x4e, 0x82, 0x00, 0x0b, 0x84, 0xc1, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x67, 0x84, 0xd3, 0x46, 0xf0,
+0x00, 0x0c, 0x10, 0x67, 0x84, 0xd2, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x02, 0x84, 0x14, 0x53,
+0x00, 0x95, 0x14, 0x43, 0x00, 0x96, 0x10, 0x33, 0x02, 0x3e, 0x11, 0xc3, 0x02, 0x3c, 0x10, 0xa3,
+0x02, 0x3d, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xf0, 0x50, 0x1f, 0x80, 0x60, 0x84, 0x46,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x05, 0x74, 0xdd, 0x27, 0x50, 0x1f, 0x80, 0x58, 0x84, 0x46,
+0x50, 0x03, 0x02, 0x3f, 0xdd, 0x27, 0x50, 0x1f, 0x80, 0x10, 0x44, 0x20, 0x00, 0x40, 0x50, 0x03,
+0x00, 0xd0, 0xdd, 0x27, 0x50, 0x1f, 0x80, 0x50, 0x84, 0x48, 0x50, 0x03, 0x00, 0xc8, 0xdd, 0x27,
+0x84, 0x00, 0x50, 0x13, 0x00, 0xd0, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x86, 0xa0, 0xdd, 0x2f,
+0x84, 0x00, 0xec, 0x6c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0xbc,
+0x96, 0x49, 0x54, 0x70, 0x80, 0x07, 0x40, 0xa0, 0x88, 0x09, 0xcf, 0x2e, 0x9d, 0x84, 0x46, 0x90,
+0x00, 0x05, 0x58, 0x94, 0x86, 0xf4, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x05, 0xb4, 0xd5, 0x1f,
+0xb4, 0x20, 0x40, 0x00, 0xa0, 0x08, 0x92, 0x08, 0x40, 0x20, 0xf8, 0x09, 0x4e, 0x14, 0x00, 0x0a,
+0x40, 0x00, 0xc0, 0x09, 0x84, 0x40, 0x96, 0x48, 0x96, 0x00, 0x4b, 0xe0, 0x20, 0x01, 0xd5, 0x0a,
+0x84, 0xa1, 0xda, 0x09, 0x40, 0x40, 0xc0, 0x09, 0x96, 0x20, 0x96, 0x48, 0x84, 0x40, 0x4b, 0xe0,
+0x24, 0x01, 0xc8, 0x0a, 0xb4, 0xa0, 0x9d, 0xfa, 0xb6, 0xa6, 0x8c, 0xc8, 0x9e, 0x34, 0xe2, 0xea,
+0xe9, 0xe0, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0x96, 0x49, 0x54, 0x70, 0x80, 0x07, 0x41, 0xc0, 0x88, 0x09,
+0xcf, 0x35, 0x9d, 0x84, 0x46, 0xa0, 0x00, 0x05, 0x58, 0xa5, 0x07, 0x68, 0x46, 0x90, 0x00, 0x05,
+0x58, 0x94, 0x86, 0x6c, 0xd5, 0x26, 0xb4, 0x20, 0x9d, 0xfa, 0x40, 0x00, 0xa0, 0x08, 0x92, 0x08,
+0x40, 0x80, 0xf8, 0x09, 0x4e, 0x14, 0x00, 0x0c, 0x40, 0x00, 0xc0, 0x09, 0xb4, 0x46, 0x96, 0x00,
+0x96, 0x48, 0x4b, 0xe0, 0x24, 0x01, 0x84, 0xa1, 0xd0, 0x13, 0xd5, 0x18, 0x84, 0xa1, 0x4c, 0x82,
+0xc0, 0x0c, 0x40, 0x50, 0xc0, 0x09, 0xb4, 0x46, 0x96, 0x28, 0x96, 0x48, 0x4b, 0xe0, 0x28, 0x01,
+0x4c, 0x04, 0x00, 0x07, 0xd5, 0x0b, 0x05, 0xe3, 0x00, 0x00, 0x15, 0xe0, 0x00, 0x00, 0x8c, 0xc8,
+0x9e, 0x34, 0xe2, 0xfc, 0xe9, 0xd9, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xec, 0x04, 0x3a, 0x6f,
+0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x85, 0x0c, 0x96, 0xc9, 0x40, 0x21,
+0xa1, 0x17, 0x40, 0x11, 0x88, 0x09, 0xf1, 0x81, 0x4e, 0x83, 0x00, 0x6a, 0x50, 0x70, 0x00, 0x08,
+0x9d, 0x84, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce, 0x06, 0x6c, 0xd5, 0x5a, 0xb4, 0x20, 0x40, 0x00,
+0xa0, 0x08, 0x92, 0x08, 0x8d, 0x03, 0x40, 0x20, 0xf8, 0x09, 0x4e, 0x14, 0x00, 0x20, 0x40, 0x90,
+0xc0, 0x09, 0x54, 0x94, 0x80, 0xff, 0x54, 0xa0, 0x80, 0xff, 0x80, 0x2a, 0x84, 0x40, 0x80, 0x09,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0x80, 0x40, 0x80, 0x2a, 0x80, 0x09,
+0xca, 0x46, 0xb4, 0x66, 0xb4, 0x82, 0x05, 0xe3, 0x80, 0x00, 0x40, 0x21, 0x8c, 0x05, 0x40, 0x51,
+0x10, 0x02, 0x40, 0x22, 0xf8, 0x04, 0xdd, 0x3c, 0xd5, 0x23, 0x84, 0xa1, 0xda, 0x24, 0x40, 0x00,
+0xc0, 0x09, 0x54, 0x90, 0x00, 0xff, 0x54, 0xa0, 0x80, 0xff, 0x80, 0x2a, 0x84, 0x40, 0x80, 0x09,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0x80, 0x40, 0x80, 0x2a, 0x80, 0x09,
+0xca, 0x26, 0xb4, 0xa6, 0xb4, 0x82, 0xb4, 0x67, 0x40, 0x22, 0x94, 0x05, 0x41, 0xe1, 0x10, 0x02,
+0x40, 0x2f, 0x0c, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0x68, 0xdd, 0x2f, 0x84, 0xa1,
+0xd0, 0x0d, 0xd5, 0x15, 0xb4, 0x60, 0xb4, 0x26, 0xb4, 0x47, 0x40, 0x50, 0x84, 0x05, 0x40, 0x41,
+0x94, 0x02, 0x41, 0xe2, 0x08, 0x04, 0x15, 0xe0, 0x00, 0x00, 0x8c, 0xcc, 0x8c, 0xec, 0x05, 0xef,
+0x80, 0x01, 0x9e, 0x34, 0xe3, 0x1e, 0xe9, 0xa3, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xec, 0x0c,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x04, 0x80,
+0x80, 0x04, 0x80, 0xc1, 0x40, 0x14, 0x50, 0x09, 0x81, 0x20, 0x54, 0x10, 0x80, 0x7f, 0x44, 0x00,
+0x00, 0x14, 0x84, 0xe4, 0x4c, 0x10, 0x00, 0x6e, 0xe4, 0x35, 0xe8, 0x17, 0x84, 0xaa, 0xd1, 0x41,
+0xe4, 0x2b, 0xe8, 0x0a, 0x84, 0xa8, 0xd1, 0x2b, 0xe4, 0x29, 0xe8, 0x32, 0x84, 0xa1, 0x4c, 0x12,
+0xc0, 0xcf, 0x48, 0x00, 0x00, 0xb8, 0x84, 0x0c, 0x4c, 0x10, 0x00, 0x3f, 0xe0, 0x20, 0xe9, 0x45,
+0x9d, 0x44, 0x4c, 0x12, 0xc0, 0xc5, 0xd5, 0x4d, 0x44, 0x50, 0x00, 0x1c, 0x4c, 0x12, 0x80, 0x8b,
+0xe4, 0x3d, 0xe8, 0x0a, 0x9c, 0x82, 0x4c, 0x11, 0x00, 0xbd, 0xe0, 0x22, 0xe9, 0x52, 0x9d, 0x44,
+0x4c, 0x12, 0xc0, 0xb6, 0xd5, 0x56, 0x9c, 0xaa, 0x4c, 0x11, 0x00, 0x8d, 0xe0, 0x22, 0x4e, 0xf3,
+0x00, 0x82, 0x9d, 0x51, 0x4c, 0x12, 0xc0, 0xac, 0x48, 0x00, 0x00, 0x8d, 0xa0, 0x32, 0xa4, 0x76,
+0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x88, 0x8c, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0xa4, 0xa0, 0x32,
+0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8b, 0x04, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0x9b,
+0xa0, 0x32, 0xa4, 0x76, 0x54, 0x74, 0x3f, 0xff, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8a, 0x0c,
+0xdd, 0x2f, 0x48, 0x00, 0x00, 0x90, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x8a, 0x80, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0x87, 0xa0, 0x32, 0x50, 0x13, 0x00, 0x0c, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x88, 0xbc, 0xdd, 0x2f, 0xa5, 0xf6, 0x54, 0x73, 0xbf, 0xff, 0xd5, 0x7a,
+0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x84, 0xec, 0xdd, 0x2f, 0xd5, 0x72,
+0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x89, 0x0c, 0xdd, 0x2f, 0xd5, 0x6a,
+0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x88, 0xf8, 0xdd, 0x2f, 0xd5, 0x62,
+0xa1, 0x32, 0x84, 0x21, 0xa2, 0xa1, 0xb4, 0x64, 0x4c, 0x20, 0xc0, 0x07, 0x46, 0xf0, 0x00, 0x0c,
+0x10, 0x37, 0x84, 0xd0, 0xd5, 0x54, 0x84, 0xa3, 0xda, 0x52, 0x96, 0xd8, 0x46, 0xf0, 0x00, 0x0c,
+0x10, 0x37, 0x84, 0xe8, 0x46, 0x20, 0x04, 0x10, 0x04, 0x01, 0x02, 0x03, 0x42, 0x20, 0x60, 0x09,
+0x42, 0x21, 0x64, 0x09, 0xcb, 0x06, 0x46, 0x00, 0x30, 0x00, 0x46, 0x10, 0x04, 0x10, 0xd5, 0x05,
+0x46, 0x00, 0x10, 0x00, 0x46, 0x10, 0x04, 0x10, 0x40, 0x51, 0x00, 0x04, 0x14, 0x50, 0x82, 0x03,
+0xd5, 0x36, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x83, 0x08, 0xdd, 0x2f,
+0xd5, 0x31, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x83, 0xec, 0xdd, 0x2f,
+0xd5, 0x29, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x80, 0x90, 0xdd, 0x2f,
+0xd5, 0x21, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x86, 0x6c, 0xdd, 0x2f,
+0xd5, 0x19, 0x03, 0xe3, 0x00, 0x06, 0xa0, 0x72, 0x5c, 0xff, 0x00, 0x04, 0xe9, 0x12, 0xb4, 0x61,
+0x84, 0xa1, 0xdb, 0x0d, 0x9d, 0x0c, 0xb4, 0x44, 0x46, 0x00, 0x00, 0x0c, 0x96, 0x50, 0x10, 0x10,
+0x00, 0xec, 0xe6, 0x22, 0xe9, 0x04, 0x84, 0xa0, 0x10, 0x50, 0x00, 0xec, 0x84, 0x00, 0xd5, 0x02,
+0x84, 0x01, 0x93, 0x10, 0x54, 0x84, 0x00, 0x0f, 0x4e, 0x83, 0x00, 0x04, 0x80, 0x08, 0xd5, 0x51,
+0x47, 0xef, 0xff, 0x0f, 0x59, 0xef, 0x0f, 0xff, 0x40, 0x53, 0xf8, 0x02, 0x40, 0x84, 0x40, 0x08,
+0x40, 0x42, 0xa0, 0x04, 0x42, 0x72, 0x78, 0x09, 0x42, 0x73, 0xfc, 0x09, 0x46, 0x3f, 0xf0, 0xff,
+0x43, 0xe3, 0xf8, 0x08, 0x54, 0x20, 0x00, 0x0f, 0x58, 0x31, 0x8f, 0xff, 0x40, 0x1f, 0x0c, 0x02,
+0x40, 0x51, 0x50, 0x08, 0x46, 0x4c, 0x6f, 0xff, 0x40, 0x20, 0x94, 0x04, 0x46, 0xf0, 0x00, 0x0c,
+0x01, 0xe7, 0x80, 0xec, 0x58, 0x42, 0x0f, 0xff, 0x46, 0x31, 0x80, 0x00, 0x40, 0x71, 0x10, 0x02,
+0x40, 0x43, 0x8c, 0x04, 0x54, 0x5f, 0x00, 0x03, 0x40, 0x02, 0xe4, 0x08, 0x42, 0x22, 0x64, 0x09,
+0x42, 0x21, 0x68, 0x09, 0x40, 0x71, 0x00, 0x04, 0x42, 0x73, 0xbc, 0x09, 0x55, 0xe3, 0xbf, 0xff,
+0x5e, 0xff, 0x00, 0x08, 0xe8, 0x07, 0x40, 0x33, 0xb8, 0x09, 0x40, 0x31, 0xb8, 0x08, 0x58, 0x71,
+0x80, 0x08, 0x54, 0x43, 0xbf, 0xff, 0x84, 0x41, 0xad, 0x36, 0x10, 0x23, 0x00, 0x0f, 0xa9, 0xf4,
+0x80, 0x09, 0x80, 0x26, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8d, 0x5c, 0xdd, 0x2f, 0x84, 0x01,
+0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xfc, 0x44, 0x20,
+0x00, 0x14, 0x80, 0xc0, 0x80, 0xe1, 0x84, 0x20, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08,
+0xdd, 0x2f, 0xa6, 0x70, 0xa6, 0xb4, 0xa6, 0x31, 0x84, 0x7e, 0x40, 0x40, 0x8c, 0x02, 0x92, 0x02,
+0x94, 0x02, 0x40, 0x51, 0x0c, 0x02, 0xaf, 0x30, 0xaf, 0x74, 0xae, 0x31, 0xa7, 0x37, 0x00, 0x33,
+0x80, 0x9d, 0x54, 0x21, 0x00, 0x02, 0xae, 0xf5, 0xa6, 0xf3, 0xa1, 0x7b, 0x00, 0x03, 0x80, 0x9e,
+0x54, 0x31, 0x80, 0x30, 0x98, 0x28, 0x96, 0x01, 0x40, 0x70, 0x20, 0x09, 0x54, 0x53, 0x80, 0x3f,
+0x92, 0x86, 0x95, 0x26, 0x40, 0x42, 0x14, 0x04, 0x58, 0x21, 0x00, 0x1c, 0x54, 0x50, 0x80, 0x08,
+0x58, 0x31, 0x80, 0x40, 0x84, 0x20, 0xaf, 0x70, 0xaf, 0x37, 0xae, 0xb4, 0xae, 0x72, 0xae, 0xf3,
+0xae, 0x36, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0xbc,
+0x44, 0x60, 0x00, 0x18, 0x10, 0x60, 0x00, 0x9e, 0x50, 0x60, 0x00, 0x24, 0x80, 0xe0, 0x84, 0x20,
+0x44, 0x20, 0x00, 0x18, 0x80, 0x06, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f,
+0xa6, 0xf0, 0x00, 0x83, 0x00, 0x01, 0x44, 0x0f, 0xff, 0xd8, 0x40, 0x44, 0x00, 0x02, 0x54, 0x51,
+0x80, 0x03, 0x58, 0x22, 0x80, 0x08, 0x58, 0x12, 0x00, 0x01, 0x84, 0x60, 0x10, 0x33, 0x00, 0x16,
+0x10, 0x33, 0x00, 0x17, 0xae, 0xb0, 0xae, 0x71, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xf0,
+0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x84, 0xc3, 0x84, 0x46, 0x50, 0x03, 0x80, 0x28, 0x4b, 0xe0,
+0x20, 0x01, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0x74, 0x84, 0x46, 0x50, 0x03, 0x80, 0x2e,
+0x4b, 0xe0, 0x20, 0x01, 0xa0, 0x79, 0x50, 0x03, 0x80, 0x34, 0x84, 0x46, 0x4b, 0xe0, 0x20, 0x01,
+0x00, 0x03, 0x80, 0x94, 0xc0, 0x06, 0xa6, 0x71, 0x59, 0xe0, 0x80, 0x40, 0x11, 0xe3, 0x00, 0x01,
+0xa7, 0x31, 0x42, 0x22, 0x10, 0x09, 0xae, 0xb1, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x80, 0x20, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x84,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8c, 0x38, 0xdd, 0x2f, 0x84, 0x00, 0xec, 0x04, 0x3b, 0xff,
+0xfc, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0x5c, 0x81, 0x00, 0x97, 0x90, 0x40, 0x90,
+0x80, 0x13, 0x80, 0x1f, 0x84, 0x20, 0x44, 0x20, 0x00, 0xa0, 0x04, 0x74, 0x00, 0x02, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xce, 0x13, 0x46, 0x30, 0x00, 0x0c, 0x58, 0x31,
+0x82, 0x84, 0x00, 0x41, 0x81, 0x70, 0xcc, 0x05, 0x80, 0x64, 0x44, 0x20, 0x00, 0xff, 0xd5, 0x0c,
+0x00, 0x01, 0x81, 0x71, 0xc0, 0x05, 0x50, 0x31, 0x81, 0x30, 0x80, 0x46, 0xd5, 0x05, 0x84, 0x60,
+0x44, 0x20, 0x00, 0xff, 0x80, 0x83, 0x87, 0xc1, 0x50, 0x53, 0x80, 0x0e, 0x50, 0x14, 0xff, 0xf2,
+0x80, 0x1f, 0x11, 0xef, 0x80, 0x9d, 0xf3, 0xa6, 0xb7, 0x1f, 0xf5, 0x82, 0xf1, 0x83, 0x10, 0x4f,
+0x80, 0x94, 0x10, 0x2f, 0x80, 0x9c, 0xf7, 0x81, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8f, 0x0c,
+0xdd, 0x2f, 0x00, 0x0f, 0x80, 0x9e, 0x50, 0x2f, 0x80, 0x24, 0x99, 0x50, 0x9d, 0xeb, 0x92, 0xe2,
+0x95, 0xfa, 0x9b, 0x3d, 0x10, 0x4f, 0x80, 0x9f, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xf0,
+0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x24, 0x84, 0x46, 0x80, 0x07, 0x4b, 0xe0, 0x20, 0x01,
+0xf1, 0x01, 0x9c, 0x3e, 0x8c, 0x2c, 0x84, 0x42, 0x4b, 0xe0, 0x20, 0x01, 0x00, 0x3f, 0x80, 0x9e,
+0x80, 0x3f, 0x50, 0x21, 0x80, 0x08, 0x50, 0x0f, 0x80, 0x10, 0x10, 0x2f, 0x80, 0x9e, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x8e, 0x88, 0xdd, 0x2f, 0x80, 0x1f, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x8f, 0xb0, 0xdd, 0x2f, 0x80, 0xdf, 0x84, 0x00, 0xec, 0xa4, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x17, 0x84, 0xd0, 0xc1, 0x06,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x84, 0xb0, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xbc, 0x85, 0x40, 0x14, 0xaf, 0x80, 0x0f,
+0x46, 0x60, 0x01, 0x02, 0x58, 0x63, 0x06, 0xa4, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x84, 0xc3,
+0x84, 0x46, 0x55, 0xc0, 0x00, 0xff, 0x50, 0x0f, 0x80, 0x2c, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x10,
+0x00, 0x0c, 0x58, 0x10, 0x85, 0x74, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x32, 0x4b, 0xe0, 0x18, 0x01,
+0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x38, 0x84, 0x42, 0x50, 0x0f, 0x80, 0x38, 0x4b, 0xe0,
+0x18, 0x01, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x89, 0x60, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0c,
+0x58, 0x00, 0x02, 0x64, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x78, 0xdd, 0x2f, 0x81, 0x00,
+0x44, 0x00, 0x06, 0x00, 0x04, 0x94, 0x00, 0x02, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0x9c,
+0xdd, 0x2f, 0x80, 0xe0, 0xc8, 0x0d, 0x80, 0x28, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0xbc, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0xdd, 0x50, 0x64,
+0x85, 0x6a, 0x80, 0x2a, 0x44, 0x20, 0x04, 0x00, 0x80, 0x09, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x87, 0x08, 0xdd, 0x2f, 0xa6, 0x35, 0x85, 0x41, 0x58, 0x30, 0x00, 0x08, 0x84, 0xa3, 0x84, 0x9e,
+0x10, 0xa3, 0x00, 0x00, 0xaf, 0x71, 0xaf, 0x34, 0xae, 0xf5, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x07,
+0x84, 0xc1, 0x84, 0x46, 0xa6, 0x76, 0x4c, 0x01, 0x40, 0x09, 0x41, 0xe0, 0x8c, 0x09, 0x41, 0xef,
+0x0c, 0x08, 0x58, 0x1f, 0x00, 0x02, 0xd5, 0x05, 0x92, 0x23, 0x94, 0x4b, 0x58, 0x10, 0x80, 0x01,
+0xae, 0x76, 0xa6, 0x35, 0xa6, 0x76, 0x54, 0x4e, 0x00, 0x01, 0x43, 0xe0, 0x8c, 0x09, 0x94, 0xa3,
+0x40, 0xaf, 0x08, 0x04, 0x58, 0x50, 0x00, 0x05, 0x84, 0x80, 0x45, 0xc0, 0x00, 0x5f, 0x10, 0xa3,
+0x00, 0x06, 0xaf, 0x75, 0xaf, 0x32, 0x11, 0xc3, 0x00, 0x03, 0x50, 0x03, 0x00, 0x09, 0x46, 0x10,
+0x00, 0x0c, 0x58, 0x10, 0x84, 0xea, 0x84, 0x48, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xf0,
+0xdd, 0x2f, 0x46, 0x30, 0x00, 0x0c, 0x58, 0x31, 0x84, 0xf1, 0x00, 0xa1, 0x80, 0x00, 0x50, 0x55,
+0x00, 0x01, 0x55, 0xc2, 0x80, 0xff, 0x11, 0xc1, 0x80, 0x00, 0x9e, 0xd9, 0x4f, 0xc3, 0x00, 0x08,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x04, 0xe9, 0x4c, 0x30, 0x7f, 0xf1, 0xa7, 0x72, 0x01, 0xc3,
+0x00, 0x03, 0x40, 0x42, 0xa0, 0x08, 0x41, 0xe2, 0x70, 0x04, 0x50, 0x2f, 0x00, 0x04, 0x50, 0x1f,
+0x80, 0x3c, 0x80, 0x66, 0x84, 0x9f, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x84, 0x3c,
+0xdd, 0x2f, 0x46, 0x30, 0x01, 0x02, 0x58, 0x31, 0x87, 0x08, 0xf3, 0x81, 0x51, 0xcf, 0x80, 0x1c,
+0x84, 0x20, 0x44, 0x20, 0x00, 0x10, 0x80, 0x1c, 0x46, 0xa0, 0x00, 0x0c, 0x58, 0xa5, 0x02, 0x84,
+0xdd, 0x23, 0x00, 0x25, 0x02, 0x3d, 0x84, 0x26, 0xf3, 0x01, 0x4c, 0x20, 0xc0, 0x21, 0x50, 0x0f,
+0x80, 0x08, 0x84, 0x20, 0x44, 0x20, 0x00, 0x14, 0xdd, 0x23, 0xf3, 0x0f, 0x50, 0x05, 0x00, 0xd0,
+0x80, 0x47, 0x50, 0x4f, 0x80, 0x08, 0x44, 0x50, 0x00, 0x14, 0x9e, 0x6c, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x81, 0x54, 0xdd, 0x2f, 0x80, 0x1c, 0x50, 0x1f, 0x80, 0x08, 0x44, 0x20, 0x00, 0x10,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xd5, 0x0d, 0x8c, 0x2a, 0xf3, 0x0f,
+0x50, 0x05, 0x00, 0xd0, 0x80, 0x9c, 0x80, 0x47, 0x80, 0xa1, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x80, 0x10, 0xdd, 0x2f, 0x46, 0xa0, 0x01, 0x02, 0x58, 0xa5, 0x06, 0xf0, 0x50, 0x1f, 0x80, 0x1c,
+0x44, 0x20, 0x00, 0x10, 0x50, 0x03, 0x00, 0x51, 0x4b, 0xe0, 0x28, 0x01, 0xa6, 0x72, 0xa6, 0x33,
+0x40, 0x60, 0xa0, 0x08, 0x40, 0x63, 0x00, 0x04, 0x50, 0x1f, 0x80, 0x2c, 0x84, 0x4e, 0x80, 0x09,
+0x4b, 0xe0, 0x28, 0x01, 0x50, 0x23, 0x00, 0x12, 0x96, 0x51, 0x80, 0x08, 0x84, 0x40, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x8f, 0xd4, 0xdd, 0x2f, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x81, 0xb0, 0xdd, 0x2f, 0xec, 0x44, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0xc2, 0x17, 0xc0, 0x04, 0xa6, 0xc1, 0x96, 0x1c, 0xc8, 0x13, 0xa6, 0x11, 0x54, 0x20,
+0x00, 0x03, 0xca, 0x0f, 0x54, 0x40, 0x00, 0x04, 0x96, 0x20, 0xc0, 0x0c, 0xa7, 0x49, 0x54, 0x12,
+0x80, 0x03, 0x5c, 0x00, 0x80, 0x01, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x80, 0xe4, 0xdd, 0x2f,
+0x84, 0x01, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0xdc, 0x81, 0x20, 0xa4, 0x06, 0x5c, 0xf0, 0x00, 0x39, 0xe9, 0x3f, 0x04, 0x84, 0x80, 0x02,
+0x50, 0x64, 0x00, 0x04, 0xa6, 0xb7, 0x50, 0x74, 0x00, 0x20, 0x40, 0x41, 0x18, 0x09, 0x46, 0xf0,
+0x00, 0x0c, 0x10, 0x47, 0x84, 0xe9, 0x80, 0x26, 0x80, 0x07, 0x80, 0x48, 0x46, 0xf0, 0x00, 0x02,
+0x58, 0xf7, 0x83, 0x3c, 0xdd, 0x2f, 0x84, 0xa1, 0xd0, 0x28, 0x50, 0x3f, 0x80, 0x04, 0xb7, 0x03,
+0x14, 0x91, 0x80, 0x03, 0xa9, 0x99, 0xa9, 0xda, 0xa9, 0xdc, 0x84, 0x80, 0xa6, 0x73, 0x01, 0xe3,
+0x00, 0x02, 0x54, 0x00, 0x80, 0x3f, 0x40, 0x50, 0x20, 0x08, 0x40, 0x22, 0xf8, 0x04, 0x12, 0x21,
+0x80, 0x0a, 0x12, 0x41, 0x80, 0x0b, 0x87, 0xc2, 0xa6, 0x78, 0x40, 0x00, 0x88, 0x09, 0x54, 0x50,
+0x00, 0x03, 0x4c, 0x5f, 0x00, 0x03, 0xd5, 0x07, 0x80, 0x03, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x80, 0xc0, 0xdd, 0x2f, 0x84, 0x01, 0xd5, 0x02, 0x84, 0x00, 0xec, 0x24, 0x3a, 0x6f, 0xa4, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x84, 0x60, 0xd5, 0x0e, 0x38, 0x50, 0x0c, 0x00, 0x38, 0x40, 0x8c, 0x00,
+0x9c, 0xd9, 0xe2, 0x85, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x08, 0xe2, 0xa4, 0xe8, 0x03, 0x84, 0x02,
+0xd5, 0x04, 0xe2, 0x62, 0xe9, 0xf2, 0x84, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x2f, 0x94, 0x3c,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x81, 0x20, 0x50, 0x0f, 0x80, 0x20, 0xf0, 0x81, 0x80, 0xe1,
+0x84, 0xc0, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xa4, 0xf2, 0x01, 0x84, 0xbf, 0x9d, 0x14,
+0xf4, 0x81, 0x40, 0x04, 0x98, 0x00, 0xb4, 0x62, 0x9c, 0x64, 0x80, 0x43, 0xd3, 0x07, 0xf1, 0x81,
+0x99, 0xb3, 0xb4, 0x24, 0x4b, 0xe0, 0x20, 0x01, 0xd5, 0xf1, 0x80, 0x06, 0xb6, 0xc7, 0xec, 0x0c,
+0x3a, 0x6f, 0xa4, 0x84, 0xec, 0x10, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x84, 0x20,
+0x44, 0x20, 0x00, 0x14, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x04, 0xd0, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x80, 0xc0, 0xa0, 0x02, 0xa6, 0xc0, 0x40, 0x21, 0x90, 0x09,
+0x54, 0x11, 0x00, 0x04, 0x4e, 0x13, 0x01, 0x29, 0xa7, 0x41, 0x54, 0x42, 0x80, 0x40, 0xc4, 0x08,
+0xb5, 0x26, 0x00, 0x84, 0x80, 0x02, 0x54, 0x74, 0x00, 0x01, 0x4e, 0x72, 0x01, 0x1e, 0x9c, 0x04,
+0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xd4, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x44,
+0x84, 0x46, 0x4b, 0xe0, 0x1c, 0x01, 0xc8, 0x03, 0x84, 0xe3, 0xd5, 0x16, 0xa0, 0x32, 0x46, 0x10,
+0x00, 0x0c, 0x58, 0x10, 0x85, 0x74, 0x9c, 0x04, 0x84, 0x46, 0x4b, 0xe0, 0x1c, 0x01, 0xc8, 0x03,
+0x84, 0xe1, 0xd5, 0x0a, 0xa0, 0xf2, 0x84, 0x22, 0xa6, 0x9c, 0x55, 0xe1, 0x00, 0x01, 0x40, 0x7f,
+0x78, 0x1a, 0x40, 0x70, 0xf8, 0x1b, 0x02, 0x03, 0x00, 0x0a, 0x05, 0xe3, 0x00, 0x04, 0x50, 0x90,
+0x7f, 0xe8, 0x50, 0x2f, 0x00, 0x18, 0x12, 0x93, 0x00, 0x0a, 0xa8, 0xb4, 0x04, 0x83, 0x00, 0x02,
+0x00, 0x54, 0x00, 0x00, 0x40, 0x42, 0x90, 0x09, 0x54, 0x02, 0x00, 0x08, 0xc0, 0x1e, 0x02, 0x33,
+0x00, 0x0b, 0x58, 0x11, 0x80, 0x40, 0x96, 0x49, 0x12, 0x13, 0x00, 0x0b, 0xa6, 0x10, 0x96, 0x82,
+0x4e, 0x24, 0x00, 0x06, 0x58, 0x40, 0x80, 0x02, 0x12, 0x43, 0x00, 0x0b, 0x05, 0xe3, 0x00, 0x04,
+0x02, 0x93, 0x00, 0x0a, 0x50, 0x8f, 0x00, 0x02, 0x50, 0x54, 0xff, 0xfe, 0x14, 0x83, 0x00, 0x04,
+0x12, 0x53, 0x00, 0x0a, 0x54, 0x00, 0x00, 0x0f, 0x10, 0x03, 0x00, 0x18, 0xb4, 0x26, 0xa6, 0x89,
+0x54, 0x01, 0x00, 0x10, 0xc0, 0x12, 0x03, 0xe3, 0x00, 0x0b, 0x04, 0x93, 0x00, 0x04, 0x02, 0x83,
+0x00, 0x0a, 0x58, 0x5f, 0x00, 0x08, 0x50, 0x44, 0x80, 0x04, 0x50, 0x34, 0x7f, 0xfc, 0x12, 0x53,
+0x00, 0x0b, 0xa9, 0x34, 0x12, 0x33, 0x00, 0x0a, 0xb4, 0x26, 0xa6, 0x89, 0x54, 0x01, 0x00, 0x40,
+0xc0, 0x0a, 0x02, 0x83, 0x00, 0x0b, 0xa1, 0x74, 0x58, 0x44, 0x00, 0x10, 0x9c, 0xea, 0x12, 0x43,
+0x00, 0x0b, 0xa8, 0xf4, 0xa0, 0x34, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xd4, 0x46, 0x10,
+0x00, 0x09, 0x58, 0x10, 0x84, 0x24, 0x84, 0x46, 0x4b, 0xe0, 0x20, 0x01, 0xc0, 0x0b, 0xa0, 0x34,
+0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x2c, 0x84, 0x46, 0x4b, 0xe0, 0x20, 0x01, 0x4e, 0x03,
+0x00, 0x8c, 0xa1, 0x34, 0x02, 0x33, 0x00, 0x0a, 0x9c, 0x66, 0x51, 0xe1, 0xff, 0xfa, 0xa8, 0x74,
+0x50, 0x8f, 0x80, 0x04, 0x13, 0xe3, 0x00, 0x0a, 0x84, 0x42, 0x80, 0x08, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x86, 0xf0, 0xdd, 0x2f, 0xa0, 0x74, 0x02, 0x03, 0x00, 0x0a, 0x9c, 0x8a, 0x50, 0x90,
+0x7f, 0xfe, 0xa8, 0xb4, 0x12, 0x93, 0x00, 0x0a, 0x80, 0x08, 0x46, 0x90, 0x01, 0x02, 0x58, 0x94,
+0x86, 0xd4, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x34, 0x84, 0x42, 0x4b, 0xe0, 0x24, 0x01,
+0xc0, 0x63, 0x80, 0x08, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x3c, 0x84, 0x42, 0x4b, 0xe0,
+0x24, 0x01, 0xc8, 0x35, 0x84, 0x22, 0x4c, 0x70, 0x80, 0x33, 0xa0, 0xb4, 0x01, 0xe1, 0x00, 0x00,
+0x54, 0x5f, 0x00, 0x0f, 0x40, 0x32, 0x84, 0x0c, 0xe6, 0x79, 0xe8, 0x4e, 0x00, 0x11, 0x00, 0x09,
+0x44, 0x50, 0x00, 0x11, 0xd9, 0x09, 0x99, 0x53, 0xa6, 0xec, 0xa6, 0xad, 0x40, 0x01, 0xa0, 0x08,
+0x40, 0x00, 0x08, 0x04, 0xd5, 0x03, 0x84, 0xa6, 0xd9, 0x3f, 0x84, 0x81, 0x4c, 0x72, 0x40, 0x06,
+0x84, 0x46, 0x4c, 0x11, 0x40, 0x06, 0xd5, 0x38, 0x84, 0x63, 0x4c, 0x71, 0xc0, 0x36, 0x44, 0x50,
+0x00, 0x11, 0xd9, 0x32, 0x44, 0x10, 0x00, 0x6e, 0x4c, 0x00, 0xc0, 0x2f, 0x80, 0x06, 0x84, 0x21,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x85, 0x80, 0xdd, 0x2f, 0xd5, 0x26, 0x50, 0x8f, 0x80, 0x04,
+0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xd4, 0x80, 0x08, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10,
+0x84, 0x40, 0x84, 0x42, 0x4b, 0xe0, 0x1c, 0x01, 0xc0, 0x17, 0x80, 0x08, 0x46, 0x10, 0x00, 0x09,
+0x58, 0x10, 0x84, 0x38, 0x84, 0x42, 0x4b, 0xe0, 0x1c, 0x01, 0xc8, 0x0e, 0xa0, 0x34, 0x84, 0xa3,
+0x01, 0xe0, 0x00, 0x01, 0x4d, 0xe2, 0xc0, 0x09, 0x02, 0x13, 0x00, 0x0a, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x8e, 0x30, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x50, 0x00, 0x0c, 0x58, 0x52, 0x85, 0xd4, 0x46, 0xf0,
+0x00, 0x09, 0x14, 0x57, 0x81, 0x5c, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x84, 0x88, 0xdd, 0x2f,
+0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x64, 0xb4, 0x60, 0xb6, 0x60, 0xa0, 0x81, 0xa8, 0x81,
+0xa0, 0x42, 0xa8, 0x42, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x84, 0xcc, 0xdd, 0x2f, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x84, 0xf0, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x40,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x82, 0x98, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff,
+0xfc, 0x84, 0xdd, 0x9e, 0xc8, 0x02, 0xd5, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x78, 0x96, 0x40, 0x96, 0x8c,
+0xc2, 0x07, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x3c, 0x84, 0x01, 0xd5, 0x69, 0x54, 0x30,
+0x80, 0x02, 0xc3, 0x07, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x3d, 0x84, 0x02, 0xd5, 0x60,
+0x40, 0x60, 0x40, 0x09, 0x96, 0x70, 0x54, 0x50, 0x80, 0x02, 0xc5, 0x08, 0x46, 0xf0, 0x00, 0x0c,
+0x04, 0x67, 0x80, 0x4d, 0x44, 0x02, 0x00, 0x00, 0xd5, 0x53, 0x96, 0x8c, 0xc2, 0x08, 0x46, 0xf0,
+0x00, 0x0c, 0x04, 0x67, 0x80, 0x4c, 0x44, 0x01, 0x00, 0x00, 0xd5, 0x4a, 0x40, 0x60, 0x60, 0x09,
+0x96, 0x74, 0xc1, 0x08, 0x46, 0x00, 0x10, 0x00, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x54,
+0xd5, 0x3f, 0x54, 0x43, 0x00, 0x02, 0xc4, 0x08, 0x46, 0x00, 0x20, 0x00, 0x46, 0xf0, 0x00, 0x0c,
+0x04, 0x67, 0x80, 0x55, 0xd5, 0x35, 0x55, 0xe3, 0x00, 0x04, 0x4f, 0xe2, 0x00, 0x09, 0x46, 0x00,
+0x40, 0x00, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x56, 0xd5, 0x2a, 0x54, 0x13, 0x00, 0x10,
+0xc1, 0x08, 0x46, 0x01, 0x00, 0x00, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x58, 0xd5, 0x20,
+0x54, 0x43, 0x00, 0x20, 0xc4, 0x08, 0x46, 0x02, 0x00, 0x00, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67,
+0x80, 0x59, 0xd5, 0x16, 0x55, 0xe3, 0x00, 0x40, 0x4f, 0xe2, 0x00, 0x09, 0x46, 0x04, 0x00, 0x00,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x5a, 0xd5, 0x0b, 0x54, 0x63, 0x00, 0x80, 0x97, 0xb0,
+0xc6, 0x07, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x67, 0x80, 0x5b, 0x46, 0x08, 0x00, 0x00, 0x46, 0x30,
+0x04, 0x10, 0x58, 0x31, 0x88, 0x00, 0x14, 0x01, 0x80, 0x78, 0x84, 0x20, 0x40, 0x00, 0x98, 0x06,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x87, 0x84, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00,
+0x02, 0x84, 0xdd, 0x26, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x80, 0xc0, 0x5c, 0x00, 0x00, 0x20, 0x80, 0xe1, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x87, 0x84, 0xdd, 0x2f, 0x46, 0x50, 0x00, 0x0c, 0x58, 0x52, 0x80, 0xf0, 0x38, 0x72, 0x9a, 0x0a,
+0x46, 0x10, 0x04, 0x10, 0x58, 0x10, 0x88, 0x00, 0x04, 0x30, 0x80, 0x78, 0x84, 0x81, 0x40, 0x62,
+0x18, 0x0c, 0x40, 0x23, 0x0c, 0x04, 0x14, 0x20, 0x80, 0x78, 0x04, 0x00, 0x80, 0x7a, 0x40, 0x63,
+0x00, 0x04, 0x14, 0x60, 0x80, 0x7a, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x44, 0x40, 0x00, 0x40, 0x84, 0xa0, 0xf5, 0x81, 0x46, 0x10,
+0x04, 0x10, 0x10, 0x4f, 0x80, 0x04, 0x10, 0x4f, 0x80, 0x07, 0x58, 0x10, 0x88, 0x00, 0xb4, 0x61,
+0x50, 0x60, 0x00, 0x9c, 0x58, 0x01, 0x80, 0x02, 0xb6, 0x01, 0x80, 0x01, 0xf2, 0x01, 0x14, 0x20,
+0x80, 0x71, 0x04, 0x70, 0x00, 0x71, 0x42, 0x93, 0x8c, 0x0b, 0xf7, 0x81, 0x81, 0x01, 0x4e, 0x93,
+0xff, 0xfa, 0x42, 0x73, 0x84, 0x0b, 0xcf, 0xf6, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94, 0x80, 0xf0,
+0x50, 0x13, 0x7f, 0x64, 0x50, 0x23, 0x7f, 0xe4, 0x50, 0x04, 0x01, 0xa0, 0x84, 0x62, 0x4b, 0xe0,
+0x24, 0x01, 0x46, 0x00, 0x04, 0x10, 0x50, 0x13, 0x7f, 0x84, 0x50, 0x23, 0x7f, 0xec, 0x58, 0x00,
+0x09, 0xb0, 0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x46, 0x00, 0x04, 0x10, 0x46, 0x90, 0x00, 0x03,
+0x58, 0x94, 0x80, 0xa4, 0x50, 0x13, 0x7f, 0xa4, 0x50, 0x23, 0x7f, 0xf4, 0x58, 0x00, 0x09, 0x80,
+0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x46, 0x00, 0x04, 0x10, 0x50, 0x13, 0x7f, 0xc4, 0x9e, 0xb4,
+0x58, 0x00, 0x09, 0x90, 0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x84, 0x61, 0xaf, 0xf5, 0xaf, 0xf4,
+0x10, 0x34, 0x01, 0xa8, 0x10, 0x34, 0x01, 0xb8, 0x14, 0x73, 0x00, 0x09, 0xaf, 0xf7, 0xaf, 0xf6,
+0xa9, 0xf4, 0xa9, 0xf5, 0xa9, 0xf2, 0xa9, 0xf3, 0x50, 0x03, 0x00, 0x1c, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x81, 0x6c, 0xdd, 0x2f, 0x04, 0x04, 0x00, 0x71, 0x58, 0x20, 0x00, 0x05, 0xf0, 0x81,
+0x10, 0x2f, 0x80, 0x04, 0xf1, 0x01, 0x14, 0x14, 0x00, 0x71, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x42, 0x11, 0x40, 0x08, 0x14, 0x10, 0x00, 0x2d,
+0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x42, 0x11, 0x44, 0x08, 0x14, 0x10, 0x00, 0x2d,
+0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x58, 0x11, 0x00, 0x01, 0x14, 0x10, 0x00, 0x2d,
+0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x58, 0x11, 0x00, 0x02, 0x14, 0x10, 0x00, 0x2d,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0x3c, 0xef, 0xf4, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00,
+0x08, 0x00, 0x50, 0x10, 0x00, 0x80, 0x85, 0x20, 0x04, 0x40, 0x00, 0x43, 0x40, 0x32, 0x40, 0x09,
+0x54, 0x31, 0x80, 0x0f, 0x80, 0x40, 0xc3, 0x64, 0x84, 0x40, 0x97, 0x5c, 0xc5, 0x5c, 0x54, 0x61,
+0x00, 0x03, 0x14, 0x60, 0x00, 0x43, 0x84, 0xc0, 0x04, 0x80, 0x00, 0x43, 0x40, 0x44, 0x20, 0x09,
+0x54, 0x42, 0x00, 0x7f, 0x40, 0x72, 0x20, 0x08, 0x40, 0x53, 0x90, 0x04, 0x14, 0x50, 0x00, 0x1d,
+0x44, 0x7f, 0xff, 0xc7, 0x04, 0xa0, 0x80, 0x02, 0xb5, 0x01, 0x14, 0xaf, 0x80, 0x01, 0x8d, 0x04,
+0x00, 0xaf, 0x80, 0x07, 0x80, 0xa4, 0x40, 0xa5, 0x1c, 0x02, 0x58, 0xa5, 0x00, 0x20, 0x10, 0xaf,
+0x80, 0x07, 0x54, 0x74, 0x00, 0x7f, 0x40, 0xa4, 0x1c, 0x09, 0x40, 0x74, 0x9c, 0x06, 0x04, 0x8f,
+0x80, 0x01, 0x88, 0xea, 0x14, 0x80, 0x80, 0x02, 0x50, 0x83, 0xff, 0xff, 0xd5, 0x08, 0x14, 0xa0,
+0x00, 0x1b, 0x9d, 0xb1, 0x04, 0xa0, 0x00, 0x1b, 0x54, 0x55, 0x00, 0x7f, 0x40, 0xa2, 0xa0, 0x08,
+0xe2, 0xc8, 0xe9, 0xf6, 0x54, 0x63, 0x80, 0x7f, 0x40, 0x63, 0x20, 0x08, 0x40, 0x52, 0xc0, 0x08,
+0x58, 0x73, 0x00, 0x02, 0x58, 0x63, 0x00, 0x18, 0x40, 0x73, 0x94, 0x04, 0x40, 0x53, 0x14, 0x04,
+0x46, 0x68, 0x0f, 0xff, 0x58, 0x63, 0x0f, 0xff, 0x40, 0x42, 0x60, 0x08, 0x40, 0x52, 0x98, 0x02,
+0x40, 0x73, 0x98, 0x02, 0x40, 0x73, 0x90, 0x04, 0x40, 0x42, 0x90, 0x04, 0x14, 0x40, 0x00, 0x44,
+0x14, 0x70, 0x00, 0x45, 0x9c, 0x91, 0x84, 0xa4, 0xd2, 0x98, 0x92, 0x61, 0xd5, 0x9f, 0x46, 0x00,
+0x20, 0x00, 0x14, 0x01, 0x00, 0x78, 0xec, 0x0c, 0x3a, 0x6f, 0xa8, 0x04, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa8, 0x3c, 0xef, 0xf4, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x08, 0x00, 0x50, 0x10,
+0x00, 0x80, 0x85, 0x20, 0x04, 0x40, 0x00, 0x40, 0x40, 0x32, 0x40, 0x09, 0x54, 0x31, 0x80, 0x0f,
+0x80, 0x40, 0xc3, 0x6a, 0x84, 0x40, 0x97, 0x5c, 0xc5, 0x62, 0x54, 0x61, 0x00, 0x03, 0x14, 0x60,
+0x00, 0x40, 0x84, 0xc0, 0x04, 0x80, 0x00, 0x40, 0x40, 0x44, 0x20, 0x09, 0x54, 0x42, 0x00, 0x7f,
+0x40, 0x72, 0x20, 0x08, 0x40, 0x53, 0x90, 0x04, 0x14, 0x50, 0x00, 0x1d, 0x44, 0x7f, 0xff, 0xc7,
+0x04, 0xa0, 0x80, 0x02, 0xb5, 0x01, 0x14, 0xaf, 0x80, 0x01, 0x8d, 0x04, 0x00, 0xaf, 0x80, 0x07,
+0x80, 0xa4, 0x40, 0xa5, 0x1c, 0x02, 0x58, 0xa5, 0x00, 0x28, 0x10, 0xaf, 0x80, 0x07, 0x54, 0x74,
+0x00, 0x7f, 0x40, 0xa4, 0x1c, 0x09, 0x40, 0x74, 0x9c, 0x06, 0x04, 0x8f, 0x80, 0x01, 0x88, 0xea,
+0x14, 0x80, 0x80, 0x02, 0x50, 0x83, 0xff, 0xff, 0xd5, 0x08, 0x14, 0xa0, 0x00, 0x1b, 0x9d, 0xb1,
+0x04, 0xa0, 0x00, 0x1b, 0x54, 0x55, 0x00, 0x7f, 0x40, 0xa2, 0xa0, 0x08, 0xe2, 0xc8, 0xe9, 0xf6,
+0x00, 0x8f, 0x80, 0x07, 0x54, 0x63, 0x80, 0x7f, 0x40, 0x74, 0x04, 0x09, 0x40, 0x63, 0x20, 0x08,
+0x54, 0x73, 0x80, 0x03, 0x40, 0x82, 0xc0, 0x08, 0x40, 0x73, 0x98, 0x04, 0x40, 0x53, 0xa0, 0x04,
+0x58, 0x63, 0x00, 0x02, 0x46, 0x78, 0x0f, 0xff, 0x40, 0x63, 0x20, 0x04, 0x58, 0x73, 0x8f, 0xff,
+0x40, 0x82, 0x60, 0x08, 0x40, 0x52, 0x9c, 0x02, 0x40, 0x63, 0x1c, 0x02, 0x40, 0x63, 0x20, 0x04,
+0x40, 0x42, 0xa0, 0x04, 0x14, 0x40, 0x00, 0x41, 0x14, 0x60, 0x00, 0x42, 0x9c, 0x91, 0x84, 0xa4,
+0xd2, 0x92, 0x92, 0x61, 0xd5, 0x99, 0x46, 0x00, 0x10, 0x00, 0x14, 0x01, 0x00, 0x78, 0xec, 0x0c,
+0x3a, 0x6f, 0xa8, 0x04, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0x3c, 0x04, 0x50, 0x00, 0x29,
+0x04, 0x30, 0x00, 0x2a, 0x9d, 0x2a, 0x9a, 0xa3, 0xe4, 0x42, 0x4e, 0xf3, 0x00, 0x85, 0x00, 0x30,
+0x00, 0xa2, 0x9c, 0x9c, 0x40, 0x81, 0x10, 0x08, 0x40, 0x20, 0x20, 0x00, 0xa7, 0xd7, 0x54, 0x63,
+0x80, 0x80, 0xc6, 0x79, 0xb5, 0x01, 0x50, 0x41, 0x80, 0x24, 0x38, 0x80, 0x12, 0x0a, 0x00, 0x70,
+0x80, 0x9f, 0x00, 0x50, 0x80, 0x9e, 0xa1, 0x0b, 0x99, 0xbd, 0x50, 0x73, 0x00, 0x14, 0x50, 0x50,
+0x80, 0x10, 0x02, 0x81, 0x00, 0x03, 0x95, 0x9c, 0xc4, 0x22, 0x93, 0x0e, 0x40, 0x84, 0x38, 0x08,
+0x40, 0x74, 0x1c, 0x04, 0xad, 0xd3, 0xb6, 0xa2, 0xa7, 0x17, 0x42, 0x42, 0x18, 0x09, 0xaf, 0x17,
+0x99, 0x86, 0xa1, 0x4a, 0x14, 0x53, 0x00, 0x12, 0xa1, 0x0b, 0xa4, 0x52, 0x54, 0x42, 0x3f, 0xff,
+0x92, 0x2e, 0x40, 0x10, 0xb8, 0x08, 0x40, 0x50, 0x90, 0x04, 0xad, 0x52, 0xa7, 0x17, 0xa6, 0x55,
+0x54, 0x52, 0x00, 0x7f, 0x58, 0x10, 0x80, 0x40, 0xaf, 0x57, 0xd5, 0x1b, 0x93, 0x0e, 0x40, 0x84,
+0x38, 0x08, 0x40, 0x74, 0x1c, 0x04, 0xad, 0xd3, 0x99, 0x86, 0xa6, 0x57, 0xb6, 0xa2, 0x58, 0x10,
+0x80, 0x40, 0xae, 0x57, 0x14, 0x43, 0x00, 0x12, 0xa4, 0x52, 0xa7, 0x17, 0x92, 0x2e, 0x40, 0x10,
+0xb8, 0x08, 0xac, 0x52, 0x54, 0x42, 0x00, 0x7f, 0xa6, 0x55, 0xaf, 0x17, 0x42, 0x10, 0x98, 0x09,
+0x95, 0x1c, 0xae, 0x55, 0x98, 0x44, 0x50, 0x10, 0x80, 0x48, 0xa6, 0x8e, 0x44, 0x5f, 0xff, 0xcf,
+0x40, 0x41, 0x14, 0x02, 0x58, 0x22, 0x00, 0x08, 0x9c, 0xdc, 0x84, 0x84, 0xaf, 0x0f, 0xae, 0x8e,
+0x40, 0x51, 0x90, 0x0c, 0x99, 0x05, 0xa4, 0xa3, 0xb4, 0x61, 0x54, 0x51, 0x3f, 0xff, 0x99, 0x1d,
+0xad, 0x0a, 0x46, 0x40, 0x04, 0x10, 0x00, 0x20, 0x00, 0xa2, 0x04, 0x50, 0x00, 0x2a, 0x9c, 0x51,
+0x96, 0x8c, 0x9c, 0xe9, 0x58, 0x42, 0x08, 0x00, 0x14, 0x30, 0x00, 0x2a, 0x10, 0x20, 0x00, 0xa2,
+0x10, 0x22, 0x01, 0x88, 0x3a, 0x6f, 0xa0, 0x04, 0xdd, 0x9e, 0x92, 0x00, 0x04, 0x50, 0x00, 0x2b,
+0x04, 0x30, 0x00, 0x2c, 0x9d, 0x2a, 0x9a, 0xa3, 0xe4, 0x42, 0xe9, 0x3e, 0x00, 0x30, 0x00, 0xa3,
+0x9d, 0x1e, 0x94, 0xa4, 0x98, 0x82, 0xa7, 0x57, 0x54, 0x42, 0x80, 0x80, 0xc4, 0x35, 0x50, 0x51,
+0x80, 0x26, 0x38, 0x10, 0x16, 0x0a, 0x94, 0xdc, 0xa1, 0x0a, 0x98, 0xc3, 0xb6, 0x82, 0xa1, 0x4c,
+0x14, 0x51, 0x80, 0x1b, 0xa5, 0x0e, 0xa4, 0xd3, 0x54, 0x42, 0x3f, 0xff, 0x92, 0x6e, 0x40, 0x31,
+0xb8, 0x08, 0x40, 0x51, 0x90, 0x04, 0xad, 0x53, 0xa7, 0x55, 0x00, 0x40, 0x80, 0x0f, 0xa6, 0xd7,
+0x96, 0x64, 0x95, 0x0e, 0x54, 0x11, 0x80, 0x3f, 0x40, 0x30, 0x90, 0x04, 0x54, 0x12, 0x80, 0x7f,
+0xae, 0xd7, 0xae, 0x55, 0x46, 0x10, 0x04, 0x10, 0x00, 0x50, 0x00, 0xa3, 0x04, 0x40, 0x00, 0x2c,
+0x9c, 0xa9, 0x97, 0x54, 0x9c, 0xe1, 0x58, 0x10, 0x88, 0x00, 0x14, 0x30, 0x00, 0x2c, 0x10, 0x50,
+0x00, 0xa3, 0x10, 0x50, 0x81, 0x98, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x85, 0x20,
+0x80, 0xc0, 0x46, 0x80, 0x00, 0x00, 0x58, 0x84, 0x02, 0xbc, 0xd5, 0x22, 0xa7, 0x1f, 0x54, 0x22,
+0x00, 0x80, 0xc2, 0x30, 0x38, 0x23, 0x06, 0x02, 0x38, 0x93, 0x06, 0x0a, 0x80, 0x22, 0x00, 0x31,
+0x00, 0x14, 0xcb, 0x02, 0xd5, 0x05, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x4b, 0xe0,
+0x20, 0x01, 0x9c, 0x3e, 0x94, 0xc4, 0x99, 0xf3, 0xa6, 0xbf, 0x44, 0x4f, 0xff, 0xc0, 0x40, 0x51,
+0x10, 0x04, 0xaf, 0x7f, 0x04, 0x13, 0x00, 0x2b, 0x9c, 0x09, 0x14, 0x03, 0x00, 0x2b, 0x04, 0x23,
+0x00, 0x2b, 0x04, 0x53, 0x00, 0x2c, 0x97, 0xd4, 0x9c, 0x7e, 0x95, 0x0c, 0x41, 0xe2, 0x88, 0x01,
+0x50, 0x13, 0x80, 0x26, 0x98, 0xf4, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x74, 0x4f, 0xe6,
+0xff, 0xcf, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0xfc, 0x85, 0x20, 0x80, 0xc0, 0x46, 0x80, 0x00, 0x00, 0x58, 0x84, 0x02, 0xbc, 0xd5, 0x1a,
+0xa6, 0xff, 0x54, 0x11, 0x80, 0x80, 0xc1, 0x28, 0x38, 0x13, 0x0a, 0x02, 0x38, 0x93, 0x0a, 0x0a,
+0x4b, 0xe0, 0x20, 0x01, 0xa6, 0x7f, 0xa6, 0xfd, 0x44, 0x0f, 0xff, 0xc0, 0x40, 0x50, 0x80, 0x04,
+0x58, 0x41, 0x80, 0x40, 0xaf, 0x7f, 0xaf, 0x3d, 0x04, 0x23, 0x00, 0x29, 0x9c, 0x11, 0x14, 0x03,
+0x00, 0x29, 0x04, 0x43, 0x00, 0x29, 0x04, 0x53, 0x00, 0x2a, 0x96, 0x64, 0x9c, 0xcc, 0x95, 0xdc,
+0x41, 0xe2, 0x90, 0x01, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x50, 0x20, 0x80, 0x24,
+0x99, 0xf7, 0x4f, 0xe6, 0xff, 0xd7, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x83, 0x80, 0x50, 0x00, 0x00, 0xb8, 0x46, 0x40, 0x04, 0x10,
+0xf0, 0x81, 0x58, 0x42, 0x08, 0x00, 0x00, 0x7e, 0x00, 0xa1, 0x00, 0x12, 0x01, 0xbc, 0x9d, 0x7a,
+0x94, 0xac, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x50, 0xa3, 0x80, 0x22, 0x40, 0x6e,
+0x08, 0x00, 0x4c, 0x70, 0x80, 0x55, 0xa6, 0x77, 0x55, 0xe0, 0x80, 0x80, 0x4f, 0xe2, 0x00, 0x50,
+0x02, 0x83, 0x00, 0x03, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x78, 0xdd, 0x2f,
+0x54, 0x94, 0x3f, 0xff, 0x95, 0x3c, 0x81, 0x00, 0x40, 0x3e, 0x10, 0x00, 0xf0, 0x01, 0xb4, 0x9f,
+0x4e, 0x83, 0x00, 0x07, 0xbb, 0x2d, 0x42, 0x01, 0xc4, 0x08, 0xb8, 0xad, 0xd5, 0x38, 0x39, 0xee,
+0x2a, 0x02, 0x84, 0x41, 0x12, 0x9f, 0x00, 0x06, 0x80, 0x3e, 0x04, 0x51, 0x80, 0x0b, 0x10, 0x2f,
+0x00, 0x14, 0x14, 0x5f, 0x00, 0x04, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0xbc,
+0xdd, 0x2f, 0x38, 0x8e, 0x2a, 0x0a, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20, 0x00, 0x10, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa6, 0xf7, 0x04, 0x84, 0x00, 0x02, 0x58, 0x01,
+0x80, 0x40, 0xae, 0x37, 0xa4, 0x73, 0xb7, 0x06, 0x40, 0x50, 0xb8, 0x09, 0x40, 0x52, 0xb8, 0x08,
+0x58, 0x22, 0x86, 0x40, 0xac, 0xb3, 0xb4, 0x9f, 0x10, 0x72, 0x01, 0xb8, 0x00, 0xae, 0x00, 0xa1,
+0x50, 0x75, 0x00, 0x01, 0x97, 0xbc, 0x10, 0x6e, 0x00, 0xa1, 0xd5, 0x9e, 0xec, 0x0c, 0x3a, 0x6f,
+0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x83, 0x80, 0x50, 0x00, 0x00, 0xb8,
+0x46, 0x40, 0x04, 0x10, 0xf0, 0x81, 0x58, 0x42, 0x08, 0x00, 0x00, 0x7e, 0x00, 0xa0, 0x00, 0x52,
+0x01, 0xac, 0x94, 0xbc, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x74, 0x50, 0xa3, 0x80, 0x20,
+0x40, 0x6e, 0x08, 0x00, 0xd7, 0x54, 0x01, 0xe3, 0x00, 0x07, 0x54, 0x5f, 0x00, 0x80, 0xc5, 0x4f,
+0x02, 0x83, 0x00, 0x03, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x78, 0xdd, 0x2f,
+0x98, 0x7f, 0x54, 0x94, 0x3f, 0xff, 0x81, 0x00, 0x9c, 0x09, 0x95, 0x03, 0x40, 0x3e, 0x10, 0x00,
+0xf0, 0x01, 0xb4, 0x9f, 0x4e, 0x83, 0x00, 0x06, 0x44, 0x31, 0x00, 0x00, 0xbb, 0xad, 0xd5, 0x37,
+0x39, 0xee, 0x2a, 0x02, 0x84, 0x40, 0x12, 0x9f, 0x00, 0x06, 0x80, 0x3e, 0xa1, 0x59, 0x10, 0x2f,
+0x00, 0x14, 0x14, 0x5f, 0x00, 0x04, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0xbc,
+0xdd, 0x2f, 0x38, 0x8e, 0x2a, 0x0a, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20, 0x00, 0x10, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa6, 0xf7, 0x04, 0x84, 0x00, 0x02, 0x58, 0x11,
+0x80, 0x40, 0xae, 0x77, 0xa5, 0x33, 0xb7, 0x06, 0x40, 0x52, 0x38, 0x09, 0x40, 0x52, 0xb8, 0x08,
+0x58, 0x22, 0x80, 0xc8, 0xac, 0xb3, 0xb4, 0x9f, 0x10, 0x72, 0x01, 0xa8, 0x00, 0xae, 0x00, 0xa0,
+0x50, 0x75, 0x00, 0x01, 0x97, 0xbc, 0x10, 0x6e, 0x00, 0xa0, 0xd5, 0xa0, 0xec, 0x0c, 0x3a, 0x6f,
+0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0xb6, 0x20, 0xa8, 0xc1, 0x80, 0xc1,
+0xa0, 0x43, 0x84, 0xe0, 0x81, 0x23, 0x81, 0x02, 0xa8, 0x42, 0x47, 0xc0, 0x01, 0x02, 0x59, 0xce,
+0x07, 0x08, 0x81, 0x47, 0xd5, 0x0c, 0xdd, 0x3c, 0xa6, 0xb7, 0x44, 0x3f, 0xff, 0xc0, 0x40, 0x01,
+0x0c, 0x04, 0xae, 0x37, 0x1c, 0xa4, 0x00, 0x01, 0x9d, 0xf9, 0x8c, 0xd0, 0x80, 0x06, 0x84, 0x20,
+0x44, 0x20, 0x00, 0x10, 0xe2, 0xe9, 0xe9, 0xf0, 0xec, 0x04, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xec, 0xb6, 0x20, 0xa8, 0xc1, 0x46, 0x80, 0x04, 0x10, 0x04, 0x90,
+0x00, 0x03, 0x58, 0x84, 0x09, 0xb0, 0x14, 0x90, 0x00, 0x02, 0x44, 0x70, 0x06, 0x40, 0x83, 0x83,
+0x80, 0xc1, 0x46, 0x30, 0x00, 0x0c, 0x58, 0x31, 0x82, 0x64, 0x40, 0x10, 0x20, 0x03, 0x44, 0x50,
+0x00, 0xc8, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x74, 0x40, 0x41, 0x84, 0x1a, 0x40, 0x40,
+0x04, 0x1b, 0x40, 0x82, 0x84, 0x1b, 0x40, 0x83, 0x84, 0x1a, 0x84, 0xe0, 0xf4, 0x83, 0x81, 0x42,
+0x46, 0x40, 0x01, 0x02, 0x58, 0x42, 0x07, 0x08, 0x81, 0x27, 0x54, 0x34, 0x3f, 0xff, 0xd5, 0x26,
+0xf3, 0x81, 0xf4, 0x82, 0xdd, 0x24, 0xf0, 0x03, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x78,
+0xdd, 0x2f, 0xf3, 0x01, 0xf4, 0x02, 0xc0, 0x20, 0x12, 0x80, 0x00, 0x06, 0x10, 0x90, 0x00, 0x0e,
+0x10, 0x90, 0x00, 0x0f, 0xa6, 0x77, 0x9d, 0xf9, 0x55, 0xe0, 0x80, 0x3f, 0x11, 0xe3, 0x00, 0x07,
+0xa5, 0x73, 0x40, 0x12, 0xb8, 0x09, 0x40, 0x10, 0xb8, 0x08, 0x41, 0xe0, 0x8c, 0x04, 0x13, 0xe3,
+0x00, 0x03, 0xa0, 0x82, 0xaa, 0xb4, 0x1c, 0x05, 0x00, 0x01, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x10, 0xe2, 0xfc, 0xe9, 0xd6, 0xec, 0x14, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x20, 0x04, 0x00, 0x04, 0x61, 0x00, 0x09, 0x84, 0x01, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f, 0x40, 0x03, 0x7c, 0x0a, 0x84, 0xa1, 0xd8, 0x0b,
+0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x00, 0x04, 0xb4, 0x80, 0x54, 0x32, 0x01, 0xfd, 0x58, 0x11,
+0x80, 0x02, 0xd5, 0x08, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x00, 0x04, 0xb4, 0xa0, 0x54, 0x12,
+0x81, 0xfd, 0xb6, 0x20, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x46, 0x60,
+0x04, 0x00, 0x58, 0x63, 0x00, 0x04, 0x84, 0xe0, 0x85, 0x08, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94,
+0x88, 0xd0, 0x84, 0x01, 0x4b, 0xe0, 0x24, 0x01, 0xb4, 0x46, 0x99, 0xff, 0x54, 0x11, 0x00, 0x08,
+0x84, 0x01, 0x97, 0xf8, 0xc1, 0x03, 0x40, 0x73, 0x80, 0x04, 0x05, 0xe3, 0x00, 0x00, 0x8f, 0x01,
+0x54, 0x5f, 0x01, 0xfe, 0x58, 0x42, 0x80, 0x01, 0xb6, 0x86, 0x54, 0x84, 0x00, 0xff, 0x4b, 0xe0,
+0x24, 0x01, 0xb4, 0x66, 0x54, 0x01, 0x81, 0xfe, 0xb6, 0x06, 0x4e, 0x83, 0xff, 0xe4, 0x84, 0x08,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f, 0x80, 0x07, 0xec, 0x04, 0x3a, 0x6f,
+0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x46, 0x60, 0x04, 0x00, 0x97, 0xc0,
+0x58, 0x63, 0x00, 0x04, 0x85, 0x28, 0x46, 0x80, 0x00, 0x03, 0x58, 0x84, 0x08, 0xd0, 0xb4, 0x46,
+0x40, 0x33, 0x9c, 0x09, 0x94, 0x5a, 0x55, 0xe1, 0x01, 0xfb, 0x40, 0x00, 0xf8, 0x04, 0xb6, 0x06,
+0x84, 0x01, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0xa6, 0x84, 0x01, 0x54, 0x42, 0x81, 0xfe, 0x40, 0x32,
+0x00, 0x04, 0xb6, 0x66, 0x8f, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0x46, 0x84, 0x01, 0x54, 0x11,
+0x01, 0xfe, 0xb6, 0x26, 0x99, 0xff, 0x54, 0x94, 0x80, 0xff, 0x4b, 0xe0, 0x20, 0x01, 0x97, 0xf8,
+0x4e, 0x93, 0xff, 0xdf, 0x84, 0x0a, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f,
+0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x20, 0x04, 0x00,
+0x04, 0x01, 0x00, 0x09, 0x84, 0xa1, 0x90, 0x1f, 0xd8, 0x15, 0x46, 0x60, 0x04, 0x00, 0x58, 0x63,
+0x00, 0x04, 0xb4, 0x26, 0x55, 0xe0, 0x81, 0xfd, 0x58, 0x5f, 0x00, 0x02, 0xb6, 0xa6, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f, 0xb4, 0x86, 0x54, 0x32, 0x01, 0xfd, 0xb6, 0x66,
+0xd5, 0x08, 0x80, 0xc2, 0xa0, 0xf1, 0x54, 0x21, 0x81, 0xfd, 0x58, 0x01, 0x00, 0x02, 0xa8, 0x31,
+0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x82, 0xe8,
+0xdd, 0x2f, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x82, 0x74, 0xdd, 0x2f, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x82, 0x08, 0xdd, 0x2f, 0x80, 0xc0, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x81, 0xb0, 0xdd, 0x2f, 0x96, 0x34, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x97, 0x81, 0x97, 0xca, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x82, 0xe8, 0xdd, 0x2f,
+0x84, 0x03, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x82, 0x74, 0xdd, 0x2f, 0xcf, 0x05, 0x44, 0x00,
+0xfc, 0x00, 0x40, 0x63, 0x00, 0x04, 0x46, 0x70, 0x00, 0x03, 0x58, 0x73, 0x82, 0x74, 0x40, 0x03,
+0x20, 0x09, 0x4b, 0xe0, 0x1c, 0x01, 0x96, 0x30, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x82, 0x08, 0xdd, 0x2f, 0x80, 0xc0, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x81, 0xb0,
+0xdd, 0x2f, 0x80, 0x06, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc,
+0x46, 0x60, 0x00, 0x03, 0x58, 0x63, 0x02, 0x74, 0x54, 0x80, 0x80, 0xff, 0x97, 0xc1, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x82, 0xe8, 0xdd, 0x2f, 0x84, 0x02, 0xdd, 0x26, 0x40, 0x03, 0xa0, 0x09,
+0xdd, 0x26, 0x96, 0x38, 0xdd, 0x26, 0x80, 0x08, 0xdd, 0x26, 0x46, 0x60, 0x00, 0x03, 0x58, 0x63,
+0x03, 0x44, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x81, 0xb0, 0xdd, 0x2f, 0x4b, 0xe0, 0x18, 0x01,
+0xc8, 0xfe, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x82, 0xe8, 0xdd, 0x2f, 0x84, 0x04, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x82, 0x74, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x81, 0xb0, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x82, 0xe8, 0xdd, 0x2f, 0x84, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x82, 0x74, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x81, 0xb0, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x04, 0x00, 0x80, 0x01, 0x84, 0x48,
+0x14, 0x20, 0x81, 0x06, 0x14, 0x20, 0x01, 0x0a, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x00, 0x0c,
+0x04, 0x20, 0x00, 0x5c, 0x46, 0x30, 0x04, 0x00, 0x9c, 0x51, 0x14, 0x10, 0x00, 0x5c, 0x04, 0x51,
+0x81, 0x00, 0x80, 0x03, 0x58, 0x42, 0x80, 0x11, 0x14, 0x41, 0x81, 0x00, 0x04, 0x20, 0x01, 0x06,
+0x58, 0x11, 0x00, 0x80, 0x14, 0x10, 0x01, 0x06, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x30, 0x04, 0x00,
+0x80, 0x03, 0x44, 0x20, 0x00, 0x4e, 0x44, 0x10, 0x00, 0xa8, 0x14, 0x21, 0x81, 0x04, 0x14, 0x10,
+0x01, 0x06, 0xdd, 0x9e, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x5c, 0xdd, 0x9e, 0x92, 0x00,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x05, 0x90, 0x84, 0x80, 0xb6, 0x80, 0x84, 0x21, 0xb4, 0x60,
+0xa8, 0xc1, 0xa8, 0x42, 0xb4, 0x40, 0xa1, 0x42, 0x9f, 0x29, 0x40, 0x32, 0x08, 0x02, 0x9c, 0x5a,
+0x95, 0x4a, 0x98, 0xc5, 0x46, 0x40, 0x00, 0x0c, 0x58, 0x42, 0x05, 0x7c, 0xa9, 0x19, 0xb4, 0x40,
+0x9c, 0x51, 0xb6, 0x20, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x81, 0x70,
+0xb4, 0x41, 0x98, 0x02, 0xd5, 0x03, 0x64, 0x00, 0x00, 0x00, 0xb4, 0x81, 0x9a, 0xe0, 0x4e, 0x35,
+0xff, 0xfc, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0xa0, 0x32, 0xc0, 0x2d, 0x84, 0xa2,
+0xd0, 0x2b, 0x84, 0xa3, 0xd8, 0x02, 0xd5, 0x28, 0xa0, 0x33, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x57,
+0x80, 0x5d, 0xd0, 0x07, 0xa0, 0x41, 0x05, 0xe3, 0x00, 0x01, 0x40, 0x50, 0xf8, 0x00, 0xa9, 0x41,
+0xa0, 0x73, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x01, 0x74, 0x4c, 0x13, 0x40, 0x05, 0x84, 0x40,
+0xb6, 0x40, 0xd5, 0x0d, 0x05, 0xe3, 0x00, 0x04, 0x14, 0x1f, 0x00, 0x03, 0xa1, 0x33, 0xa1, 0x74,
+0xa9, 0x64, 0xb4, 0x60, 0x4c, 0x33, 0x40, 0x04, 0xa0, 0x73, 0xb6, 0x20, 0x84, 0x00, 0x84, 0x43,
+0xa8, 0x34, 0xa8, 0xb2, 0xa8, 0x33, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c,
+0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xf4, 0x80, 0xe1, 0x80, 0xc0, 0xc1, 0x7a, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0x84, 0x01, 0xa8, 0x32, 0x46, 0x30, 0x00, 0x0c, 0x04, 0x21,
+0x80, 0x5d, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x01, 0x7c, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10,
+0x81, 0x70, 0xca, 0x0b, 0xa9, 0xb3, 0xa9, 0xb4, 0x14, 0x61, 0x80, 0x5d, 0x46, 0xf0, 0x00, 0x0c,
+0x14, 0x77, 0x80, 0x5e, 0xa9, 0xf1, 0xd5, 0x39, 0xb4, 0x21, 0xb4, 0x00, 0xe2, 0x20, 0xe8, 0x03,
+0x9a, 0x01, 0xd5, 0x02, 0x9a, 0x08, 0x44, 0x10, 0x00, 0x21, 0x40, 0x00, 0x04, 0x37, 0xa0, 0x51,
+0xe2, 0x01, 0xe8, 0x03, 0x9a, 0x08, 0xd5, 0x02, 0x84, 0x00, 0xa8, 0x11, 0xa0, 0xd1, 0x46, 0xf0,
+0x00, 0x0c, 0x04, 0x17, 0x80, 0x5d, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x37, 0x80, 0x5e, 0xa0, 0x11,
+0xe2, 0xe0, 0xe8, 0x0b, 0x9a, 0x07, 0xa8, 0x11, 0x46, 0x00, 0x00, 0x0c, 0x04, 0x50, 0x00, 0x5d,
+0xda, 0x20, 0x14, 0x60, 0x00, 0x5d, 0xd5, 0x1d, 0xa0, 0x93, 0x9b, 0xf8, 0x4c, 0x20, 0xff, 0xf1,
+0xd5, 0x18, 0x14, 0x00, 0x80, 0x5e, 0xc0, 0x0c, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x81, 0x70,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x01, 0x7c, 0xb4, 0x41, 0xb6, 0x40, 0xd5, 0x03, 0x84, 0x22,
+0xa8, 0x72, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c, 0xdd, 0x2f, 0xd5, 0x16,
+0xa8, 0xb3, 0xa0, 0x14, 0x46, 0x10, 0x00, 0x0c, 0xa8, 0x34, 0x05, 0xe1, 0x00, 0x04, 0x14, 0x6f,
+0x00, 0x03, 0xa9, 0x94, 0xa9, 0xf1, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x37, 0x80, 0x5d, 0x04, 0x40,
+0x80, 0x5e, 0xa0, 0x19, 0xe2, 0x80, 0xe8, 0xd6, 0xd5, 0xe5, 0xec, 0x0c, 0x3a, 0x6f, 0x9c, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0x90,
+0xa0, 0xc9, 0xa1, 0x4a, 0xf0, 0x01, 0x9f, 0x29, 0x40, 0x22, 0x0c, 0x02, 0x9d, 0x92, 0x95, 0x72,
+0x99, 0x0d, 0xa1, 0xa1, 0xa0, 0xc9, 0x9c, 0x99, 0xa8, 0x89, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x80, 0x0c, 0xdd, 0x2f, 0x84, 0x00, 0xa8, 0x34, 0xb6, 0x06, 0xa8, 0x31, 0xa8, 0x32, 0xa8, 0x33,
+0x80, 0x06, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x17, 0x80, 0x5c, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x27,
+0x80, 0x98, 0x9a, 0x0a, 0x4e, 0x05, 0x00, 0x07, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x88,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x04, 0x01,
+0x84, 0x21, 0xa8, 0x42, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x04, 0x01, 0x84, 0x20, 0xb6, 0x20,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x04, 0x01, 0x96, 0x00, 0xa8, 0x09, 0xdd, 0x9e, 0x92, 0x00,
+0x46, 0x00, 0x04, 0x01, 0x84, 0x22, 0xa8, 0x42, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x04, 0x01,
+0x04, 0x00, 0x81, 0x8a, 0x96, 0x04, 0xc0, 0x04, 0x84, 0x41, 0x14, 0x20, 0x81, 0x8a, 0xdd, 0x9e,
+0x46, 0x20, 0x04, 0x01, 0xa0, 0x52, 0x56, 0x00, 0x80, 0x04, 0x42, 0x00, 0x08, 0x0b, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0x50, 0x04, 0x00, 0x46, 0x60, 0x04, 0x01, 0x58, 0x63, 0x06, 0x8c,
+0x04, 0x82, 0x80, 0x80, 0xb4, 0x86, 0x46, 0x70, 0x00, 0x03, 0x58, 0x73, 0x88, 0xdc, 0x58, 0x02,
+0x00, 0x40, 0xb6, 0x06, 0x44, 0x00, 0x00, 0xff, 0xdd, 0x27, 0x44, 0x00, 0x00, 0xff, 0xdd, 0x27,
+0x44, 0x00, 0x00, 0xff, 0xdd, 0x27, 0x44, 0x00, 0x00, 0xff, 0xdd, 0x27, 0xb4, 0x66, 0x42, 0x11,
+0x98, 0x09, 0x54, 0x04, 0x00, 0x03, 0xb6, 0x26, 0xc8, 0x14, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00,
+0x02, 0x04, 0xb4, 0x80, 0x46, 0x3f, 0xf0, 0xff, 0x58, 0x22, 0x00, 0x01, 0xb6, 0x40, 0x05, 0xe0,
+0x00, 0x00, 0x58, 0x31, 0x8f, 0xff, 0x50, 0x10, 0x00, 0x08, 0x40, 0x2f, 0x0c, 0x02, 0xd5, 0x19,
+0x84, 0xa1, 0xd8, 0x1c, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x04, 0xb4, 0xa0, 0x42, 0x42,
+0x80, 0x09, 0xb6, 0x80, 0x46, 0x3f, 0xf0, 0xff, 0xb4, 0x40, 0x58, 0x31, 0x8f, 0xff, 0x41, 0xe1,
+0x0c, 0x02, 0x15, 0xe0, 0x00, 0x00, 0xb4, 0xa0, 0x50, 0x10, 0x00, 0x08, 0x42, 0x22, 0xd0, 0x08,
+0xb6, 0x40, 0xb4, 0x41, 0x58, 0x01, 0x03, 0x00, 0xb6, 0x01, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0x9c, 0x3c, 0x96, 0xd8, 0x96, 0x90, 0xcb, 0x15, 0x54, 0x21, 0x00, 0xfc, 0xd5, 0x0f,
+0x38, 0x41, 0x84, 0x02, 0x9c, 0xdc, 0x40, 0x52, 0x60, 0x09, 0x40, 0x72, 0x20, 0x09, 0x40, 0x62,
+0x40, 0x09, 0xa9, 0xc1, 0xa9, 0x82, 0xa9, 0x43, 0xb6, 0x80, 0x8c, 0x10, 0x4c, 0x31, 0x7f, 0xf2,
+0xd5, 0x0c, 0x84, 0xa1, 0xdb, 0x0a, 0x84, 0x60, 0xd5, 0x05, 0xa3, 0xc9, 0x38, 0x71, 0x80, 0x08,
+0x9c, 0xd9, 0x97, 0x18, 0xe2, 0x82, 0xe9, 0xfa, 0x3a, 0x6f, 0x9c, 0x04, 0xdd, 0x9e, 0x92, 0x00,
+0x96, 0x01, 0x96, 0x89, 0xe2, 0x02, 0xe8, 0x02, 0x80, 0x20, 0x96, 0x09, 0xdd, 0x9e, 0x92, 0x00,
+0x96, 0x00, 0x96, 0x88, 0xe2, 0x02, 0xe8, 0x02, 0x80, 0x20, 0x96, 0x08, 0xdd, 0x9e, 0x92, 0x00,
+0xd5, 0x03, 0x92, 0x00, 0x9e, 0x01, 0x96, 0x00, 0xc8, 0xfd, 0xdd, 0x9e, 0xd5, 0x08, 0x44, 0x10,
+0x00, 0xff, 0x92, 0x00, 0x9e, 0x49, 0x96, 0x48, 0xc9, 0xfd, 0x9e, 0x01, 0x96, 0x00, 0xc8, 0xf8,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0xbc, 0x96, 0x00, 0x54, 0xa0,
+0x80, 0xff, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x84, 0x4c, 0x97, 0xd1, 0x40, 0x80, 0x04, 0x00,
+0x84, 0xc0, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94, 0x83, 0x7c, 0xd5, 0x09, 0x4b, 0xe0, 0x24, 0x01,
+0x9d, 0xb1, 0x9d, 0xf9, 0x18, 0x04, 0x00, 0x01, 0x97, 0xb0, 0x97, 0xf9, 0x80, 0x07, 0x84, 0x20,
+0xe2, 0xca, 0xe9, 0xf5, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0x00, 0x04, 0x00, 0x04, 0x10, 0x00, 0x09, 0x4e, 0x14, 0x00, 0x04, 0x84, 0x21, 0xd5, 0x02,
+0x84, 0x20, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x17, 0x85, 0x89, 0x44, 0x00, 0x00, 0x11, 0x84, 0x20,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x83, 0x7c, 0xdd, 0x2f, 0x54, 0x30, 0x00, 0x0f, 0x84, 0xa2,
+0xdb, 0x0e, 0x54, 0x40, 0x00, 0x10, 0xc4, 0x09, 0x46, 0x50, 0x04, 0x00, 0x05, 0xe2, 0x80, 0x08,
+0x42, 0x6f, 0x2c, 0x09, 0x14, 0x62, 0x80, 0x08, 0x84, 0x20, 0xd5, 0x02, 0x84, 0x21, 0x46, 0xf0,
+0x00, 0x09, 0x10, 0x17, 0x85, 0x88, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x88, 0xc8, 0x47,
+0x46, 0x60, 0x00, 0x03, 0x58, 0x63, 0x08, 0xf8, 0x84, 0x02, 0x84, 0x21, 0x94, 0x83, 0xdd, 0x26,
+0x84, 0x08, 0x84, 0x26, 0x44, 0x20, 0x00, 0x12, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x24, 0x84, 0x22,
+0x9e, 0x82, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x2a, 0x84, 0x23, 0x94, 0x8b, 0xdd, 0x26, 0x44, 0x00,
+0x00, 0x2e, 0x84, 0x23, 0x44, 0x20, 0x00, 0x1b, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x35, 0x84, 0x21,
+0x44, 0x20, 0x00, 0x1e, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x39, 0x84, 0x21, 0x44, 0x20, 0x00, 0x1f,
+0xdd, 0x26, 0x44, 0x00, 0x00, 0x76, 0x84, 0x21, 0x94, 0x8d, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x7a,
+0x84, 0x21, 0x44, 0x20, 0x00, 0x21, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x78, 0x84, 0x21, 0x44, 0x20,
+0x00, 0x26, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x96, 0x84, 0x21, 0x44, 0x20, 0x00, 0x24, 0xdd, 0x26,
+0x44, 0x00, 0x00, 0x9d, 0x84, 0x21, 0x44, 0x20, 0x00, 0x25, 0xdd, 0x26, 0x3a, 0x6f, 0x98, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xec, 0x40, 0x80, 0x00, 0x13, 0x54, 0x94,
+0x00, 0xff, 0x46, 0x70, 0x04, 0x01, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x04, 0x4c, 0x97, 0x08,
+0x96, 0x92, 0x96, 0xda, 0x89, 0x20, 0x58, 0x73, 0x84, 0x00, 0x84, 0xc0, 0x47, 0xc0, 0x00, 0x03,
+0x59, 0xce, 0x03, 0x7c, 0x85, 0x47, 0xd5, 0x1a, 0xc3, 0x0b, 0xf2, 0x82, 0xf3, 0x81, 0xf4, 0x83,
+0x80, 0x08, 0x84, 0x20, 0xdd, 0x3c, 0xf2, 0x02, 0xf3, 0x01, 0xf4, 0x03, 0xd5, 0x03, 0x00, 0x04,
+0x80, 0x00, 0x9c, 0x71, 0x8d, 0x01, 0x56, 0x63, 0x00, 0x01, 0xc2, 0x03, 0x40, 0x05, 0x18, 0x1a,
+0xaa, 0x39, 0x97, 0x88, 0x40, 0x84, 0x00, 0x13, 0x8d, 0x21, 0xe2, 0xc4, 0xe9, 0xe6, 0xec, 0x14,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0, 0x00, 0x09, 0x02, 0x07, 0x82, 0xbe, 0xc8, 0x02,
+0xd5, 0x03, 0x84, 0xa1, 0xd8, 0x0b, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x07, 0x85, 0x82, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x87, 0x5c, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x85, 0xc8, 0x1c, 0x46, 0xf0, 0x00, 0x09,
+0x02, 0x07, 0x82, 0xbe, 0x84, 0xa1, 0xd8, 0x13, 0x46, 0x40, 0x04, 0x01, 0x04, 0x12, 0x01, 0xa3,
+0x46, 0x00, 0x04, 0x10, 0x59, 0xe0, 0x80, 0x08, 0x54, 0x5f, 0x00, 0xff, 0x14, 0x52, 0x01, 0xa3,
+0x58, 0x00, 0x02, 0x38, 0xb4, 0x60, 0x42, 0x11, 0xc4, 0x08, 0xd5, 0x36, 0x84, 0xa2, 0xd8, 0x50,
+0xd5, 0x49, 0x84, 0xa2, 0xd8, 0x4d, 0x46, 0xf0, 0x00, 0x09, 0x02, 0x07, 0x82, 0xbe, 0xc8, 0x48,
+0x46, 0xf0, 0x00, 0x09, 0x02, 0x07, 0x82, 0xbf, 0x44, 0x50, 0x00, 0x81, 0xd0, 0x1d, 0x5c, 0xf0,
+0x00, 0x82, 0xe8, 0x08, 0xe6, 0x0a, 0xe8, 0x03, 0xc8, 0x0f, 0xd5, 0x34, 0x9f, 0x69, 0xd8, 0x38,
+0xd5, 0x31, 0x9c, 0x6a, 0x4c, 0x00, 0x80, 0x20, 0xe2, 0x01, 0xe9, 0x18, 0x9d, 0x49, 0xd0, 0x20,
+0x9d, 0x4a, 0xd8, 0x2e, 0xd5, 0x22, 0x97, 0x40, 0x46, 0x40, 0x04, 0x01, 0x94, 0x2d, 0x58, 0x42,
+0x00, 0x08, 0x98, 0x04, 0xd5, 0x05, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x38, 0x05, 0xe0,
+0x00, 0x00, 0x58, 0x1f, 0x00, 0x40, 0xb6, 0x20, 0xd5, 0x15, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00,
+0x00, 0x58, 0xd5, 0xf6, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x78, 0xd5, 0xf1, 0x46, 0x00,
+0x04, 0x01, 0x58, 0x00, 0x00, 0x98, 0xd5, 0xec, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0xb8,
+0xd5, 0xe7, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0x5c, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x85, 0xc0, 0x05,
+0x84, 0xa2, 0x4c, 0x02, 0xc0, 0xa3, 0xd5, 0x1a, 0x46, 0xf0, 0x00, 0x09, 0x02, 0x37, 0x82, 0xbe,
+0x84, 0xa1, 0x4c, 0x32, 0xc0, 0x9b, 0x46, 0x30, 0x04, 0x01, 0x04, 0x41, 0x81, 0xa3, 0x46, 0x50,
+0x04, 0x10, 0x54, 0x22, 0x00, 0xf7, 0x14, 0x21, 0x81, 0xa3, 0x04, 0x02, 0x80, 0x8e, 0x43, 0xe0,
+0x44, 0x09, 0x15, 0xe2, 0x80, 0x8e, 0x48, 0x00, 0x00, 0x83, 0x46, 0xf0, 0x00, 0x09, 0x02, 0x57,
+0x82, 0xbe, 0x4e, 0x53, 0x00, 0x83, 0x46, 0x20, 0x00, 0x09, 0x02, 0x01, 0x02, 0xbf, 0x44, 0x50,
+0x00, 0x82, 0xd0, 0x3b, 0x5c, 0xf0, 0x00, 0x83, 0xe8, 0x07, 0xc0, 0x71, 0xe6, 0x0a, 0xe9, 0x0c,
+0x9f, 0x69, 0xd8, 0x6d, 0xd5, 0x25, 0x9c, 0x6a, 0x4c, 0x00, 0x80, 0x4a, 0xe2, 0x01, 0xe9, 0x3a,
+0x9d, 0x49, 0xd8, 0x65, 0xd5, 0x51, 0x55, 0xe0, 0x00, 0xff, 0x46, 0x50, 0x04, 0x01, 0x58, 0x52,
+0x86, 0x88, 0x58, 0x3f, 0x00, 0x60, 0x15, 0xe2, 0x80, 0x00, 0x40, 0x0f, 0x14, 0x08, 0xb6, 0x65,
+0x50, 0x12, 0xf9, 0x80, 0x41, 0xe0, 0x04, 0x00, 0xb4, 0x7e, 0x42, 0x11, 0x98, 0x09, 0xb6, 0x3e,
+0x00, 0x01, 0x05, 0x7e, 0x58, 0x40, 0x00, 0x60, 0xb6, 0x05, 0xb6, 0x85, 0xd5, 0x48, 0x46, 0x00,
+0x04, 0x01, 0x58, 0x00, 0x06, 0x88, 0x44, 0x30, 0x00, 0x11, 0x44, 0x20, 0x00, 0x71, 0xb6, 0x60,
+0x50, 0x10, 0x79, 0xb0, 0xb6, 0x40, 0xd5, 0x34, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x06, 0x88,
+0x44, 0x30, 0x00, 0x12, 0x44, 0x20, 0x00, 0x72, 0xb6, 0x60, 0x50, 0x10, 0x79, 0xd0, 0xb6, 0x40,
+0xd5, 0x27, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x06, 0x88, 0x44, 0x30, 0x00, 0x13, 0x44, 0x20,
+0x00, 0x73, 0xb6, 0x60, 0x50, 0x10, 0x79, 0xf0, 0xb6, 0x40, 0xd5, 0x1a, 0x46, 0x00, 0x04, 0x01,
+0x58, 0x00, 0x06, 0x88, 0x44, 0x30, 0x00, 0x14, 0x44, 0x20, 0x00, 0x74, 0xb6, 0x60, 0x50, 0x10,
+0x7a, 0x10, 0xb6, 0x40, 0xd5, 0x0d, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x06, 0x88, 0x44, 0x30,
+0x00, 0x15, 0x44, 0x20, 0x00, 0x75, 0xb6, 0x60, 0xb6, 0x40, 0x50, 0x10, 0x7a, 0x30, 0x05, 0xe0,
+0x80, 0x00, 0x42, 0x4f, 0x18, 0x09, 0xb6, 0x81, 0xb6, 0x60, 0xb6, 0x40, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x5c,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xf4, 0x96, 0x92, 0x97, 0xc1, 0x97, 0x8b, 0xf2, 0x81, 0x47, 0xc0, 0x00, 0x03, 0x59, 0xce,
+0x0a, 0x34, 0x46, 0xa0, 0x00, 0x03, 0x58, 0xa5, 0x07, 0x74, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94,
+0x87, 0x80, 0xd5, 0x20, 0x96, 0x30, 0x44, 0x10, 0x00, 0x40, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x88, 0xc0, 0xdd, 0x2f, 0x81, 0x00, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0xa0, 0xdd, 0x2f,
+0xc0, 0xfb, 0xf3, 0x01, 0x80, 0x28, 0x84, 0x40, 0x80, 0x07, 0xdd, 0x3c, 0x50, 0x63, 0x7f, 0xc0,
+0x80, 0x08, 0x50, 0x73, 0x80, 0x40, 0x4b, 0xe0, 0x28, 0x01, 0x97, 0xb3, 0x4b, 0xe0, 0x24, 0x01,
+0x97, 0xf9, 0x4e, 0x64, 0xff, 0xe1, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x57, 0x85, 0x84, 0x40, 0x80, 0x00, 0x10,
+0x4c, 0x54, 0x40, 0x31, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x04, 0x4c, 0x44, 0x40, 0x00, 0x40,
+0x84, 0x60, 0x10, 0x30, 0x00, 0x8e, 0x10, 0x40, 0x00, 0x8d, 0x10, 0x40, 0x00, 0x3e, 0x10, 0x30,
+0x00, 0x3f, 0x10, 0x40, 0x00, 0x45, 0x10, 0x30, 0x00, 0x46, 0x10, 0x40, 0x00, 0x4c, 0x10, 0x30,
+0x00, 0x4d, 0x10, 0x40, 0x00, 0x53, 0x10, 0x30, 0x00, 0x54, 0x10, 0x40, 0x00, 0x5a, 0x10, 0x30,
+0x00, 0x5b, 0x10, 0x40, 0x00, 0x61, 0x10, 0x30, 0x00, 0x62, 0x10, 0x40, 0x00, 0x68, 0x10, 0x30,
+0x00, 0x69, 0x10, 0x40, 0x00, 0x6f, 0x10, 0x30, 0x00, 0x70, 0x10, 0x40, 0x00, 0x86, 0x10, 0x30,
+0x00, 0x87, 0x46, 0x60, 0x00, 0x09, 0x00, 0x03, 0x05, 0x80, 0x44, 0x10, 0x00, 0x40, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x88, 0xc0, 0xdd, 0x2f, 0x80, 0x20, 0x80, 0x48, 0x84, 0x60, 0x80, 0xe0,
+0x44, 0x00, 0x00, 0x28, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8a, 0x34, 0xdd, 0x2f, 0x80, 0x07,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x74, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x87, 0x80, 0xdd, 0x2f, 0x00, 0x53, 0x05, 0x80, 0x5c, 0xf2, 0x80, 0x41, 0xe9, 0x37, 0x46, 0x60,
+0x00, 0x03, 0x58, 0x63, 0x07, 0xa0, 0x4b, 0xe0, 0x18, 0x01, 0xc0, 0xfe, 0x46, 0xf0, 0x00, 0x09,
+0x00, 0x67, 0x84, 0x78, 0x84, 0xa1, 0x46, 0x00, 0x00, 0x09, 0x46, 0x20, 0x00, 0x03, 0x58, 0x21,
+0x08, 0xc0, 0xde, 0x05, 0x00, 0x00, 0x05, 0x80, 0x84, 0x2a, 0xd5, 0x05, 0x00, 0x00, 0x05, 0x80,
+0x44, 0x10, 0x00, 0x36, 0x50, 0x00, 0x7f, 0xc0, 0x96, 0x00, 0x4b, 0xe0, 0x08, 0x01, 0x84, 0x40,
+0x80, 0x20, 0x80, 0xc0, 0x80, 0x62, 0x44, 0x00, 0x00, 0x68, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x8a, 0x34, 0xdd, 0x2f, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x74, 0xdd, 0x2f,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0x46, 0x30, 0x00, 0x09, 0x58, 0x31,
+0x84, 0x4c, 0x84, 0x40, 0x84, 0x82, 0x10, 0x41, 0x80, 0x8e, 0x10, 0x21, 0x80, 0x8d, 0x10, 0x21,
+0x80, 0x3e, 0x10, 0x41, 0x80, 0x3f, 0x10, 0x21, 0x80, 0x45, 0x10, 0x41, 0x80, 0x46, 0x10, 0x21,
+0x80, 0x4c, 0x10, 0x41, 0x80, 0x4d, 0x10, 0x21, 0x80, 0x53, 0x10, 0x41, 0x80, 0x54, 0x10, 0x21,
+0x80, 0x5a, 0x10, 0x41, 0x80, 0x5b, 0x10, 0x21, 0x80, 0x61, 0x10, 0x41, 0x80, 0x62, 0x10, 0x21,
+0x80, 0x68, 0x10, 0x41, 0x80, 0x69, 0x10, 0x21, 0x80, 0x6f, 0x10, 0x41, 0x80, 0x70, 0x10, 0x21,
+0x80, 0x86, 0x10, 0x41, 0x80, 0x87, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0xfc, 0x46, 0x80, 0x00, 0x09, 0x02, 0x04, 0x02, 0xbe, 0x84, 0xa3, 0x40, 0x10, 0x20, 0x09,
+0xd1, 0x45, 0xe6, 0x24, 0xe8, 0x07, 0x84, 0xa1, 0xd1, 0x0d, 0x84, 0xa2, 0x4c, 0x12, 0xc0, 0x98,
+0xd5, 0x34, 0x84, 0xa7, 0xd1, 0x34, 0x84, 0xaf, 0xd1, 0x14, 0x84, 0xa6, 0x4c, 0x12, 0xc0, 0x90,
+0xd5, 0x1e, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x80, 0x44, 0x10, 0x00, 0x12, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x88, 0xc0, 0xdd, 0x2f, 0x80, 0x20, 0x84, 0x00, 0x80, 0x40, 0xd5, 0x79,
+0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x80, 0x84, 0x2c, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x88, 0xc0, 0xdd, 0x2f, 0x80, 0x20, 0x44, 0x00, 0x00, 0x1c, 0xd5, 0x51, 0x46, 0xf0, 0x00, 0x09,
+0x00, 0x07, 0x85, 0x80, 0x84, 0x2a, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xc0, 0xdd, 0x2f,
+0x80, 0x20, 0x44, 0x00, 0x00, 0x12, 0xd5, 0x43, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x8d, 0xd0, 0xdd, 0x2f, 0xd5, 0x5f, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x67,
+0x85, 0x88, 0xce, 0x03, 0x96, 0x00, 0xc8, 0x05, 0x44, 0x00, 0x00, 0x9e, 0x84, 0x24, 0xd5, 0x2f,
+0x46, 0x70, 0x00, 0x03, 0x58, 0x73, 0x83, 0x7c, 0x80, 0x26, 0x50, 0x00, 0x00, 0x27, 0x4b, 0xe0,
+0x1c, 0x01, 0x81, 0x20, 0x80, 0x26, 0x44, 0x00, 0x00, 0x27, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x50,
+0x00, 0xff, 0x80, 0x20, 0xd0, 0x05, 0x00, 0x04, 0x05, 0x7c, 0xe6, 0x0d, 0xe9, 0x1a, 0x46, 0xf0,
+0x00, 0x09, 0x00, 0x07, 0x85, 0x7c, 0x84, 0xa1, 0xd8, 0x06, 0x44, 0x00, 0x00, 0xa2, 0x44, 0x10,
+0x00, 0x12, 0xd5, 0x0d, 0x84, 0xa2, 0xd8, 0x06, 0x44, 0x00, 0x00, 0xb4, 0x44, 0x10, 0x00, 0x1c,
+0xd5, 0x06, 0x84, 0xa3, 0xd8, 0x24, 0x44, 0x00, 0x00, 0xd0, 0x84, 0x28, 0x84, 0x40, 0xd5, 0x19,
+0x40, 0x00, 0xa0, 0x08, 0x55, 0xe4, 0x80, 0xff, 0x40, 0x8f, 0x00, 0x04, 0x40, 0x84, 0x00, 0x13,
+0x80, 0x26, 0x80, 0x08, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x17, 0x85, 0x80,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xc0, 0xdd, 0x2f, 0x80, 0x20, 0x84, 0x41, 0x80, 0x08,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8d, 0x5c, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x87, 0x5c, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x40, 0x04, 0x01, 0x80, 0x64, 0x96, 0x48, 0x96, 0x00,
+0x14, 0x02, 0x01, 0x00, 0x14, 0x11, 0x81, 0x01, 0x96, 0x10, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x87, 0x74, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x84, 0x00,
+0x80, 0x20, 0x84, 0x41, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x80, 0xc0, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x09, 0x00, 0x07, 0x85, 0x82, 0x84, 0x20, 0x84, 0x41, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x80, 0xc0, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x85, 0x44, 0x50, 0x00, 0x81, 0xd0, 0x50,
+0x9d, 0x69, 0xd0, 0x0b, 0x9f, 0x6a, 0xd8, 0x44, 0x47, 0xe0, 0x04, 0x01, 0x04, 0x5f, 0x01, 0xa3,
+0x54, 0x42, 0x80, 0x08, 0xcc, 0x43, 0xd5, 0x44, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x7e,
+0x9f, 0x69, 0xd0, 0x12, 0x5c, 0xf0, 0x00, 0x82, 0xe8, 0x05, 0xc0, 0x3a, 0xe6, 0x0a, 0xe8, 0x30,
+0xd5, 0x24, 0x9c, 0x6a, 0x4c, 0x00, 0x80, 0x13, 0xe2, 0x01, 0xe9, 0x0b, 0x9d, 0x49, 0xd0, 0x13,
+0x9d, 0x4a, 0xd8, 0x26, 0xd5, 0x15, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x38, 0xd5, 0x1b,
+0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x58, 0xd5, 0x16, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00,
+0x00, 0x78, 0xd5, 0x11, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x98, 0xd5, 0x0c, 0x46, 0x00,
+0x04, 0x01, 0x58, 0x00, 0x00, 0xb8, 0xd5, 0x07, 0x46, 0x50, 0x04, 0x01, 0x95, 0x05, 0x58, 0x52,
+0x80, 0x08, 0x98, 0x25, 0x05, 0xe0, 0x00, 0x00, 0x42, 0x0f, 0x18, 0x0b, 0xd5, 0x0a, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0x5c, 0xdd, 0x2f, 0xd5, 0x0b, 0x84, 0x02, 0xd5, 0x02, 0x84, 0x00,
+0x84, 0x20, 0x84, 0x42, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x80, 0xc0, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x30, 0x04, 0x01, 0x04, 0x51, 0x81, 0x80,
+0x46, 0xf0, 0x00, 0x09, 0x10, 0x57, 0x85, 0x85, 0x80, 0x83, 0x04, 0x12, 0x01, 0x81, 0x46, 0xf0,
+0x00, 0x09, 0x10, 0x17, 0x85, 0x86, 0x80, 0xa3, 0x04, 0x21, 0x81, 0x82, 0x04, 0x42, 0x81, 0x83,
+0x96, 0x10, 0x96, 0x60, 0x40, 0x30, 0xa0, 0x08, 0x40, 0x51, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x09,
+0x12, 0x57, 0x82, 0xbe, 0x46, 0x20, 0x04, 0x01, 0x80, 0x02, 0x04, 0x11, 0x01, 0x84, 0x04, 0x30,
+0x01, 0x85, 0x97, 0x08, 0x97, 0x58, 0x40, 0x22, 0xa0, 0x08, 0x40, 0x51, 0x10, 0x04, 0x46, 0xf0,
+0x00, 0x09, 0x12, 0x57, 0x82, 0xbf, 0x80, 0x20, 0x04, 0x40, 0x81, 0x86, 0x04, 0x30, 0x01, 0x87,
+0x96, 0x60, 0x96, 0x18, 0x40, 0x40, 0x20, 0x08, 0x40, 0x32, 0x04, 0x04, 0x46, 0x00, 0x04, 0x01,
+0x46, 0xf0, 0x00, 0x09, 0x12, 0x37, 0x82, 0xc0, 0x84, 0x41, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x09,
+0x14, 0x57, 0x81, 0x5d, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x27, 0x85, 0x83, 0x14, 0x10, 0x01, 0x8c,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x30, 0x04, 0x01, 0x44, 0x50, 0x00, 0xff, 0x80, 0x43, 0x14, 0x51,
+0x81, 0x8a, 0x44, 0x30, 0x00, 0x39, 0x46, 0x10, 0x04, 0x01, 0x14, 0x31, 0x01, 0x98, 0x58, 0x10,
+0x86, 0x88, 0x84, 0x80, 0x44, 0x50, 0x00, 0x10, 0x44, 0x30, 0x00, 0x70, 0x44, 0x20, 0x00, 0x60,
+0xb6, 0xa1, 0x50, 0x00, 0x80, 0x18, 0xb6, 0x61, 0xb6, 0x81, 0xb6, 0x41, 0x44, 0x10, 0x00, 0x31,
+0xb6, 0x20, 0x9d, 0x49, 0x9c, 0x4c, 0x9e, 0xca, 0x9e, 0x89, 0xb6, 0xa0, 0xb6, 0x60, 0xb6, 0x40,
+0xb6, 0x20, 0x80, 0x24, 0x50, 0x20, 0x80, 0x21, 0x84, 0xa9, 0x9c, 0x49, 0xb6, 0x40, 0xd9, 0xfb,
+0x46, 0x00, 0x04, 0x01, 0x44, 0x10, 0x00, 0x3f, 0x14, 0x10, 0x01, 0x8c, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xdc, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x17, 0x85, 0x84,
+0x47, 0xe0, 0x04, 0x01, 0x04, 0x3f, 0x01, 0xa3, 0x46, 0x40, 0x04, 0x00, 0x58, 0x21, 0x80, 0x01,
+0x14, 0x2f, 0x01, 0xa3, 0x80, 0xbe, 0x04, 0x02, 0x00, 0x8f, 0xf5, 0x81, 0x83, 0x85, 0xf1, 0x01,
+0x81, 0x45, 0x81, 0x25, 0x15, 0xcf, 0x80, 0x02, 0x14, 0xaf, 0x80, 0x03, 0x14, 0x9f, 0x80, 0x04,
+0x58, 0x10, 0x80, 0x58, 0xf1, 0x81, 0xf3, 0x02, 0xf2, 0x03, 0xf1, 0x04, 0x81, 0x05, 0x80, 0xe5,
+0x80, 0xc5, 0x14, 0x8f, 0x80, 0x05, 0xf7, 0x86, 0xf6, 0x87, 0x58, 0x31, 0x80, 0x78, 0x58, 0x21,
+0x00, 0x98, 0x58, 0x10, 0x80, 0xb8, 0xf3, 0x82, 0xf2, 0x83, 0xf1, 0x84, 0xf3, 0x05, 0xf2, 0x06,
+0xf1, 0x07, 0x58, 0x00, 0x02, 0x00, 0x58, 0x31, 0x80, 0x48, 0x58, 0x21, 0x00, 0x68, 0x58, 0x10,
+0x80, 0x88, 0x83, 0xc5, 0xf3, 0x85, 0xf2, 0x86, 0xf1, 0x87, 0x14, 0x02, 0x00, 0x8f, 0x44, 0x40,
+0x00, 0x8c, 0x14, 0x4f, 0x00, 0x0e, 0x9e, 0xa4, 0xf0, 0x01, 0x9e, 0xd4, 0xb6, 0x40, 0x9c, 0x51,
+0xf4, 0x02, 0x83, 0x85, 0xb6, 0x64, 0x81, 0x45, 0xf0, 0x03, 0x81, 0x25, 0xb6, 0x20, 0x81, 0x05,
+0xf4, 0x04, 0x80, 0xe5, 0xb6, 0x44, 0xf0, 0x05, 0xb6, 0x40, 0xf4, 0x06, 0xb6, 0x64, 0xf0, 0x07,
+0x46, 0x50, 0x04, 0x01, 0xb6, 0x20, 0x58, 0x52, 0x86, 0x88, 0xb9, 0xaa, 0x14, 0x15, 0x00, 0x32,
+0x44, 0x40, 0x00, 0x10, 0x14, 0x14, 0x80, 0x3a, 0x8e, 0x74, 0x14, 0x24, 0x00, 0x42, 0x94, 0x21,
+0x14, 0x13, 0x80, 0x4a, 0x84, 0x40, 0x44, 0x10, 0x00, 0x60, 0xb6, 0x85, 0xb6, 0x65, 0xb6, 0x45,
+0xb6, 0x25, 0x14, 0x03, 0x01, 0x8c, 0xec, 0x24, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x10, 0x04, 0x01, 0x04, 0x60, 0x81, 0x8c, 0x96, 0x34, 0xc0, 0x06,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x82, 0x08, 0xdd, 0x2f, 0x54, 0x23, 0x00, 0x08, 0xc2, 0x0a,
+0x46, 0x50, 0x04, 0x01, 0x80, 0x65, 0x87, 0xc8, 0x84, 0x80, 0x15, 0xe2, 0x81, 0x8c, 0x14, 0x41,
+0x81, 0xa7, 0x54, 0x03, 0x00, 0x10, 0xc0, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x82, 0xa4,
+0xdd, 0x2f, 0x54, 0x63, 0x00, 0x20, 0xc6, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x10,
+0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x50, 0x0f,
+0x80, 0x04, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x01,
+0x44, 0x50, 0x00, 0x80, 0x14, 0x52, 0x01, 0xa8, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x07, 0x85, 0x85,
+0x46, 0x60, 0x00, 0x09, 0x84, 0x40, 0x54, 0x00, 0x00, 0x60, 0x44, 0x10, 0x00, 0x20, 0x10, 0x23,
+0x05, 0x83, 0x4c, 0x00, 0x80, 0x20, 0x95, 0x49, 0xd0, 0x14, 0xc8, 0x1c, 0x46, 0xf0, 0x00, 0x09,
+0x00, 0x07, 0x85, 0x86, 0x84, 0x2c, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xc0, 0xdd, 0x2f,
+0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x83, 0x68, 0x38, 0x20, 0x82, 0x02, 0xdd, 0x22, 0xd5, 0x0f,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x89, 0x34, 0xdd, 0x2f, 0x96, 0xc0, 0x10, 0x33, 0x05, 0x83,
+0xd5, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x5c, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x01,
+0x84, 0xa0, 0x14, 0x52, 0x01, 0xa8, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c,
+0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xf4, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x89, 0x3c, 0xdd, 0x2f, 0x46, 0x50, 0x04, 0x01,
+0x04, 0x02, 0x81, 0xa3, 0x54, 0x00, 0x00, 0x02, 0xc8, 0x66, 0x80, 0xe5, 0xb6, 0xff, 0x80, 0xc5,
+0xb4, 0x3f, 0xf6, 0x81, 0x58, 0x10, 0x80, 0xb8, 0xb6, 0x3f, 0xf1, 0x01, 0x80, 0x45, 0x58, 0x10,
+0x80, 0x88, 0xf1, 0x81, 0x44, 0x10, 0x00, 0x8b, 0x14, 0x11, 0x00, 0x26, 0x83, 0xc2, 0xb4, 0x5f,
+0x83, 0x85, 0xb6, 0x22, 0x81, 0x45, 0xf2, 0x01, 0x81, 0x25, 0x81, 0x05, 0x80, 0xe5, 0xb6, 0x22,
+0x80, 0xc5, 0x44, 0x20, 0x00, 0xff, 0x46, 0x40, 0x04, 0x01, 0x14, 0x1f, 0x00, 0x2a, 0x58, 0x42,
+0x06, 0x88, 0xb9, 0xb2, 0x14, 0x15, 0x00, 0x3a, 0x14, 0x14, 0x80, 0x42, 0x14, 0x14, 0x00, 0x4a,
+0x14, 0x23, 0x81, 0x8a, 0x44, 0x10, 0x00, 0x39, 0x44, 0x20, 0x00, 0x10, 0x14, 0x13, 0x01, 0x98,
+0xb6, 0x44, 0x44, 0x10, 0x00, 0x70, 0x44, 0x20, 0x00, 0x60, 0xb6, 0x24, 0x50, 0x32, 0x00, 0x18,
+0xb6, 0x04, 0x84, 0x22, 0xb6, 0x44, 0x44, 0x20, 0x00, 0x31, 0x14, 0x12, 0x81, 0xa3, 0x9d, 0x12,
+0xb6, 0x43, 0x9c, 0x53, 0x9f, 0x4a, 0x9c, 0x89, 0xb6, 0xa3, 0xb6, 0x83, 0xb6, 0x23, 0xb6, 0x43,
+0x80, 0x23, 0x50, 0x50, 0x00, 0x21, 0x84, 0x69, 0x9c, 0x01, 0xb6, 0xa1, 0x4c, 0x01, 0xff, 0xfb,
+0x80, 0xa6, 0x44, 0x00, 0x00, 0x3f, 0x84, 0x20, 0x14, 0x02, 0x81, 0x8c, 0x46, 0xf0, 0x00, 0x09,
+0x10, 0x17, 0x85, 0x84, 0x80, 0x05, 0x04, 0x20, 0x01, 0xa3, 0x54, 0x41, 0x00, 0xfe, 0x14, 0x40,
+0x01, 0xa3, 0xd5, 0x38, 0x46, 0x40, 0x04, 0x00, 0x04, 0x32, 0x00, 0x85, 0x80, 0xe5, 0x46, 0x00,
+0x04, 0x01, 0x58, 0x00, 0x06, 0xa0, 0x58, 0x21, 0x80, 0x04, 0x44, 0x60, 0x00, 0x39, 0x45, 0xe0,
+0x00, 0x31, 0x45, 0xc0, 0x00, 0x32, 0x44, 0xa0, 0x00, 0x33, 0x44, 0x90, 0x00, 0x34, 0x44, 0x80,
+0x00, 0x35, 0x14, 0x22, 0x00, 0x85, 0x14, 0x63, 0x81, 0x98, 0x15, 0xe0, 0x00, 0x00, 0x15, 0xc0,
+0x00, 0x00, 0xb7, 0x40, 0xb7, 0x20, 0xb7, 0x00, 0x84, 0x20, 0x50, 0x80, 0x80, 0x21, 0x84, 0xa9,
+0x9c, 0x49, 0xb7, 0x00, 0xd9, 0xfb, 0x81, 0x27, 0x8d, 0x4c, 0x14, 0xa4, 0x81, 0x8c, 0x80, 0x07,
+0x04, 0x10, 0x01, 0xa3, 0x96, 0x4c, 0xc1, 0x02, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x17,
+0x85, 0x84, 0x46, 0x00, 0x04, 0x01, 0x84, 0xa0, 0x84, 0x40, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x27,
+0x85, 0x8a, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x27, 0x85, 0x83, 0x46, 0xf0, 0x00, 0x09, 0x14, 0x57,
+0x81, 0x5e, 0x14, 0x50, 0x01, 0xa8, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x37, 0x85, 0x84, 0x46, 0xf0,
+0x00, 0x09, 0x00, 0x07, 0x85, 0x88, 0x46, 0xf0, 0x00, 0x09, 0x00, 0x47, 0x85, 0x89, 0x40, 0x11,
+0xa4, 0x08, 0x40, 0x00, 0x28, 0x08, 0x40, 0x30, 0x80, 0x04, 0x58, 0x01, 0x80, 0x02, 0x40, 0x12,
+0x2c, 0x08, 0x46, 0x40, 0x04, 0x00, 0x40, 0x20, 0x04, 0x04, 0x46, 0xf0, 0x00, 0x09, 0x10, 0x57,
+0x85, 0x87, 0x14, 0x22, 0x00, 0x8f, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x60, 0x00, 0x03, 0x58, 0x63, 0x07, 0x8c, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x87, 0x68, 0xdd, 0x2f, 0x4b, 0xe0, 0x18, 0x01, 0xc0, 0xfe, 0x46, 0x00, 0x04, 0x01,
+0xb4, 0x40, 0x46, 0x00, 0x04, 0x01, 0x96, 0x90, 0x58, 0x00, 0x05, 0x00, 0x84, 0x20, 0xd5, 0x05,
+0xa3, 0x01, 0x96, 0xe0, 0x18, 0x30, 0x80, 0x01, 0xe0, 0x22, 0xe9, 0xfb, 0x47, 0xe0, 0x00, 0x09,
+0x02, 0x3f, 0x02, 0xc0, 0x84, 0x20, 0x9a, 0x1a, 0x97, 0x41, 0x40, 0x00, 0x94, 0x06, 0x12, 0x5f,
+0x02, 0xc0, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x60, 0x00, 0x03,
+0x58, 0x63, 0x07, 0x8c, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x68, 0xdd, 0x2f, 0x4b, 0xe0,
+0x18, 0x01, 0xc0, 0xfe, 0x47, 0xe0, 0x04, 0x01, 0xb4, 0xde, 0x97, 0xb0, 0x46, 0xf0, 0x00, 0x09,
+0x04, 0x07, 0x81, 0x5d, 0x46, 0x10, 0x04, 0x01, 0x80, 0x46, 0x58, 0x10, 0x85, 0x00, 0x84, 0x61,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0x60, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x09, 0x02, 0x40,
+0x82, 0xc0, 0x84, 0x00, 0x9a, 0xe6, 0x96, 0x99, 0x40, 0x00, 0x08, 0x06, 0x12, 0x20, 0x82, 0xc0,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0x60, 0x00, 0x09,
+0x58, 0x63, 0x05, 0x80, 0xa4, 0x30, 0x44, 0x10, 0x00, 0x40, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x88, 0xb0, 0xdd, 0x2f, 0x46, 0x80, 0x00, 0x09, 0x58, 0x84, 0x05, 0x74, 0x97, 0xc0, 0xb4, 0x28,
+0x46, 0x00, 0x04, 0x01, 0x80, 0x47, 0x58, 0x00, 0x04, 0x00, 0x84, 0x60, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x88, 0x60, 0xdd, 0x2f, 0xb4, 0x68, 0x80, 0x07, 0x98, 0xbb, 0xb6, 0x48, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0x74, 0xdd, 0x2f, 0xa4, 0x70, 0x84, 0x00, 0x9b, 0xcf, 0x97, 0xf9,
+0x40, 0x00, 0x1c, 0x06, 0xad, 0xf0, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xf4, 0x96, 0x02, 0xf0, 0x81, 0x84, 0xc0, 0x46, 0xa0, 0x00, 0x03, 0x58, 0xa5, 0x08, 0xb0,
+0x46, 0x70, 0x00, 0x09, 0x58, 0x73, 0x85, 0x74, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94, 0x83, 0x7c,
+0xd5, 0x12, 0x00, 0x83, 0x80, 0x01, 0xa7, 0x78, 0x40, 0x44, 0x20, 0x08, 0x40, 0x02, 0x14, 0x04,
+0xb6, 0x7f, 0x4b, 0xe0, 0x24, 0x01, 0xb4, 0x7f, 0x9d, 0xb1, 0xb6, 0x03, 0x97, 0xb0, 0xb4, 0x47,
+0x9c, 0x51, 0xb6, 0x27, 0x46, 0xf0, 0x00, 0x09, 0x02, 0x07, 0x82, 0xc0, 0x44, 0x10, 0x00, 0x40,
+0x4b, 0xe0, 0x28, 0x01, 0x46, 0x10, 0x01, 0x00, 0x58, 0x10, 0x85, 0x00, 0x98, 0xb1, 0x46, 0x80,
+0x00, 0x09, 0xf1, 0x01, 0x94, 0xd2, 0xe2, 0xc0, 0xe9, 0xdd, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x87, 0x74, 0xdd, 0x2f, 0x02, 0x34, 0x02, 0xc0, 0x84, 0x00, 0x9b, 0x9e, 0x97, 0xb1,
+0x40, 0x00, 0x18, 0x06, 0x12, 0x64, 0x02, 0xc0, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x46, 0x70, 0x00, 0x03, 0x58, 0x73, 0x87, 0x8c, 0x97, 0x82,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x68, 0xdd, 0x2f, 0x4b, 0xe0, 0x1c, 0x01, 0xc0, 0xfe,
+0x46, 0x20, 0x04, 0x01, 0xb5, 0x22, 0x85, 0x00, 0x44, 0x10, 0x00, 0xfc, 0x40, 0x04, 0x18, 0x1b,
+0x40, 0x00, 0x98, 0x1a, 0x46, 0x70, 0x04, 0x01, 0xf0, 0x81, 0x54, 0x94, 0x80, 0xff, 0x58, 0x73,
+0x85, 0x00, 0x47, 0xc0, 0x00, 0x03, 0x59, 0xce, 0x04, 0x58, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63,
+0x05, 0x74, 0x46, 0xa0, 0x00, 0x03, 0x58, 0xa5, 0x03, 0xdc, 0xd5, 0x15, 0xdd, 0x3c, 0xa7, 0x31,
+0xf2, 0x01, 0xa6, 0x70, 0x40, 0x31, 0x10, 0x04, 0xa3, 0x79, 0x40, 0x01, 0xa0, 0x08, 0x40, 0x00,
+0x04, 0x04, 0x96, 0x68, 0x4b, 0xe0, 0x28, 0x01, 0xb4, 0x86, 0x8d, 0x01, 0x9c, 0xe1, 0xb6, 0x66,
+0x54, 0x84, 0x00, 0xff, 0xe3, 0x09, 0xe9, 0xeb, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x84, 0x28,
+0xdd, 0x2f, 0x46, 0x30, 0x00, 0x09, 0x02, 0x41, 0x82, 0xc0, 0x84, 0x20, 0x40, 0x02, 0x24, 0x01,
+0x97, 0x41, 0x40, 0x00, 0x94, 0x06, 0x12, 0x51, 0x82, 0xc0, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x86,
+0xa6, 0x00, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x05, 0x8a, 0x84, 0x40, 0x44, 0x10, 0x00, 0x26,
+0xae, 0xb0, 0x4c, 0x00, 0x81, 0xde, 0x5c, 0xf0, 0x00, 0x27, 0xe8, 0x35, 0x84, 0x68, 0x4c, 0x01,
+0x82, 0x45, 0xe6, 0x09, 0xe8, 0x15, 0x84, 0x83, 0x4c, 0x02, 0x01, 0x7b, 0xe6, 0x04, 0xe8, 0x08,
+0x84, 0xa1, 0xd0, 0x6e, 0x87, 0xc2, 0x4c, 0x0f, 0x42, 0x5f, 0x48, 0x00, 0x01, 0x5c, 0x84, 0x26,
+0x4c, 0x00, 0x81, 0x67, 0x84, 0x47, 0x4c, 0x01, 0x42, 0x57, 0x48, 0x00, 0x01, 0x6a, 0x84, 0x6b,
+0x4c, 0x01, 0x82, 0x35, 0xe6, 0x0c, 0xe8, 0x09, 0x84, 0x89, 0x4c, 0x02, 0x02, 0x30, 0x84, 0xaa,
+0x4c, 0x02, 0xc2, 0x4a, 0x48, 0x00, 0x02, 0x24, 0x45, 0xe0, 0x00, 0x22, 0x4c, 0x0f, 0x01, 0xa1,
+0x44, 0x10, 0x00, 0x23, 0x4c, 0x00, 0x81, 0xb8, 0x44, 0x20, 0x00, 0x20, 0x4c, 0x01, 0x42, 0x3c,
+0x48, 0x00, 0x01, 0x89, 0x44, 0x30, 0x00, 0x43, 0x4c, 0x01, 0x81, 0x79, 0x5c, 0xf0, 0x00, 0x44,
+0xe8, 0x20, 0x44, 0x40, 0x00, 0x33, 0x4c, 0x02, 0x01, 0xcc, 0x5c, 0xf0, 0x00, 0x34, 0xe8, 0x0b,
+0x44, 0x50, 0x00, 0x27, 0x4c, 0x02, 0x81, 0xa0, 0x45, 0xe0, 0x00, 0x32, 0x4c, 0x0f, 0x42, 0x24,
+0x48, 0x00, 0x01, 0xaa, 0x44, 0x10, 0x00, 0x37, 0x4c, 0x00, 0x81, 0xbb, 0x44, 0x20, 0x00, 0x42,
+0x4c, 0x01, 0x01, 0x3c, 0x44, 0x30, 0x00, 0x36, 0x4c, 0x01, 0xc2, 0x16, 0x48, 0x00, 0x01, 0xa9,
+0x44, 0x40, 0x00, 0x52, 0x4c, 0x02, 0x01, 0xb9, 0x5c, 0xf0, 0x00, 0x53, 0xe8, 0x0b, 0x44, 0x50,
+0x00, 0x46, 0x4c, 0x02, 0x81, 0x3c, 0x45, 0xe0, 0x00, 0x47, 0x4c, 0x0f, 0x42, 0x05, 0x48, 0x00,
+0x01, 0x46, 0x44, 0x10, 0x00, 0x56, 0x4c, 0x00, 0x81, 0xb6, 0x44, 0x20, 0x00, 0x57, 0x4c, 0x01,
+0x01, 0xbb, 0x44, 0x30, 0x00, 0x53, 0x4c, 0x01, 0xc1, 0xf7, 0x48, 0x00, 0x01, 0xb5, 0x46, 0x00,
+0x00, 0x09, 0x58, 0x00, 0x05, 0x7c, 0xa6, 0x00, 0x84, 0x88, 0x4c, 0x02, 0x00, 0x8b, 0xe6, 0x09,
+0xe8, 0x07, 0x84, 0xa1, 0xd0, 0x0f, 0x87, 0xc2, 0x4c, 0x0f, 0x41, 0xec, 0xd5, 0x76, 0x44, 0x10,
+0x00, 0x10, 0x4c, 0x00, 0x80, 0x89, 0x44, 0x20, 0x00, 0x12, 0x4c, 0x01, 0x41, 0xe3, 0x48, 0x00,
+0x00, 0xa3, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x00,
+0x58, 0x42, 0x02, 0x0c, 0xb4, 0x44, 0x84, 0x20, 0x58, 0x31, 0x00, 0x10, 0xb6, 0x64, 0x92, 0x00,
+0x84, 0x07, 0x9c, 0x49, 0x4c, 0x10, 0x7f, 0xfd, 0x44, 0x1f, 0xff, 0xef, 0x46, 0x00, 0x04, 0x00,
+0x40, 0x21, 0x04, 0x02, 0x58, 0x00, 0x02, 0x0c, 0xb6, 0x40, 0x47, 0xe0, 0x04, 0x00, 0x59, 0xef,
+0x02, 0x00, 0xb4, 0xbe, 0x54, 0x12, 0x80, 0x03, 0xc9, 0x12, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10,
+0x82, 0x04, 0x05, 0xe0, 0x80, 0x00, 0x46, 0x3f, 0xf0, 0xff, 0x58, 0x5f, 0x00, 0x01, 0xb6, 0xa1,
+0x58, 0x31, 0x8f, 0xff, 0xb4, 0x81, 0x40, 0x22, 0x0c, 0x02, 0xd5, 0x31, 0x84, 0x41, 0x4c, 0x11,
+0x40, 0x18, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x04, 0xb4, 0x41, 0x84, 0x9e, 0x41, 0xe1,
+0x10, 0x02, 0x15, 0xe0, 0x80, 0x00, 0x46, 0x3f, 0xf0, 0xff, 0xb4, 0xa1, 0x58, 0x31, 0x8f, 0xff,
+0x40, 0x42, 0x8c, 0x02, 0xb6, 0x81, 0x46, 0x30, 0x01, 0x00, 0xb4, 0x41, 0xd5, 0x16, 0x46, 0x10,
+0x04, 0x00, 0x58, 0x10, 0x82, 0x04, 0xb4, 0x81, 0x84, 0xbe, 0x40, 0x22, 0x14, 0x02, 0xb6, 0x41,
+0x46, 0x3f, 0xf0, 0xff, 0x05, 0xe0, 0x80, 0x00, 0x58, 0x31, 0x8f, 0xff, 0x40, 0x5f, 0x0c, 0x02,
+0xb6, 0xa1, 0x46, 0x30, 0x05, 0x00, 0xb4, 0x41, 0x40, 0x21, 0x0c, 0x04, 0xb6, 0x41, 0xb4, 0x20,
+0x58, 0x10, 0x83, 0x00, 0x48, 0x00, 0x00, 0xca, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0xb0, 0xdd, 0x2f, 0x48, 0x00, 0x01, 0x6a,
+0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x04, 0x00, 0x05, 0xe0, 0x00, 0x00, 0x58, 0x1f, 0x0c, 0x00,
+0x48, 0x00, 0x00, 0xb4, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0xa0, 0xdd, 0x2f, 0xc8, 0x09,
+0x84, 0x61, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x8a, 0xae, 0xc0, 0x48, 0x00, 0x01, 0x52,
+0x46, 0x50, 0x00, 0x09, 0x58, 0x52, 0x83, 0x64, 0xa7, 0x28, 0x46, 0x20, 0x04, 0x01, 0x58, 0x21,
+0x04, 0x00, 0xb6, 0x82, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x74, 0xdd, 0x2f,
+0x48, 0x00, 0x01, 0x40, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0x46, 0x40,
+0x04, 0x01, 0x58, 0x42, 0x06, 0x60, 0x84, 0xa0, 0xb6, 0xa4, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x86, 0xd0, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10, 0x85, 0x8a, 0xae, 0x08, 0x46, 0x40,
+0x04, 0x00, 0x58, 0x42, 0x02, 0x04, 0xb4, 0x44, 0x44, 0x3f, 0x00, 0xff, 0x40, 0x01, 0x0c, 0x02,
+0x58, 0x50, 0x44, 0x00, 0xb6, 0xa4, 0x46, 0x0f, 0xf0, 0xff, 0xb4, 0x44, 0x58, 0x00, 0x0f, 0xff,
+0x58, 0x31, 0x00, 0x01, 0xb6, 0x64, 0x46, 0x10, 0x04, 0x00, 0xb4, 0xa4, 0x58, 0x10, 0x82, 0x0c,
+0x40, 0x22, 0x80, 0x02, 0xb6, 0x44, 0xb4, 0x61, 0x58, 0x01, 0x83, 0x00, 0xb6, 0x01, 0x48, 0x00,
+0x01, 0x09, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x47, 0xe0, 0x00, 0x09, 0x59, 0xef,
+0x05, 0x7c, 0x46, 0x30, 0x04, 0x10, 0xb4, 0x20, 0x02, 0x2f, 0x00, 0x00, 0xd5, 0x22, 0x46, 0x00,
+0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x20, 0x04, 0x10, 0xb4, 0x20, 0xd5, 0x26, 0x46, 0x00,
+0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x30, 0x04, 0x10, 0xb4, 0x20, 0x46, 0x60, 0x00, 0x09,
+0x58, 0x63, 0x05, 0x8a, 0x48, 0x00, 0x00, 0xab, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74,
+0x46, 0x20, 0x00, 0x09, 0x58, 0x21, 0x05, 0x7c, 0x46, 0x30, 0x04, 0x00, 0xb4, 0x20, 0xa4, 0x90,
+0x98, 0x4b, 0xb6, 0x20, 0xac, 0x88, 0x48, 0x00, 0x00, 0xd5, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00,
+0x05, 0x74, 0x46, 0x20, 0x04, 0x00, 0xb4, 0x20, 0x98, 0xca, 0xb6, 0x60, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x87, 0x28, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0xbd, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00,
+0x05, 0x74, 0x46, 0x30, 0x04, 0x00, 0xb4, 0x20, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x05, 0x8a,
+0xd5, 0x7d, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0xb4, 0x80, 0x46, 0x00, 0x00, 0x09,
+0x58, 0x00, 0x05, 0x78, 0x40, 0x12, 0x40, 0x08, 0xb6, 0x20, 0x48, 0x00, 0x00, 0xab, 0x46, 0x00,
+0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x47, 0xe0, 0x00, 0x09, 0x59, 0xef, 0x05, 0x78, 0x46, 0x50,
+0x00, 0x09, 0x58, 0x52, 0x85, 0x7c, 0xb4, 0x3e, 0xb4, 0x60, 0xa4, 0xa8, 0xd5, 0xc2, 0x46, 0x20,
+0x00, 0x09, 0x58, 0x21, 0x05, 0x78, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0xb4, 0x22,
+0xb4, 0x40, 0xd5, 0xc3, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x05, 0x78, 0x46, 0x00, 0x00, 0x09,
+0x58, 0x00, 0x05, 0x74, 0xb4, 0x26, 0xb4, 0x60, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x05, 0x8a,
+0x98, 0x4b, 0xd5, 0x45, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x40, 0x00, 0x09,
+0x58, 0x42, 0x05, 0x7c, 0x46, 0x30, 0x04, 0x20, 0xb4, 0x20, 0xa4, 0xa0, 0xd5, 0x9a, 0x46, 0x00,
+0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x20, 0x04, 0x20, 0xb4, 0x20, 0xd5, 0x9e, 0x46, 0x00,
+0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x30, 0x04, 0x20, 0xb4, 0x20, 0x46, 0x60, 0x00, 0x09,
+0x58, 0x63, 0x05, 0x8a, 0xd5, 0x23, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x50,
+0x00, 0x09, 0x58, 0x52, 0x85, 0x7c, 0x46, 0x30, 0x05, 0x00, 0xb4, 0x20, 0xa4, 0xa8, 0x48, 0xff,
+0xff, 0x79, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x20, 0x05, 0x00, 0xb4, 0x20,
+0x48, 0xff, 0xff, 0x7c, 0x46, 0x00, 0x00, 0x09, 0x58, 0x00, 0x05, 0x74, 0x46, 0x30, 0x05, 0x00,
+0xb4, 0x20, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x05, 0x8a, 0x98, 0x4b, 0xb6, 0x20, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0xa0, 0xdd, 0x2f, 0xc8, 0x02, 0xd5, 0x1a, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x87, 0x88, 0xdd, 0x2f, 0xd5, 0x25, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x88, 0x80, 0xdd, 0x2f, 0xd5, 0x1c, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x87, 0xa0, 0xdd, 0x2f, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x05, 0x8a, 0xc8, 0x03, 0x84, 0x01,
+0xd5, 0x10, 0x46, 0x20, 0x00, 0x09, 0x58, 0x21, 0x05, 0x86, 0x01, 0xe1, 0x00, 0x00, 0x56, 0x0f,
+0x00, 0x0b, 0x5c, 0x00, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x87, 0xec, 0xdd, 0x2f,
+0xae, 0x30, 0xd5, 0x07, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x5c, 0xdd, 0x2f, 0xd5, 0x06,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x80, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x09, 0x58, 0x10,
+0x85, 0x8a, 0x20, 0x00, 0x80, 0x00, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x87, 0x20, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7,
+0x83, 0x9c, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x10, 0x04, 0x52, 0x02, 0x01, 0x40, 0x22, 0xa0, 0x08,
+0x92, 0x48, 0x14, 0x22, 0x02, 0x01, 0x84, 0x0a, 0x46, 0x10, 0x00, 0x05, 0x58, 0x10, 0x81, 0xe8,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0x78, 0xdd, 0x2f, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x01, 0xc4, 0x84, 0x02, 0x46, 0x10, 0x00, 0x04, 0x58, 0x10, 0x84, 0x10, 0xdd, 0x26, 0x84, 0x01,
+0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x87, 0x8c, 0xdd, 0x26, 0x84, 0x0c, 0x46, 0x10, 0x00, 0x03,
+0x58, 0x10, 0x84, 0x9c, 0xdd, 0x26, 0x46, 0x10, 0x00, 0x01, 0x58, 0x10, 0x82, 0xfc, 0x84, 0x0f,
+0xdd, 0x26, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x05, 0xc4, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x81, 0x6c, 0xdd, 0x2f, 0x84, 0x20, 0x80, 0x81, 0x46, 0x20, 0x00, 0x08, 0x58, 0x21, 0x0b, 0x60,
+0x44, 0x30, 0x08, 0x00, 0x46, 0x00, 0x00, 0x05, 0x58, 0x00, 0x00, 0x24, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x81, 0x20, 0xdd, 0x2f, 0x84, 0x00, 0x46, 0x10, 0x00, 0x08, 0x58, 0x10, 0x8a, 0x48,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0xe4, 0xdd, 0x2f, 0x46, 0x00, 0x04, 0x00, 0x84, 0x21,
+0x14, 0x10, 0x00, 0x8c, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xe0, 0xdd, 0x2f, 0x84, 0x00,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0x80, 0x00, 0x02,
+0x58, 0x84, 0x07, 0x84, 0x80, 0xe0, 0x5c, 0x00, 0x00, 0x10, 0x80, 0xc1, 0x4b, 0xe0, 0x20, 0x01,
+0x84, 0x20, 0x40, 0x00, 0x98, 0x06, 0x4b, 0xe0, 0x20, 0x01, 0x95, 0xfa, 0x46, 0x00, 0x00, 0x09,
+0x58, 0x00, 0x05, 0x24, 0x99, 0xf8, 0xb6, 0xc7, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xfc, 0x46, 0x70, 0x00, 0x02, 0x58, 0x73, 0x87, 0x84, 0x84, 0x01,
+0x4b, 0xe0, 0x1c, 0x01, 0x46, 0xf0, 0x00, 0x09, 0x04, 0x67, 0x81, 0x53, 0x84, 0x00, 0x40, 0x00,
+0x18, 0x06, 0x4b, 0xe0, 0x1c, 0x01, 0xdd, 0x26, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e,
+0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x05, 0xa0, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0xa8,
+0xb6, 0x20, 0x48, 0xff, 0xd8, 0x43, 0xdd, 0x9e, 0x64, 0x12, 0x00, 0x02, 0x96, 0x4c, 0x64, 0x02,
+0x00, 0x43, 0x64, 0x00, 0x00, 0x08, 0xb6, 0x20, 0xdd, 0x9e, 0x92, 0x00, 0x64, 0x12, 0x00, 0x02,
+0x42, 0x10, 0x80, 0x09, 0x40, 0x10, 0x80, 0x04, 0x64, 0x12, 0x00, 0x03, 0x64, 0x00, 0x00, 0x08,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0x64, 0x12, 0x00, 0x43, 0x64, 0x00, 0x00, 0x08,
+0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x05, 0xa0, 0x04, 0x03, 0x00, 0x0b, 0xc0, 0x02, 0xdd, 0x20,
+0x04, 0x03, 0x00, 0x0c, 0xc0, 0x02, 0xdd, 0x20, 0x04, 0x23, 0x00, 0x08, 0x44, 0x10, 0x03, 0x00,
+0x54, 0x01, 0x03, 0x00, 0x4c, 0x00, 0xff, 0xf2, 0x64, 0x00, 0x00, 0x00, 0xd5, 0xee, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x37, 0x81, 0x70, 0x40, 0x43,
+0x18, 0x05, 0x40, 0x22, 0x0c, 0x02, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x27, 0x81, 0x70,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c, 0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x37,
+0x81, 0x70, 0xf0, 0x01, 0x40, 0x23, 0x0c, 0x04, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x27, 0x81, 0x70,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c, 0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0x80, 0xc1, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x07,
+0x81, 0x73, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x67, 0x81, 0x74, 0xc8, 0x08, 0x44, 0x00, 0x01, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0xa4, 0xdd, 0x2f, 0xce, 0x08, 0x44, 0x00, 0x02, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0xa4, 0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa8, 0xbc, 0x44, 0x50, 0x00, 0x14, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x05, 0xa8,
+0x42, 0x60, 0x94, 0x73, 0x80, 0xe0, 0x81, 0x43, 0x50, 0x03, 0x00, 0x0c, 0xa8, 0x71, 0x84, 0x20,
+0x81, 0x22, 0x81, 0x04, 0xa8, 0x72, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x81, 0x6c, 0xdd, 0x2f,
+0x50, 0x35, 0x7f, 0xb8, 0x40, 0x24, 0x8c, 0x00, 0x58, 0x44, 0x00, 0x08, 0x84, 0x0a, 0xb6, 0x46,
+0xa9, 0xd1, 0xb6, 0x82, 0xa8, 0x12, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0xa8, 0x01, 0xb6, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xa0, 0x81, 0xb6, 0x01, 0xa8, 0x89, 0xb6, 0x22, 0xa8, 0x41, 0xdd, 0x9e,
+0xb4, 0x20, 0x4c, 0x10, 0x40, 0x04, 0x84, 0x20, 0xd5, 0x07, 0xa0, 0xc9, 0xb4, 0x81, 0xb6, 0x83,
+0xb4, 0x01, 0xa0, 0x89, 0xa8, 0x81, 0x80, 0x01, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x20, 0x00, 0x09,
+0x04, 0x11, 0x01, 0x5c, 0x98, 0x01, 0x14, 0x01, 0x01, 0x5c, 0x80, 0x01, 0xdd, 0x9e, 0x92, 0x00,
+0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x85, 0xd4, 0x46, 0xf0, 0x00, 0x09, 0x14, 0x17, 0x81, 0x5c,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x50, 0x00, 0x0c, 0x58, 0x52, 0x81, 0x80, 0x38, 0x12, 0x82, 0x0a,
+0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x00, 0xa0, 0x8d, 0x84, 0x61, 0x40, 0x41, 0x80, 0x0c,
+0x40, 0x02, 0x08, 0x04, 0xa8, 0x0d, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x00,
+0x04, 0x00, 0x58, 0x00, 0x02, 0x00, 0xa0, 0x44, 0x96, 0x08, 0x54, 0x20, 0x00, 0x08, 0xc2, 0x06,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x63, 0xd5, 0x7b, 0x54, 0x30, 0x00, 0x10, 0xc3, 0x06,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x64, 0xd5, 0x73, 0x54, 0x50, 0x00, 0x20, 0xc5, 0x06,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x65, 0xd5, 0x6b, 0x54, 0x20, 0x00, 0x02, 0xc2, 0x06,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x61, 0xd5, 0x63, 0x96, 0xc4, 0xc3, 0x06, 0x46, 0xf0,
+0x00, 0x0c, 0x04, 0x07, 0x80, 0x60, 0xd5, 0x5c, 0x54, 0x40, 0x00, 0x04, 0xc4, 0x06, 0x46, 0xf0,
+0x00, 0x0c, 0x04, 0x07, 0x80, 0x62, 0xd5, 0x54, 0x40, 0x20, 0xa0, 0x09, 0x96, 0x10, 0x55, 0xe0,
+0x00, 0x01, 0x4f, 0xe2, 0x00, 0x07, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x68, 0xd5, 0x48,
+0x54, 0x30, 0x00, 0x02, 0xc3, 0x06, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x69, 0xd5, 0x40,
+0x54, 0x40, 0x00, 0x04, 0xc4, 0x06, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x6a, 0xd5, 0x38,
+0x55, 0xe0, 0x00, 0x08, 0x4f, 0xe2, 0x00, 0x07, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x6b,
+0xd5, 0x2f, 0x54, 0x30, 0x00, 0x10, 0xc3, 0x06, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x6c,
+0xd5, 0x27, 0x54, 0x40, 0x00, 0x20, 0xc4, 0x06, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x6d,
+0xd5, 0x1f, 0x54, 0x50, 0x00, 0x40, 0xc5, 0x06, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x6e,
+0xd5, 0x17, 0x54, 0x20, 0x00, 0x80, 0xc2, 0x06, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x6f,
+0xd5, 0x0f, 0x40, 0x00, 0xc0, 0x09, 0x96, 0x00, 0x97, 0x04, 0xc4, 0x02, 0xd5, 0x05, 0x54, 0x10,
+0x00, 0x02, 0x96, 0x08, 0xc0, 0x05, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0x70, 0xdd, 0x20,
+0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0x3c, 0x84, 0x44, 0x96, 0x49,
+0x4c, 0x11, 0x40, 0x27, 0xb4, 0x20, 0x4e, 0x14, 0x00, 0x65, 0x46, 0x50, 0x00, 0x0c, 0x84, 0xe0,
+0x00, 0x32, 0x82, 0x00, 0x10, 0x72, 0x82, 0x00, 0x46, 0x40, 0x00, 0x0c, 0x46, 0xf0, 0x00, 0x0c,
+0x00, 0x57, 0x82, 0x04, 0x00, 0x12, 0x02, 0x02, 0x40, 0x61, 0xc0, 0x08, 0x10, 0x52, 0x02, 0x02,
+0x46, 0xf0, 0x00, 0x0c, 0x10, 0x37, 0x82, 0x01, 0x40, 0x63, 0x04, 0x04, 0x84, 0x40, 0x46, 0xf0,
+0x00, 0x0c, 0x10, 0x17, 0x82, 0x03, 0xb6, 0x40, 0x80, 0x22, 0xb6, 0xc0, 0xd5, 0x43, 0xe6, 0x38,
+0xe9, 0x40, 0x80, 0x20, 0xa3, 0x49, 0x96, 0xec, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x37, 0x82, 0x05,
+0xb4, 0x81, 0x40, 0x22, 0x60, 0x09, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x27, 0x82, 0x06, 0xb4, 0xa1,
+0x40, 0x32, 0xc0, 0x09, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x37, 0x82, 0x07, 0xb4, 0x81, 0x50, 0x60,
+0x00, 0x08, 0x40, 0x22, 0x20, 0x09, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x27, 0x82, 0x08, 0xb4, 0xa1,
+0x50, 0x70, 0x00, 0x0c, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x57, 0x82, 0x09, 0xb4, 0x86, 0x50, 0x50,
+0x00, 0x10, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x47, 0x80, 0x83, 0xb4, 0xc7, 0x50, 0x40, 0x00, 0x14,
+0x46, 0xf0, 0x00, 0x0c, 0x10, 0x67, 0x82, 0x04, 0xb4, 0x65, 0x84, 0x20, 0x46, 0xf0, 0x00, 0x0c,
+0x12, 0x37, 0x81, 0x08, 0xb4, 0xe4, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x77, 0x82, 0x12, 0xd5, 0x02,
+0x84, 0x21, 0x80, 0x01, 0x3a, 0x6f, 0x9c, 0x04, 0xdd, 0x9e, 0x92, 0x00, 0x84, 0x00, 0xdd, 0x9e,
+0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xf4, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x07, 0x82, 0x05, 0xc8, 0x0f,
+0x46, 0xf0, 0x00, 0x0c, 0x12, 0x07, 0x81, 0x0a, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x07, 0x82, 0x02,
+0x46, 0xf0, 0x00, 0x0c, 0x10, 0x07, 0x82, 0x00, 0x48, 0x00, 0x00, 0xca, 0x46, 0x30, 0x00, 0x0c,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x47, 0x80, 0x5c, 0x04, 0x51, 0x80, 0x86, 0xe2, 0xa4, 0x4e, 0xf2,
+0x00, 0xbf, 0x14, 0x41, 0x80, 0x86, 0x44, 0x10, 0x00, 0xb8, 0x84, 0x41, 0x84, 0x00, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x87, 0x68, 0xdd, 0x2f, 0x50, 0x2f, 0x80, 0x04, 0x84, 0x00, 0x44, 0x10,
+0x00, 0xb9, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf2, 0x01, 0x46, 0x00,
+0x00, 0x0c, 0x58, 0x00, 0x02, 0x14, 0x97, 0xd4, 0x4e, 0x72, 0x00, 0x9f, 0xa4, 0x40, 0x46, 0xf0,
+0x00, 0x0c, 0x03, 0xe7, 0x81, 0x08, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x02, 0xe2, 0x3e,
+0xe8, 0x0d, 0x46, 0x40, 0x00, 0x0c, 0x00, 0x52, 0x02, 0x00, 0xa6, 0x80, 0x9c, 0xe9, 0x10, 0x32,
+0x02, 0x00, 0xc2, 0x0c, 0x9f, 0x91, 0xaf, 0x80, 0xd5, 0x09, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x17,
+0x82, 0x04, 0xa7, 0xc0, 0xe2, 0xe1, 0xe8, 0x02, 0xae, 0x40, 0x84, 0xa0, 0x46, 0xf0, 0x00, 0x0c,
+0x12, 0x57, 0x81, 0x0a, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0x68, 0x44, 0x10, 0x00, 0xb8,
+0x84, 0x45, 0x84, 0x00, 0xdd, 0x26, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x27, 0x82, 0x06, 0x44, 0x10,
+0x00, 0xb9, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb8, 0x84, 0x42, 0x84, 0x00, 0xdd, 0x26,
+0x46, 0xf0, 0x00, 0x0c, 0x00, 0x27, 0x82, 0x09, 0x44, 0x10, 0x00, 0xb9, 0x84, 0x00, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0xb8, 0x84, 0x43, 0x84, 0x00, 0xdd, 0x26, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x27,
+0x82, 0x08, 0x44, 0x10, 0x00, 0xb9, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb8, 0x84, 0x44,
+0x84, 0x00, 0xdd, 0x26, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x27, 0x82, 0x07, 0x84, 0x00, 0x44, 0x10,
+0x00, 0xb9, 0xdd, 0x26, 0x46, 0x70, 0x00, 0x0c, 0x58, 0x73, 0x82, 0x0c, 0x44, 0x10, 0x00, 0xb8,
+0x84, 0x49, 0x84, 0x00, 0xdd, 0x26, 0xa6, 0xbb, 0x44, 0x10, 0x00, 0xb9, 0x84, 0x00, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0xb8, 0x84, 0x48, 0x84, 0x00, 0xdd, 0x26, 0xa6, 0xba, 0x44, 0x10, 0x00, 0xb9,
+0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb8, 0x84, 0x47, 0x84, 0x00, 0xdd, 0x26, 0xa6, 0xb9,
+0x44, 0x10, 0x00, 0xb9, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb8, 0x84, 0x46, 0x84, 0x00,
+0xdd, 0x26, 0xa6, 0xb8, 0x44, 0x10, 0x00, 0xb9, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb8,
+0x84, 0x41, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb9, 0x84, 0x41, 0x84, 0x00, 0xdd, 0x26,
+0x84, 0x00, 0x44, 0x10, 0x00, 0xb8, 0x80, 0x40, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xb9, 0x84, 0x41,
+0x84, 0x00, 0xdd, 0x26, 0xd5, 0x04, 0xa5, 0xc0, 0x9d, 0xb9, 0xad, 0x80, 0xec, 0x0c, 0x3a, 0x6f,
+0x9c, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa8, 0x3c, 0xef, 0xf4, 0x46, 0x30, 0x04, 0x10, 0x54, 0x80,
+0x00, 0x0f, 0x58, 0x31, 0x85, 0x00, 0x40, 0x84, 0x38, 0x08, 0x84, 0x80, 0x54, 0x70, 0x80, 0x3f,
+0xb4, 0xa3, 0xf5, 0x81, 0x00, 0x5f, 0x80, 0x07, 0x54, 0x52, 0x80, 0x80, 0x97, 0x68, 0xcd, 0x3c,
+0xf5, 0x81, 0x00, 0x9f, 0x80, 0x07, 0x42, 0x94, 0x98, 0x09, 0x00, 0x6f, 0x80, 0x05, 0x92, 0xc6,
+0x95, 0xb6, 0x44, 0xaf, 0xff, 0x80, 0x40, 0x94, 0xa8, 0x04, 0x40, 0x63, 0x1c, 0x04, 0x10, 0x9f,
+0x80, 0x07, 0x10, 0x6f, 0x80, 0x05, 0x44, 0x9c, 0x3f, 0xff, 0xf6, 0x01, 0x40, 0x63, 0x24, 0x02,
+0x40, 0x63, 0x20, 0x04, 0xf6, 0x81, 0xb6, 0xc3, 0xb4, 0xc3, 0x9d, 0x69, 0xf6, 0x81, 0x00, 0x6f,
+0x80, 0x07, 0x54, 0x63, 0x00, 0x80, 0xc6, 0x05, 0x44, 0xa0, 0x00, 0x64, 0x4c, 0x55, 0x7f, 0xf6,
+0x00, 0x5f, 0x80, 0x07, 0x54, 0x52, 0x80, 0x80, 0xcd, 0x0f, 0x00, 0x5f, 0x80, 0x05, 0x54, 0x52,
+0x80, 0x3f, 0xd9, 0x0a, 0xf5, 0x01, 0x92, 0xae, 0x54, 0x52, 0x80, 0x0f, 0xd8, 0x05, 0x00, 0x0f,
+0x80, 0x04, 0xb6, 0x02, 0xd5, 0x05, 0x9d, 0x21, 0x44, 0x50, 0x00, 0x64, 0xdc, 0xba, 0xf1, 0x01,
+0x40, 0x00, 0xfc, 0x09, 0xec, 0x0c, 0x3a, 0x6f, 0xa8, 0x04, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc,
+0xef, 0xf8, 0x46, 0x30, 0x04, 0x10, 0x84, 0x80, 0x05, 0xe1, 0x81, 0x40, 0x9d, 0x21, 0x15, 0xef,
+0x80, 0x01, 0x00, 0x6f, 0x80, 0x07, 0x54, 0x53, 0x00, 0x80, 0xc5, 0x04, 0x44, 0x50, 0x00, 0x64,
+0xdc, 0xf4, 0x00, 0x5f, 0x80, 0x07, 0x44, 0x3f, 0xff, 0xc0, 0x41, 0xe2, 0x8c, 0x04, 0x11, 0xef,
+0x80, 0x07, 0x54, 0x40, 0x00, 0x0f, 0xf3, 0x01, 0x44, 0x6c, 0x3f, 0xff, 0x40, 0x52, 0x38, 0x08,
+0x41, 0xe1, 0x98, 0x02, 0x40, 0x3f, 0x14, 0x04, 0xf3, 0x81, 0x01, 0xef, 0x80, 0x05, 0x54, 0x40,
+0x80, 0x3f, 0x40, 0x6f, 0x18, 0x09, 0x95, 0xb6, 0x40, 0x33, 0x10, 0x04, 0x10, 0x2f, 0x80, 0x04,
+0x10, 0x3f, 0x80, 0x05, 0x46, 0x20, 0x04, 0x10, 0xf6, 0x01, 0x14, 0x61, 0x01, 0x40, 0x80, 0x5f,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0x84, 0x01, 0xec, 0x08, 0x3a, 0x6f,
+0x98, 0x84, 0xdd, 0x9e, 0xef, 0xf8, 0x46, 0x00, 0x04, 0x11, 0x58, 0x00, 0x00, 0x1c, 0x84, 0x60,
+0xb4, 0x80, 0xf4, 0x81, 0x00, 0x5f, 0x80, 0x06, 0x54, 0x42, 0x80, 0x02, 0x97, 0x20, 0xcc, 0x23,
+0xf4, 0x81, 0x10, 0x1f, 0x80, 0x05, 0x00, 0x5f, 0x80, 0x06, 0x58, 0x52, 0x80, 0x03, 0x10, 0x5f,
+0x80, 0x06, 0xf5, 0x01, 0xb6, 0xa0, 0xb4, 0xa0, 0x9d, 0x21, 0xf5, 0x81, 0x00, 0x5f, 0x80, 0x06,
+0x54, 0x52, 0x80, 0x02, 0xc5, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdc, 0xf6, 0x00, 0x5f, 0x80, 0x06,
+0x54, 0x42, 0x80, 0x02, 0xcc, 0x08, 0x00, 0x5f, 0x80, 0x05, 0xd9, 0x05, 0x00, 0x0f, 0x80, 0x04,
+0xb6, 0x02, 0xd5, 0x05, 0x9c, 0xd9, 0x44, 0x50, 0x00, 0x64, 0xdb, 0xd3, 0xf1, 0x01, 0x42, 0x00,
+0xc4, 0x0b, 0xec, 0x08, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xf4, 0x46, 0x30,
+0x04, 0x11, 0x84, 0x80, 0xa1, 0x5f, 0x9d, 0x21, 0xf5, 0x81, 0x01, 0xef, 0x80, 0x06, 0x54, 0x5f,
+0x00, 0x02, 0xc5, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdc, 0xf6, 0x84, 0xa0, 0x84, 0x82, 0xf5, 0x81,
+0x10, 0x2f, 0x80, 0x04, 0x10, 0x4f, 0x80, 0x06, 0x10, 0x1f, 0x80, 0x05, 0x80, 0x43, 0xf3, 0x01,
+0xa8, 0xd7, 0x80, 0x5f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0x84, 0x01,
+0xec, 0x0c, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xf4, 0x46, 0x20,
+0x04, 0x11, 0x80, 0x80, 0x84, 0x60, 0x05, 0xe1, 0x00, 0x07, 0x9c, 0xd9, 0x15, 0xef, 0x80, 0x01,
+0x00, 0x5f, 0x80, 0x06, 0x54, 0x02, 0x80, 0x02, 0xc0, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdb, 0xf4,
+0x84, 0x62, 0x84, 0x00, 0xf0, 0x81, 0x10, 0x3f, 0x80, 0x06, 0x10, 0x1f, 0x80, 0x04, 0x10, 0x4f,
+0x80, 0x05, 0xf1, 0x01, 0xa8, 0x57, 0x80, 0x24, 0x80, 0x5f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x86, 0xf4, 0xdd, 0x2f, 0x84, 0x01, 0xec, 0x0c, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xc4, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x05, 0xb4, 0x84, 0x22,
+0x50, 0x2f, 0x80, 0x2c, 0x84, 0x04, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x1c, 0x50, 0x2f, 0x80, 0x28,
+0x84, 0x04, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x1d, 0x50, 0x2f, 0x80, 0x24, 0x84, 0x04, 0xdd, 0x28,
+0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x20, 0x84, 0x04, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x11,
+0x50, 0x2f, 0x80, 0x1c, 0x84, 0x05, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f, 0x80, 0x18,
+0x84, 0x05, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x14, 0x84, 0x05, 0xdd, 0x28,
+0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x10, 0x84, 0x05, 0xdd, 0x28, 0x46, 0x70, 0x04, 0x10,
+0x46, 0x6f, 0xf0, 0x00, 0x46, 0xa0, 0x04, 0x10, 0x47, 0xc0, 0x00, 0x80, 0x46, 0x80, 0x04, 0x11,
+0x58, 0x73, 0x80, 0x80, 0x58, 0x63, 0x00, 0x03, 0x58, 0xa5, 0x04, 0x00, 0x59, 0xce, 0x0c, 0x00,
+0x58, 0x84, 0x02, 0x04, 0x85, 0x23, 0xb6, 0xc7, 0x15, 0xc5, 0x00, 0x00, 0xb7, 0x28, 0x46, 0x70,
+0x00, 0x03, 0x58, 0x73, 0x85, 0x28, 0x84, 0x01, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x40, 0x04, 0x10,
+0x46, 0x00, 0x04, 0x10, 0x46, 0x20, 0x18, 0xca, 0x58, 0x42, 0x05, 0x0c, 0x44, 0x50, 0x00, 0x17,
+0x44, 0x30, 0x00, 0x1f, 0x58, 0x00, 0x05, 0x04, 0x58, 0x21, 0x00, 0x08, 0x84, 0x38, 0xb6, 0xa4,
+0xb6, 0x60, 0xb6, 0x44, 0xb6, 0x20, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0x44, 0x10,
+0x00, 0x11, 0x44, 0x20, 0x00, 0x99, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20,
+0x00, 0x99, 0x84, 0x00, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13, 0x84, 0x49, 0x84, 0x00, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x14, 0x44, 0x20, 0x00, 0x51, 0x84, 0x00, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x20,
+0x00, 0x8e, 0x84, 0x00, 0xdd, 0x26, 0x84, 0x21, 0x80, 0x41, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x01,
+0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x22, 0x44, 0x20, 0x00, 0x81, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x1c, 0x44, 0x20, 0x00, 0x5a, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x1d, 0x44, 0x20,
+0x00, 0x68, 0x84, 0x04, 0xdd, 0x26, 0x85, 0x00, 0x84, 0x01, 0x4b, 0xe0, 0x1c, 0x01, 0x83, 0x88,
+0x81, 0x48, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x87, 0xb8, 0x50, 0x6f, 0x80, 0x34, 0x84, 0x24,
+0x44, 0x00, 0x00, 0x2f, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x40, 0x44, 0x00, 0x00, 0x16, 0xdd, 0x29,
+0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x28, 0xdd, 0x2f, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x2f, 0xdd, 0x29, 0x80, 0x46, 0x44, 0x10, 0x00, 0x31, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0x84, 0x20, 0x44, 0x00, 0x00, 0x16, 0xdd, 0x29, 0x84, 0x21,
+0x44, 0x00, 0x00, 0x15, 0xdd, 0x29, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x29, 0xf3, 0x0d,
+0x54, 0x44, 0x00, 0xff, 0x8d, 0x01, 0x44, 0x10, 0x00, 0x1d, 0x84, 0x04, 0x50, 0x24, 0x00, 0x68,
+0x40, 0xfe, 0x0c, 0x06, 0xe8, 0x03, 0x83, 0x83, 0x81, 0x44, 0x87, 0xc8, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x86, 0x6c, 0x4c, 0x8f, 0x00, 0x04, 0xdd, 0x27, 0xd5, 0xc2, 0x80, 0x4a, 0x44, 0x10,
+0x00, 0x1d, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x1c, 0x44, 0x20, 0x00, 0x59, 0x84, 0x04,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x1d, 0x84, 0x49, 0x84, 0x04, 0xdd, 0x27, 0x85, 0x00, 0x46, 0x10,
+0x00, 0x03, 0x58, 0x10, 0x85, 0x28, 0x84, 0x01, 0x4b, 0xe0, 0x04, 0x01, 0x14, 0x8f, 0x80, 0x02,
+0x81, 0x48, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x87, 0xb8, 0x50, 0x6f, 0x80, 0x34, 0x47, 0xc0,
+0x00, 0x05, 0x59, 0xce, 0x06, 0xf4, 0x84, 0x24, 0x44, 0x00, 0x00, 0x2f, 0xdd, 0x29, 0x44, 0x10,
+0x00, 0x40, 0x44, 0x00, 0x00, 0x16, 0xdd, 0x29, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x85, 0x28, 0xdd, 0x2f, 0x84, 0x20, 0x44, 0x00, 0x00, 0x2f, 0xdd, 0x29, 0x80, 0x46, 0x44, 0x10,
+0x00, 0x31, 0x84, 0x00, 0xdd, 0x3c, 0x84, 0x20, 0x44, 0x00, 0x00, 0x16, 0xdd, 0x29, 0x84, 0x21,
+0x44, 0x00, 0x00, 0x15, 0xdd, 0x29, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x29, 0x84, 0x04,
+0x54, 0x44, 0x00, 0xff, 0xf3, 0x0d, 0x8d, 0x01, 0xf5, 0x02, 0x40, 0x24, 0x00, 0x0c, 0x44, 0x10,
+0x00, 0x1c, 0x8c, 0x49, 0xe2, 0xa3, 0xe8, 0x03, 0xf3, 0x82, 0x81, 0x44, 0x84, 0x88, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x86, 0x6c, 0x4c, 0x82, 0x00, 0x04, 0xdd, 0x27, 0xd5, 0xc5, 0x40, 0x95,
+0x10, 0x08, 0x80, 0x49, 0x44, 0x10, 0x00, 0x1c, 0x84, 0x04, 0xdd, 0x27, 0x54, 0x14, 0x80, 0xff,
+0xb6, 0x3f, 0x84, 0x40, 0x84, 0x22, 0x84, 0x04, 0xdd, 0x27, 0xb4, 0xbf, 0x46, 0x60, 0x04, 0x10,
+0x46, 0x86, 0x00, 0xc2, 0x58, 0x22, 0x80, 0x08, 0x44, 0x10, 0x00, 0x1c, 0x58, 0x63, 0x05, 0x0c,
+0x84, 0x04, 0x58, 0x84, 0x00, 0x3f, 0xdd, 0x27, 0xb7, 0x06, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20,
+0x00, 0x27, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xf1, 0x84, 0x05, 0xdd, 0x27, 0x47, 0xc6,
+0x00, 0xc2, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0xa1, 0x84, 0x05, 0xdd, 0x27, 0x59, 0xce,
+0x00, 0x38, 0x44, 0x10, 0x00, 0x14, 0x84, 0x41, 0x46, 0xa0, 0x04, 0x10, 0x84, 0x05, 0xdd, 0x27,
+0x15, 0xc3, 0x00, 0x00, 0x14, 0xaf, 0x80, 0x03, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x87, 0xb8,
+0x44, 0x00, 0x00, 0x17, 0x44, 0x10, 0x00, 0x10, 0xdd, 0x29, 0xf3, 0x03, 0x84, 0x00, 0x58, 0x31,
+0x80, 0x7c, 0xf3, 0x83, 0xf0, 0x81, 0x81, 0x49, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce, 0x05, 0xb4,
+0x50, 0x9f, 0x80, 0x30, 0xf4, 0x01, 0xf2, 0x02, 0x05, 0xef, 0x80, 0x00, 0x54, 0x82, 0x00, 0x07,
+0x40, 0x24, 0x20, 0x1a, 0x41, 0xe4, 0x20, 0x1a, 0x97, 0xa0, 0xf2, 0x82, 0x15, 0xef, 0x80, 0x00,
+0xe6, 0xc8, 0xe8, 0x0f, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2b, 0x84, 0x04, 0xdd, 0x3c, 0xf5, 0x0c,
+0xf0, 0x01, 0x54, 0x32, 0x80, 0xf8, 0x44, 0x10, 0x00, 0x2b, 0x40, 0x20, 0x0c, 0x04, 0xd5, 0x24,
+0xe6, 0xd0, 0xe8, 0x10, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2b, 0x84, 0x04, 0xdd, 0x3c, 0xf2, 0x0c,
+0x40, 0x14, 0x10, 0x08, 0x54, 0x31, 0x00, 0x8f, 0x40, 0x20, 0x8c, 0x04, 0x44, 0x10, 0x00, 0x2b,
+0xd5, 0x13, 0xe6, 0xd8, 0xe8, 0x14, 0x80, 0x49, 0x44, 0x10, 0x00, 0x11, 0x84, 0x04, 0xdd, 0x3c,
+0xf3, 0x01, 0xf0, 0x0c, 0x54, 0x51, 0x80, 0x0f, 0x95, 0x2b, 0x54, 0x30, 0x00, 0xc7, 0x40, 0x22,
+0x0c, 0x04, 0x44, 0x10, 0x00, 0x11, 0x84, 0x04, 0xf3, 0x8c, 0xd5, 0x12, 0x44, 0x10, 0x00, 0x11,
+0x80, 0x49, 0x84, 0x04, 0xdd, 0x3c, 0x44, 0x50, 0x00, 0x18, 0x40, 0x03, 0x14, 0x97, 0xf1, 0x0c,
+0x84, 0x04, 0x54, 0x20, 0x80, 0xf8, 0xf2, 0x8c, 0x84, 0x2e, 0x40, 0x22, 0x08, 0x04, 0xdd, 0x27,
+0x84, 0x2a, 0x44, 0x00, 0x00, 0xf1, 0xdd, 0x2a, 0x84, 0x20, 0x44, 0x00, 0x00, 0xf2, 0xdd, 0x2a,
+0x84, 0x20, 0x84, 0x04, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x31, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x2a,
+0x84, 0x24, 0x84, 0x01, 0xdd, 0x2a, 0x84, 0x21, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x2a, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a, 0x44, 0x00,
+0x00, 0x9f, 0x44, 0x10, 0x00, 0x9b, 0xdd, 0x2a, 0x84, 0x00, 0xd5, 0x0b, 0x92, 0x00, 0x87, 0xc7,
+0x9c, 0x49, 0x4c, 0x1f, 0x7f, 0xfd, 0x9c, 0x01, 0x44, 0x30, 0x01, 0x2c, 0x4c, 0x01, 0x80, 0x04,
+0x84, 0x20, 0xd5, 0xf5, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x2a, 0x84, 0x00, 0xd5, 0x0a,
+0x92, 0x00, 0x84, 0x47, 0x9c, 0x49, 0x4c, 0x11, 0x7f, 0xfd, 0x9c, 0x01, 0x84, 0x8a, 0x4c, 0x02,
+0x00, 0x04, 0x84, 0x20, 0xd5, 0xf6, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x2a, 0x44, 0x10,
+0x00, 0xba, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x10, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x2a, 0xf3, 0x03, 0x44, 0x10, 0x00, 0x30, 0x44, 0x00, 0x00, 0x9f, 0xb4, 0x43, 0xdd, 0x2a,
+0xf5, 0x03, 0xf1, 0x02, 0xb4, 0x05, 0xe2, 0x20, 0xe8, 0x05, 0xf0, 0x82, 0x54, 0x03, 0x00, 0x07,
+0xb6, 0x1f, 0x87, 0xc7, 0x4c, 0x8f, 0x40, 0x90, 0x4c, 0x64, 0x40, 0x32, 0x80, 0x49, 0x44, 0x10,
+0x00, 0x2b, 0x84, 0x04, 0xdd, 0x3c, 0xf4, 0x0c, 0xb4, 0x5f, 0x54, 0x82, 0x00, 0xf8, 0x40, 0x61,
+0x20, 0x04, 0xf6, 0x8c, 0x80, 0x46, 0x44, 0x10, 0x00, 0x2b, 0x84, 0x04, 0xdd, 0x27, 0x80, 0x49,
+0x44, 0x10, 0x00, 0x2c, 0x84, 0x04, 0xdd, 0x3c, 0xf3, 0x0c, 0xb4, 0x1f, 0x54, 0x51, 0x80, 0xf8,
+0x40, 0x40, 0x14, 0x04, 0xf4, 0x8c, 0x80, 0x44, 0x44, 0x10, 0x00, 0x2c, 0x84, 0x04, 0xdd, 0x27,
+0x80, 0x49, 0x44, 0x10, 0x00, 0x2d, 0x84, 0x04, 0xdd, 0x3c, 0xf2, 0x0c, 0xb5, 0x1f, 0x54, 0x61,
+0x00, 0xf8, 0x44, 0x10, 0x00, 0x2d, 0x40, 0x34, 0x18, 0x04, 0xd5, 0x32, 0x84, 0x2f, 0x4c, 0x60,
+0xc0, 0x32, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2b, 0x84, 0x04, 0xdd, 0x3c, 0xf5, 0x0c, 0xb4, 0x1f,
+0x54, 0x12, 0x80, 0x8f, 0x95, 0x84, 0x40, 0x43, 0x04, 0x04, 0xf4, 0x8c, 0x80, 0x44, 0x44, 0x10,
+0x00, 0x2b, 0x84, 0x04, 0xdd, 0x27, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2c, 0x84, 0x04, 0xdd, 0x3c,
+0xf2, 0x0c, 0x44, 0x10, 0x00, 0x2c, 0x54, 0x81, 0x00, 0x8f, 0x40, 0x33, 0x20, 0x04, 0xf3, 0x8c,
+0x80, 0x43, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x2d, 0x80, 0x49, 0x84, 0x04, 0xdd, 0x3c,
+0xf0, 0x0c, 0x44, 0x10, 0x00, 0x2d, 0x54, 0x50, 0x00, 0x8f, 0x40, 0x33, 0x14, 0x04, 0x80, 0x43,
+0xd5, 0x15, 0x45, 0xe0, 0x00, 0x17, 0x4c, 0x6f, 0x40, 0x14, 0x80, 0x49, 0x44, 0x10, 0x00, 0x11,
+0x84, 0x04, 0xdd, 0x3c, 0xb4, 0x5f, 0xf3, 0x0c, 0x40, 0x81, 0x0c, 0x08, 0x54, 0x61, 0x80, 0xc3,
+0x40, 0x34, 0x18, 0x04, 0x80, 0x43, 0x44, 0x10, 0x00, 0x11, 0x84, 0x04, 0xd5, 0x12, 0x44, 0x40,
+0x00, 0x1f, 0x4c, 0x62, 0x40, 0x11, 0x84, 0x2e, 0x80, 0x49, 0x84, 0x04, 0xdd, 0x3c, 0xf6, 0x0c,
+0xb4, 0x3f, 0x54, 0x53, 0x00, 0xf8, 0x40, 0x30, 0x94, 0x04, 0x84, 0x04, 0x80, 0x43, 0x84, 0x2e,
+0xf3, 0x8c, 0xdd, 0x27, 0x04, 0x8f, 0x80, 0x01, 0x45, 0xe0, 0x00, 0x20, 0x50, 0x04, 0x00, 0x01,
+0xf0, 0x81, 0x4c, 0x0f, 0x7e, 0xb1, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x87, 0xb8, 0x84, 0x20,
+0x44, 0x00, 0x00, 0xf4, 0xdd, 0x27, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x27, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x27, 0x84, 0x00,
+0xd5, 0x0a, 0x92, 0x00, 0x84, 0x67, 0x9c, 0x49, 0x4c, 0x11, 0xff, 0xfd, 0x9c, 0x01, 0x84, 0x4a,
+0x4c, 0x01, 0x00, 0x04, 0x84, 0x20, 0xd5, 0xf6, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xf2, 0x0b, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x06, 0x6c, 0x50, 0x8f, 0x80, 0x30, 0x84, 0x22, 0x84, 0x04, 0xdd, 0x26, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x85, 0xb4, 0x80, 0x48, 0x44, 0x10, 0x00, 0x1c, 0x84, 0x04, 0x4b, 0xe0, 0x1c, 0x01,
+0xf3, 0x0a, 0xf2, 0x0c, 0x54, 0x11, 0x80, 0x1f, 0x40, 0x50, 0x88, 0x04, 0xf5, 0x8a, 0x80, 0x45,
+0x44, 0x10, 0x00, 0x1c, 0x84, 0x04, 0xdd, 0x26, 0x80, 0x48, 0x44, 0x10, 0x00, 0x1d, 0x84, 0x04,
+0x4b, 0xe0, 0x1c, 0x01, 0xf4, 0x09, 0xf0, 0x0c, 0x54, 0x22, 0x00, 0xf8, 0x40, 0x31, 0x00, 0x04,
+0xf3, 0x89, 0x80, 0x43, 0x44, 0x10, 0x00, 0x1d, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x08, 0x44, 0x10,
+0x00, 0x13, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x07, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x06, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x05, 0x44, 0x10, 0x00, 0x13,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x04, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0x46, 0x10,
+0x04, 0x10, 0x46, 0x40, 0x04, 0x10, 0x84, 0xa0, 0x58, 0x10, 0x85, 0x04, 0x58, 0x42, 0x05, 0x0c,
+0xb6, 0xa1, 0xb6, 0xa4, 0xec, 0x3c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0x8c, 0x96, 0x48, 0x97, 0xd0, 0x54, 0xa0, 0x00, 0xff, 0xf1, 0x83, 0x4e, 0x73, 0x05, 0x45,
+0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x05, 0xb4, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x64, 0x84, 0x05,
+0xdd, 0x26, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x60, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x80, 0x20,
+0x50, 0x2f, 0x80, 0x5c, 0xdd, 0x26, 0x80, 0x27, 0x50, 0x2f, 0x80, 0x58, 0x84, 0x05, 0xdd, 0x26,
+0x84, 0x26, 0x50, 0x2f, 0x80, 0x54, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x84, 0x27, 0x50, 0x2f,
+0x80, 0x50, 0xdd, 0x26, 0x81, 0x26, 0x44, 0x80, 0x00, 0x25, 0x50, 0x6f, 0x80, 0x1c, 0x80, 0x28,
+0x80, 0x46, 0x84, 0x05, 0xdd, 0x29, 0x8d, 0x01, 0x44, 0x00, 0x00, 0x2f, 0x9d, 0xb4, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x85, 0xb4, 0x4c, 0x80, 0x7f, 0xf4, 0x44, 0x10, 0x00, 0x3a, 0x50, 0x2f,
+0x80, 0x48, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x3b, 0x50, 0x2f, 0x80, 0x44, 0x84, 0x05,
+0xdd, 0x27, 0x51, 0xcf, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x17, 0x50, 0x2f, 0x80, 0x4c, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0x84, 0x20, 0x80, 0x5c, 0x84, 0x05,
+0xdd, 0x27, 0xf4, 0x1b, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x06, 0x6c, 0x58, 0x22, 0x00, 0x03,
+0x84, 0x20, 0x84, 0x05, 0x4b, 0xe0, 0x20, 0x01, 0x84, 0x21, 0x80, 0x5c, 0x84, 0x05, 0xdd, 0x27,
+0xf3, 0x1b, 0x84, 0x05, 0x58, 0x21, 0x80, 0x01, 0x84, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0x81, 0x3c,
+0x84, 0xc0, 0x46, 0x80, 0x00, 0x03, 0x58, 0x84, 0x05, 0x28, 0x84, 0x01, 0x4b, 0xe0, 0x20, 0x01,
+0x80, 0x49, 0x84, 0x05, 0x84, 0x21, 0xdd, 0x27, 0xf5, 0x1b, 0x9d, 0xb1, 0x96, 0x2c, 0x44, 0x20,
+0x00, 0x28, 0xf0, 0x9b, 0x4c, 0x61, 0x00, 0x03, 0xc8, 0xf1, 0x51, 0xef, 0x80, 0x6c, 0x80, 0x5e,
+0x84, 0x20, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0xf0, 0x1b,
+0x85, 0x1c, 0x41, 0xc0, 0x20, 0x02, 0x58, 0x2e, 0x00, 0x01, 0x84, 0x20, 0x50, 0x6f, 0x80, 0x68,
+0x84, 0x05, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x86, 0xf4, 0x15, 0xcf, 0x80, 0x1b, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x86, 0x6c, 0xdd, 0x2f, 0x80, 0x46, 0x44, 0x10, 0x00, 0x17, 0x84, 0x00,
+0x4b, 0xe0, 0x24, 0x01, 0xf2, 0x1a, 0x44, 0x7f, 0xff, 0xe0, 0x40, 0x51, 0x1c, 0x02, 0xf5, 0x9a,
+0x84, 0x00, 0x58, 0x22, 0x80, 0x10, 0x44, 0x10, 0x00, 0x17, 0x4b, 0xe0, 0x24, 0x01, 0x87, 0x89,
+0x44, 0x00, 0x00, 0x27, 0x40, 0x6e, 0x28, 0x1b, 0x40, 0x60, 0x28, 0x1a, 0x44, 0x30, 0x00, 0x31,
+0x84, 0x8e, 0x85, 0x20, 0x40, 0x82, 0x28, 0x1b, 0x40, 0x81, 0xa8, 0x1a, 0xf6, 0x85, 0x14, 0x8f,
+0x80, 0x04, 0x83, 0x89, 0x81, 0x09, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x85, 0xb4, 0x46, 0x60,
+0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0x4e, 0x93, 0x00, 0x56, 0x84, 0x28, 0x50, 0x2f, 0x80, 0x6c,
+0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0xf4, 0x1b, 0x84, 0x28, 0x54, 0x22, 0x00, 0xfb, 0x84, 0x05,
+0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x80, 0x09, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf3, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x58, 0x11,
+0x80, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xf1, 0x05, 0xf1, 0x82,
+0x80, 0x29, 0xd5, 0x09, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x01, 0xd8, 0xfd, 0x9c, 0x49, 0x84, 0x4a,
+0x4c, 0x11, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf7, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf7, 0x1a, 0x84, 0x04, 0x54, 0x13,
+0x80, 0xe7, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x0a,
+0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01, 0x4c, 0x03, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x0a, 0x4c, 0x10,
+0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00,
+0xd5, 0x57, 0x84, 0x28, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0xf4, 0x1b,
+0x84, 0x28, 0x58, 0x22, 0x00, 0x04, 0x84, 0x05, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x15,
+0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f,
+0xf3, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x58, 0x11, 0x80, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x87, 0xb8, 0xdd, 0x2f, 0xf1, 0x04, 0xf1, 0x82, 0x84, 0x20, 0xd5, 0x09, 0x92, 0x00, 0x87, 0xc7,
+0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0xaa, 0xd1, 0x03, 0x84, 0x00, 0xd5, 0xf7,
+0x84, 0x24, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4,
+0xdd, 0x2f, 0xf7, 0x1a, 0x84, 0x04, 0x54, 0x23, 0x80, 0xe7, 0x58, 0x11, 0x00, 0x10, 0xf2, 0x9a,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00,
+0x84, 0xc7, 0x9c, 0x01, 0x4c, 0x03, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04,
+0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10, 0x00, 0x15, 0x84, 0x00, 0x50, 0x2f, 0x80, 0x68, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf1, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x54, 0x10,
+0x80, 0xfe, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x85, 0xb4, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0x4e, 0xa2, 0x00, 0x7a,
+0x46, 0x40, 0x04, 0x10, 0x47, 0xe0, 0x04, 0x10, 0x59, 0xef, 0x05, 0x04, 0x58, 0x42, 0x05, 0x0c,
+0x44, 0x30, 0x00, 0x10, 0x44, 0x10, 0x00, 0x18, 0xb6, 0x64, 0xb6, 0x3e, 0x50, 0x2f, 0x80, 0x6c,
+0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x27, 0x05, 0xcf, 0x80, 0x1b, 0x44, 0x10, 0x00, 0x11,
+0x58, 0x2e, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xc1,
+0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x20, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x14, 0x84, 0x42, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x6c,
+0x84, 0x05, 0xdd, 0x27, 0xf2, 0x1b, 0x44, 0x0f, 0xff, 0xc0, 0x40, 0x51, 0x00, 0x02, 0xf5, 0x9b,
+0x58, 0x22, 0x80, 0x3f, 0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x6c,
+0x84, 0x05, 0xdd, 0x27, 0xf4, 0x1b, 0x44, 0x3f, 0xff, 0xc0, 0x41, 0xc2, 0x0c, 0x02, 0x15, 0xcf,
+0x80, 0x1b, 0x58, 0x2e, 0x00, 0x3f, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x80, 0x20,
+0x44, 0x20, 0x00, 0x31, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x3a, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05,
+0xdd, 0x27, 0xf2, 0x1b, 0x44, 0x0f, 0xff, 0x80, 0x40, 0x51, 0x00, 0x02, 0xf5, 0x9b, 0x80, 0x45,
+0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x3b, 0x50, 0x2f, 0x80, 0x6c,
+0x84, 0x05, 0xdd, 0x27, 0xf3, 0x1b, 0x44, 0x4f, 0xff, 0x80, 0x41, 0xc1, 0x90, 0x02, 0x15, 0xcf,
+0x80, 0x1b, 0x80, 0x5c, 0x84, 0x05, 0x44, 0x10, 0x00, 0x3b, 0xdd, 0x26, 0x87, 0x80, 0xd5, 0x6c,
+0x46, 0x10, 0x04, 0x10, 0x47, 0xe0, 0x04, 0x10, 0x59, 0xef, 0x05, 0x04, 0x84, 0xa8, 0x44, 0x80,
+0x00, 0x18, 0x58, 0x10, 0x85, 0x0c, 0xb6, 0xa1, 0xb7, 0x1e, 0x44, 0x10, 0x00, 0x11, 0x50, 0x2f,
+0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf3, 0x1b, 0x44, 0x10, 0x00, 0x11, 0x58, 0x21, 0x80, 0x80,
+0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xf1, 0x84, 0x05, 0xdd, 0x26,
+0x80, 0x48, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x14, 0x44, 0x20,
+0x00, 0xc2, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27,
+0xf2, 0x1b, 0x44, 0x0f, 0xff, 0xc0, 0x40, 0x41, 0x00, 0x02, 0xf4, 0x9b, 0x58, 0x22, 0x00, 0x34,
+0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27,
+0xf5, 0x1b, 0x44, 0x8f, 0xff, 0xc0, 0x40, 0x32, 0xa0, 0x02, 0xf3, 0x9b, 0x58, 0x21, 0x80, 0x34,
+0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x26, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27,
+0xf2, 0x1b, 0x44, 0x0f, 0xff, 0x80, 0x40, 0x41, 0x00, 0x02, 0xf4, 0x9b, 0x80, 0x44, 0x84, 0x26,
+0x84, 0x05, 0xdd, 0x26, 0x84, 0x27, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf7, 0x1b,
+0x44, 0x5f, 0xff, 0x80, 0x40, 0x83, 0x94, 0x02, 0x14, 0x8f, 0x80, 0x1b, 0x80, 0x48, 0x84, 0x05,
+0x84, 0x27, 0xdd, 0x26, 0x81, 0x0a, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01,
+0x4c, 0x03, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0xea, 0x4c, 0x13, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6,
+0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x84, 0x22, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0,
+0x18, 0x01, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x86, 0xf4, 0x50, 0x2f, 0x80, 0x68, 0x44, 0x10,
+0x00, 0x9f, 0x84, 0x00, 0x4b, 0xe0, 0x1c, 0x01, 0xf3, 0x1a, 0x84, 0x59, 0x40, 0x11, 0x88, 0x02,
+0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68,
+0x84, 0x00, 0x4b, 0xe0, 0x1c, 0x01, 0xf4, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x58, 0x12, 0x00, 0x01,
+0x4b, 0xe0, 0x18, 0x01, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f,
+0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10,
+0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4,
+0xdd, 0x2f, 0xf1, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x54, 0x10, 0x80, 0xfe, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x09, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x01,
+0xd8, 0xfd, 0x9c, 0x49, 0x84, 0xca, 0x4c, 0x13, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf7, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x87, 0xb8, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x1c, 0x01,
+0x44, 0x00, 0x00, 0x9f, 0x44, 0x10, 0x00, 0x82, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0xc0, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x86, 0xf4, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x01,
+0x4c, 0x02, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x6a, 0x4c, 0x11, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6,
+0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x44, 0x10, 0x00, 0x9f, 0x4b, 0xe0, 0x1c, 0x01, 0xf2, 0x1a,
+0x84, 0x02, 0x4c, 0x20, 0x00, 0x08, 0x45, 0xe0, 0x00, 0x14, 0x4c, 0x6f, 0x00, 0x04, 0x9d, 0xb1,
+0xd5, 0xe3, 0x44, 0x10, 0x00, 0x39, 0x44, 0x00, 0x00, 0x9e, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x87, 0xb8, 0xdd, 0x2f, 0x44, 0x10, 0x00, 0x9f, 0x84, 0x00, 0x50, 0x2f, 0x80, 0x68, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0x00, 0x1f, 0x80, 0x68, 0x54, 0x10, 0x80, 0x7f,
+0xf1, 0x81, 0x5e, 0xf0, 0x80, 0x40, 0xe9, 0x06, 0x44, 0x6f, 0xff, 0x80, 0x40, 0x50, 0x98, 0x04,
+0xf5, 0x81, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x87, 0xb8, 0x84, 0x22, 0x44, 0x00, 0x00, 0x9e,
+0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x30, 0x00, 0x05, 0x58, 0x31, 0x86, 0xf4, 0x44, 0x10, 0x00, 0x9f,
+0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x4b, 0xe0, 0x0c, 0x01, 0xf4, 0x1a, 0x44, 0x00, 0x00, 0x9f,
+0x58, 0x12, 0x00, 0x06, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x86, 0x6c,
+0x4e, 0xa2, 0x00, 0x2a, 0x50, 0x2f, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0xf0, 0x1b, 0x44, 0x10, 0x00, 0x3a, 0x54, 0x50,
+0x00, 0x80, 0xf5, 0x9b, 0x40, 0x2e, 0x14, 0x00, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0x50, 0x2f,
+0x80, 0x6c, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4,
+0xdd, 0x2f, 0xf2, 0x1b, 0x44, 0x10, 0x00, 0x3b, 0x54, 0x31, 0x00, 0x80, 0x40, 0x2e, 0x0c, 0x00,
+0x84, 0x00, 0xd5, 0x24, 0x84, 0x26, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0xf4, 0x1b, 0x84, 0x26, 0x54, 0x62, 0x00, 0x80, 0xf6, 0x9b,
+0x40, 0x24, 0x18, 0x00, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x27, 0x50, 0x2f, 0x80, 0x6c,
+0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0xf1, 0x1b, 0x84, 0x05,
+0x54, 0x30, 0x80, 0x80, 0x40, 0x24, 0x0c, 0x00, 0x84, 0x27, 0xf3, 0x9b, 0x4b, 0xe0, 0x1c, 0x01,
+0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x9c, 0x49,
+0x84, 0x6a, 0x4c, 0x11, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf2, 0x1a,
+0x44, 0x00, 0x00, 0x15, 0x58, 0x11, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8,
+0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x09, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x01, 0xd8, 0xfd, 0x9c, 0x49,
+0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf7, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf1, 0x1a,
+0x44, 0x00, 0x00, 0x15, 0x54, 0x10, 0x80, 0xfe, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8,
+0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01, 0x4c, 0x03, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0x8a, 0x4c, 0x12, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x07, 0xb8, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x00,
+0x00, 0x9f, 0x44, 0x10, 0x00, 0x82, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0xc0, 0x84, 0x20, 0xd5, 0x0a,
+0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x6a, 0x4c, 0x11,
+0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x44, 0x10, 0x00, 0x9f,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf2, 0x1a, 0x84, 0xa2, 0xd2, 0x07,
+0x44, 0x00, 0x00, 0x14, 0x4c, 0x60, 0x00, 0x04, 0x9d, 0xb1, 0xd5, 0xe1, 0x44, 0x10, 0x00, 0x39,
+0x44, 0x00, 0x00, 0x9e, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x44, 0x10,
+0x00, 0x9f, 0x84, 0x00, 0x50, 0x2f, 0x80, 0x68, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4,
+0xdd, 0x2f, 0x00, 0x1f, 0x80, 0x68, 0x54, 0x10, 0x80, 0x7f, 0x5e, 0xf0, 0x80, 0x40, 0xe9, 0x05,
+0x44, 0x4f, 0xff, 0x80, 0x40, 0x10, 0x90, 0x04, 0x05, 0xef, 0x80, 0x01, 0xf6, 0x02, 0x40, 0x1f,
+0x04, 0x01, 0x40, 0x2e, 0x28, 0x1b, 0x40, 0x24, 0x28, 0x1a, 0xe0, 0xc1, 0xe8, 0x22, 0xca, 0x2d,
+0x4e, 0x93, 0x00, 0x12, 0x4e, 0xa2, 0x00, 0x09, 0x46, 0x70, 0x00, 0x0c, 0x58, 0x73, 0x82, 0x29,
+0x10, 0x93, 0x80, 0x00, 0xd5, 0x4e, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x28, 0x10, 0xa4,
+0x80, 0x00, 0xd5, 0x47, 0x4e, 0xa2, 0x00, 0x07, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x82, 0x2b,
+0xd5, 0x4a, 0x46, 0x30, 0x00, 0x0c, 0x58, 0x31, 0x82, 0x2a, 0x10, 0xa1, 0x80, 0x00, 0xd5, 0x4b,
+0x5e, 0xf1, 0x00, 0x3f, 0xe8, 0x0a, 0x4e, 0xa2, 0x00, 0x06, 0x51, 0xce, 0x00, 0x01, 0x48, 0xff,
+0xfe, 0xe1, 0x8d, 0x01, 0x48, 0xff, 0xfe, 0xde, 0xf5, 0x02, 0xe0, 0x25, 0xe8, 0x19, 0x44, 0x00,
+0x00, 0x3f, 0x4c, 0x20, 0x40, 0x16, 0x4e, 0x93, 0x00, 0x0b, 0x4e, 0xa2, 0x00, 0x1d, 0x46, 0x10,
+0x00, 0x0c, 0x58, 0x10, 0x82, 0x29, 0x11, 0xc0, 0x80, 0x00, 0xd5, 0x1b, 0x4e, 0xa2, 0x00, 0x26,
+0x46, 0x40, 0x00, 0x0c, 0x58, 0x42, 0x02, 0x2b, 0x11, 0xc2, 0x00, 0x00, 0xd5, 0x24, 0x4e, 0x93,
+0x00, 0x14, 0x4e, 0xa2, 0x00, 0x09, 0x47, 0xe0, 0x00, 0x0c, 0x59, 0xef, 0x02, 0x29, 0x11, 0xcf,
+0x00, 0x00, 0xd5, 0x07, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x28, 0x10, 0x84, 0x80, 0x00,
+0x85, 0x21, 0x48, 0xff, 0xfc, 0x2a, 0x4e, 0xa2, 0x00, 0x09, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10,
+0x82, 0x2b, 0x80, 0x5c, 0xae, 0x88, 0xd5, 0x07, 0x46, 0x30, 0x00, 0x0c, 0x58, 0x31, 0x82, 0x2a,
+0x10, 0x81, 0x80, 0x00, 0x8d, 0x21, 0x84, 0xa2, 0x4c, 0x92, 0xfc, 0x17, 0x46, 0x20, 0x04, 0x10,
+0x46, 0x10, 0x04, 0x10, 0x85, 0x00, 0x58, 0x21, 0x05, 0x0c, 0x58, 0x10, 0x85, 0x04, 0xb7, 0x02,
+0xb7, 0x01, 0x50, 0x2f, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0xf0, 0x1b, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x06, 0x6c,
+0x54, 0x20, 0x00, 0x7f, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12,
+0x80, 0x48, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x14, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x19, 0x84, 0x23, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x18, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0xf2, 0x17, 0x80, 0x20,
+0xdd, 0x26, 0xf2, 0x16, 0x80, 0x28, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x15, 0x84, 0x26, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x14, 0x84, 0x05, 0x84, 0x27, 0xdd, 0x26, 0x50, 0x9f, 0x80, 0x1c, 0x44, 0x70,
+0x00, 0x25, 0x0c, 0x24, 0x80, 0x01, 0x80, 0x27, 0x84, 0x05, 0xdd, 0x26, 0x9d, 0xf9, 0x44, 0x40,
+0x00, 0x2f, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x06, 0x6c, 0x4c, 0x72, 0x7f, 0xf4, 0xf2, 0x12,
+0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0x4b, 0xe0, 0x20, 0x01, 0xf2, 0x11, 0x44, 0x10, 0x00, 0x3b,
+0x84, 0x05, 0x4b, 0xe0, 0x20, 0x01, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x50, 0x8f,
+0x80, 0x68, 0x84, 0x22, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94,
+0x86, 0xf4, 0x80, 0x48, 0x44, 0x10, 0x00, 0x9f, 0x84, 0x00, 0x4b, 0xe0, 0x24, 0x01, 0xf3, 0x1a,
+0x44, 0x00, 0x00, 0x9f, 0x54, 0x11, 0x80, 0xf9, 0xdd, 0x26, 0x80, 0x48, 0x84, 0x24, 0x84, 0x00,
+0x4b, 0xe0, 0x24, 0x01, 0xf7, 0x1a, 0x84, 0x04, 0x54, 0x13, 0x80, 0xf3, 0xdd, 0x26, 0xf1, 0x13,
+0x44, 0x00, 0x00, 0x17, 0xdd, 0x26, 0x05, 0xef, 0x80, 0x03, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73,
+0x85, 0xb4, 0x50, 0x8f, 0x80, 0x6c, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0x4f, 0xe3,
+0x00, 0x4c, 0x80, 0x48, 0x84, 0x26, 0x84, 0x05, 0xdd, 0x27, 0xf5, 0x1b, 0x46, 0x90, 0x00, 0x0c,
+0x58, 0x94, 0x82, 0x28, 0x54, 0x42, 0x80, 0xc0, 0x00, 0x14, 0x80, 0x00, 0xf4, 0x9b, 0x98, 0x8c,
+0x84, 0x05, 0x84, 0x26, 0xdd, 0x26, 0x80, 0x48, 0x84, 0x27, 0x84, 0x05, 0xdd, 0x27, 0xf3, 0x1b,
+0x00, 0x04, 0x80, 0x00, 0x54, 0x91, 0x80, 0xc0, 0x14, 0x9f, 0x80, 0x1b, 0x40, 0x20, 0x24, 0x00,
+0x84, 0x27, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x48, 0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0xdd, 0x27,
+0xf2, 0x1b, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x29, 0x54, 0x41, 0x00, 0xc0, 0x00, 0x54,
+0x80, 0x00, 0xf4, 0x9b, 0x98, 0xac, 0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x48,
+0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x27, 0xf1, 0x1b, 0x00, 0x04, 0x80, 0x00, 0x54, 0x50,
+0x80, 0xc0, 0xf5, 0x9b, 0x98, 0x85, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x03,
+0x84, 0x28, 0x84, 0x05, 0xd5, 0x49, 0x84, 0x26, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x27, 0xf1, 0x1b,
+0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x2a, 0x54, 0x40, 0x80, 0xc0, 0x00, 0x04, 0x80, 0x00,
+0xf4, 0x9b, 0x98, 0x84, 0x84, 0x26, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x27, 0x80, 0x48, 0x84, 0x05,
+0xdd, 0x27, 0xf3, 0x1b, 0x00, 0x24, 0x80, 0x00, 0x54, 0x91, 0x80, 0xc0, 0x14, 0x9f, 0x80, 0x1b,
+0x88, 0x49, 0x84, 0x27, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x3a, 0x80, 0x48, 0x84, 0x05,
+0xdd, 0x27, 0xf5, 0x1b, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x2b, 0x54, 0x42, 0x80, 0xc0,
+0x00, 0x14, 0x80, 0x00, 0xf4, 0x9b, 0x98, 0x8c, 0x84, 0x05, 0x44, 0x10, 0x00, 0x3a, 0xdd, 0x26,
+0x80, 0x48, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x27, 0xf0, 0x1b, 0x00, 0x24, 0x80, 0x00,
+0x54, 0x30, 0x00, 0xc0, 0xf3, 0x9b, 0x98, 0x93, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x26,
+0x84, 0x05, 0x84, 0x28, 0x84, 0x44, 0xdd, 0x26, 0xec, 0x74, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xcc, 0x46, 0x50, 0x04, 0x11, 0x58, 0x52, 0x80, 0x04, 0x84, 0xc0,
+0x05, 0xc2, 0x80, 0x00, 0x46, 0x30, 0x04, 0x10, 0xb6, 0xc5, 0x58, 0x31, 0x85, 0x04, 0x44, 0x40,
+0x18, 0x30, 0xb5, 0x43, 0x46, 0x00, 0x04, 0x10, 0xb6, 0x83, 0x58, 0x00, 0x05, 0x0c, 0x44, 0x10,
+0x20, 0x00, 0xb5, 0x20, 0xb6, 0x20, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x05, 0xb4, 0x50, 0x2f,
+0x80, 0x2c, 0x84, 0x24, 0x84, 0x05, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x86, 0x6c, 0xdd, 0x28,
+0x84, 0x24, 0x44, 0x20, 0x00, 0x27, 0x84, 0x05, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x28, 0x44, 0x10,
+0x00, 0x11, 0x84, 0x05, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05,
+0xdd, 0x27, 0x50, 0x2f, 0x80, 0x24, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x28, 0x44, 0x10,
+0x00, 0x12, 0x44, 0x20, 0x00, 0x83, 0x84, 0x05, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x20, 0x44, 0x10,
+0x00, 0x13, 0x84, 0x05, 0xdd, 0x28, 0x50, 0x2f, 0x80, 0x1c, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05,
+0xdd, 0x28, 0x80, 0x46, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x14,
+0x44, 0x20, 0x00, 0x20, 0x84, 0x05, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x18, 0x80, 0x06, 0x84, 0x21,
+0xdd, 0x28, 0x80, 0x46, 0x80, 0x06, 0x84, 0x21, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x14, 0x80, 0x06,
+0x44, 0x10, 0x00, 0x22, 0xdd, 0x28, 0x80, 0x06, 0x44, 0x10, 0x00, 0x22, 0x44, 0x20, 0x00, 0x13,
+0xdd, 0x27, 0x50, 0x2f, 0x80, 0x10, 0x80, 0x06, 0x44, 0x10, 0x00, 0x23, 0xdd, 0x28, 0x80, 0x46,
+0x80, 0x06, 0x44, 0x10, 0x00, 0x23, 0xdd, 0x27, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x07, 0xb8,
+0x84, 0x24, 0x44, 0x00, 0x00, 0x2f, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x16,
+0xdd, 0x28, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x28, 0xdd, 0x2f, 0x50, 0x2f,
+0x80, 0x0c, 0x80, 0x06, 0x44, 0x10, 0x00, 0x31, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4,
+0xdd, 0x2f, 0xf2, 0x03, 0x80, 0x26, 0xf2, 0x81, 0x44, 0x00, 0x00, 0x16, 0xdd, 0x28, 0x80, 0x06,
+0x44, 0x10, 0x00, 0x23, 0x84, 0x41, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x16,
+0xdd, 0x28, 0xd5, 0x0b, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x49, 0x4c, 0x1f, 0x7f, 0xfd, 0x9d, 0xb1,
+0x44, 0x70, 0x00, 0x3c, 0x4c, 0x63, 0x80, 0x04, 0x84, 0x20, 0xd5, 0xf5, 0x44, 0x10, 0x00, 0x31,
+0x50, 0x2f, 0x80, 0x0c, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f,
+0xf6, 0x01, 0x20, 0x7f, 0x80, 0x0c, 0x97, 0x72, 0x9a, 0x3d, 0x44, 0x40, 0x03, 0xe8, 0x42, 0x20,
+0x10, 0x24, 0x44, 0x30, 0x00, 0x2b, 0x40, 0x01, 0x0c, 0x36, 0x84, 0x2a, 0x40, 0x20, 0x04, 0xd6,
+0xe4, 0xc5, 0xe9, 0x02, 0x8c, 0x0a, 0x87, 0xca, 0x40, 0x20, 0x78, 0x16, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x06, 0x6c, 0x84, 0x27, 0x84, 0x00, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x87, 0xb8,
+0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x16, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x21, 0x44, 0x00,
+0x00, 0x15, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x4b, 0xe0, 0x1c, 0x01,
+0xf2, 0x0b, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0a, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x09, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x08, 0x44, 0x10,
+0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x07, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x06, 0x84, 0x21, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x05, 0x44, 0x10, 0x00, 0x22, 0x84, 0x00,
+0xdd, 0x26, 0xf2, 0x04, 0x44, 0x10, 0x00, 0x23, 0x84, 0x00, 0xdd, 0x26, 0x46, 0x20, 0x04, 0x11,
+0x46, 0x10, 0x04, 0x10, 0x46, 0x30, 0x04, 0x10, 0x58, 0x31, 0x85, 0x0c, 0x58, 0x21, 0x00, 0x04,
+0x58, 0x10, 0x85, 0x04, 0x15, 0xc1, 0x00, 0x00, 0xb7, 0x41, 0xb7, 0x23, 0x84, 0x27, 0x50, 0x2f,
+0x80, 0x08, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x85, 0xb4, 0xdd, 0x2f, 0xec, 0x34,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x46, 0x50,
+0x08, 0x21, 0x58, 0x52, 0x80, 0x04, 0xb4, 0x85, 0x46, 0x10, 0x04, 0x11, 0x84, 0x73, 0x58, 0x10,
+0x80, 0x04, 0x40, 0x22, 0x0c, 0x02, 0xb6, 0x41, 0x46, 0x10, 0x04, 0x11, 0x80, 0xc0, 0x58, 0x10,
+0x82, 0x00, 0x84, 0x00, 0xb5, 0x01, 0x54, 0x74, 0x00, 0x03, 0xc7, 0x14, 0x84, 0x40, 0xd5, 0x0b,
+0x92, 0x00, 0x85, 0x27, 0x9c, 0xd9, 0x4c, 0x34, 0xff, 0xfd, 0x9c, 0x91, 0x45, 0xe0, 0x00, 0x32,
+0x4c, 0x2f, 0x00, 0x04, 0x84, 0x60, 0xd5, 0xf5, 0x9c, 0x01, 0x44, 0x20, 0x27, 0x10, 0x4c, 0x01,
+0x7f, 0xeb, 0x84, 0xa0, 0x84, 0x24, 0x40, 0x2f, 0x84, 0x00, 0x80, 0x05, 0xf5, 0x81, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf0, 0x01, 0x44, 0x3f, 0xff, 0xe7, 0x84, 0x81,
+0x40, 0x10, 0x0c, 0x02, 0x4c, 0x62, 0x00, 0x06, 0x84, 0xe3, 0x4c, 0x63, 0xc0, 0x08, 0xd5, 0x04,
+0x58, 0x10, 0x80, 0x10, 0xd5, 0x03, 0x58, 0x10, 0x80, 0x08, 0x4c, 0x10, 0x00, 0x08, 0x84, 0x04,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x46, 0x00, 0x04, 0x11, 0x58, 0x00,
+0x00, 0x04, 0xb5, 0x00, 0x58, 0x14, 0x00, 0x0c, 0xb6, 0x20, 0xc6, 0x05, 0x85, 0x21, 0x4c, 0x64,
+0xc0, 0xbc, 0xd5, 0x5d, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x87, 0xb8, 0x44, 0x10, 0x00, 0x24,
+0x44, 0x00, 0x00, 0xc3, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x10, 0x00, 0x30, 0x44, 0x00, 0x00, 0xc4,
+0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x85, 0xb4, 0x80, 0x5f, 0x84, 0x26,
+0x84, 0x05, 0xdd, 0x27, 0xb4, 0xdf, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x82, 0x28, 0x54, 0x33,
+0x00, 0xc0, 0x00, 0x90, 0x80, 0x00, 0xb6, 0x7f, 0x40, 0x24, 0x8c, 0x00, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x06, 0x6c, 0x84, 0x26, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x5f, 0x84, 0x27, 0x84, 0x05,
+0xdd, 0x27, 0xb4, 0x1f, 0x84, 0x27, 0x54, 0x40, 0x00, 0xc0, 0xb6, 0x9f, 0x40, 0x22, 0x24, 0x00,
+0x84, 0x05, 0xdd, 0x26, 0x80, 0x5f, 0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0xdd, 0x27, 0xb4, 0x7f,
+0x46, 0x50, 0x00, 0x0c, 0x58, 0x52, 0x82, 0x29, 0x54, 0x41, 0x80, 0xc0, 0x00, 0x92, 0x80, 0x00,
+0xb6, 0x9f, 0x40, 0x24, 0x90, 0x00, 0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x5f,
+0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x27, 0xb4, 0x5f, 0x81, 0x1f, 0x54, 0x31, 0x00, 0xc0,
+0x44, 0x10, 0x00, 0x3b, 0x40, 0x21, 0xa4, 0x00, 0x84, 0x05, 0xd5, 0x5c, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x87, 0xb8, 0x44, 0x10, 0x00, 0x24, 0x44, 0x00, 0x00, 0xc3, 0x4b, 0xe0, 0x1c, 0x01,
+0x44, 0x10, 0x00, 0x3a, 0x44, 0x00, 0x00, 0xc4, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x85, 0xb4, 0x84, 0x26, 0x80, 0x5f, 0x84, 0x05, 0xdd, 0x27, 0xb4, 0xdf, 0x46, 0x10,
+0x00, 0x0c, 0x58, 0x10, 0x82, 0x2a, 0x54, 0x53, 0x00, 0xc0, 0x00, 0x90, 0x80, 0x00, 0xb6, 0xbf,
+0x40, 0x24, 0x94, 0x00, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0x84, 0x26, 0x84, 0x05,
+0xdd, 0x26, 0x84, 0x27, 0x80, 0x5f, 0x84, 0x05, 0xdd, 0x27, 0xb4, 0x5f, 0x84, 0x27, 0x54, 0x31,
+0x00, 0xc0, 0xb6, 0x7f, 0x40, 0x21, 0xa4, 0x00, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x3a,
+0x80, 0x5f, 0x84, 0x05, 0xdd, 0x27, 0xb4, 0x9f, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x2b,
+0x00, 0x90, 0x00, 0x00, 0x54, 0x52, 0x00, 0xc0, 0xb6, 0xbf, 0x40, 0x24, 0x94, 0x00, 0x44, 0x10,
+0x00, 0x3a, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x5f, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x27,
+0xb4, 0x5f, 0x81, 0x1f, 0x54, 0x31, 0x00, 0xc0, 0x84, 0x05, 0x40, 0x21, 0xa4, 0x00, 0x44, 0x10,
+0x00, 0x3b, 0xb6, 0x7f, 0xdd, 0x26, 0x84, 0x01, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x84, 0x40, 0xf2, 0x81, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x97,
+0x82, 0x34, 0x54, 0x80, 0x00, 0xff, 0x46, 0x60, 0x00, 0x09, 0x58, 0x63, 0x03, 0x9c, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x86, 0x6c, 0xa7, 0x70, 0x4c, 0x54, 0x40, 0x16, 0xa6, 0xb1, 0x44, 0x10,
+0x00, 0x11, 0x84, 0x00, 0xdd, 0x27, 0xa6, 0xb2, 0x44, 0x10, 0x00, 0x12, 0x84, 0x00, 0xdd, 0x27,
+0xa6, 0xb3, 0x44, 0x10, 0x00, 0x13, 0x84, 0x00, 0xdd, 0x27, 0xa6, 0xb4, 0x84, 0x00, 0x44, 0x10,
+0x00, 0x14, 0xdd, 0x27, 0x9d, 0xb5, 0x46, 0x50, 0x00, 0x09, 0x58, 0x52, 0x83, 0xe2, 0xde, 0xe4,
+0x46, 0x50, 0x04, 0x11, 0x04, 0x22, 0x80, 0xec, 0x44, 0x0f, 0xc0, 0xc0, 0x54, 0x14, 0x80, 0x3f,
+0x41, 0xe1, 0x00, 0x02, 0x40, 0x40, 0xf8, 0x04, 0x14, 0x42, 0x80, 0xec, 0xe7, 0x0f, 0xe8, 0x1a,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x77, 0x80, 0x8e, 0x44, 0x00, 0x00, 0x3e, 0x52, 0x73, 0x80, 0x37,
+0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x80, 0x27, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x27,
+0x44, 0x00, 0x00, 0x3f, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x27, 0x44, 0x00, 0x00, 0x40, 0x4b, 0xe0,
+0x18, 0x01, 0x84, 0x24, 0x40, 0x2f, 0x84, 0x00, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x85, 0xb4, 0xdd, 0x2f, 0xf1, 0x01, 0x84, 0x00, 0x58, 0x30, 0x80, 0x80, 0x80, 0x43, 0x84, 0x24,
+0xf3, 0x81, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0x6c, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0c,
+0x00, 0x47, 0x82, 0x2e, 0x40, 0x32, 0x04, 0x09, 0x54, 0x01, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x06,
+0x58, 0xf7, 0x8d, 0x58, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x96, 0x49, 0xe6, 0x38, 0xe9, 0x36, 0x80, 0x60, 0xa2, 0x59,
+0x47, 0xe0, 0x00, 0x0c, 0x14, 0x1f, 0x00, 0x8b, 0xb4, 0xa3, 0x50, 0x20, 0x00, 0x08, 0x46, 0xf0,
+0x00, 0x0c, 0x14, 0x57, 0x80, 0x8c, 0xb4, 0x62, 0x50, 0x20, 0x00, 0x0c, 0x46, 0xf0, 0x00, 0x0c,
+0x14, 0x37, 0x80, 0x8d, 0xb4, 0xa2, 0x50, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x57,
+0x80, 0x8e, 0x50, 0x50, 0x00, 0x14, 0xb4, 0x82, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x47, 0x80, 0x8f,
+0x00, 0x0f, 0x02, 0x2c, 0xb4, 0x65, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x37, 0x80, 0x90, 0x5c, 0xf0,
+0x00, 0x37, 0xe8, 0x0a, 0x42, 0x10, 0xa0, 0x0b, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x8f, 0x90,
+0xdd, 0x2f, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xec, 0x85, 0x00, 0x14, 0x8f, 0x80, 0x03, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x07, 0xb8, 0x44, 0x10, 0x00, 0x10, 0x81, 0x40, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x00,
+0x00, 0xba, 0x84, 0x21, 0xdd, 0x26, 0x84, 0xe3, 0x80, 0x66, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce,
+0x06, 0xf4, 0x50, 0x6f, 0x80, 0x08, 0xf3, 0x81, 0x80, 0x27, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x23,
+0x44, 0x10, 0x00, 0xbc, 0x84, 0x00, 0x80, 0x46, 0xdd, 0x3c, 0xf1, 0x02, 0x9d, 0xfc, 0x44, 0x00,
+0x00, 0x2f, 0x89, 0x01, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x87, 0xb8, 0xf3, 0x01, 0x4c, 0x70,
+0x7f, 0xec, 0x9e, 0x44, 0x44, 0x00, 0x00, 0xbb, 0x4b, 0xe0, 0x24, 0x01, 0x50, 0x2f, 0x80, 0x0c,
+0x44, 0x10, 0x00, 0xbc, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f,
+0x84, 0x20, 0x84, 0x04, 0x4b, 0xe0, 0x24, 0x01, 0xf0, 0x03, 0x44, 0x50, 0x00, 0x37, 0x42, 0x30,
+0x14, 0x24, 0x84, 0x96, 0x40, 0x21, 0x90, 0x36, 0x89, 0x02, 0x40, 0x04, 0x28, 0x07, 0xec, 0x14,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x4c, 0x46, 0x60,
+0x00, 0x09, 0x58, 0x63, 0x03, 0xfc, 0x83, 0xc6, 0x3a, 0x0f, 0x0c, 0x04, 0x46, 0xa0, 0x00, 0x09,
+0x58, 0xa5, 0x03, 0xf4, 0x50, 0x9f, 0x80, 0x48, 0x46, 0x50, 0x00, 0x09, 0x58, 0x52, 0x83, 0xec,
+0x51, 0xcf, 0x80, 0x64, 0x3a, 0x04, 0x8c, 0x24, 0x46, 0x20, 0x00, 0x09, 0x58, 0x21, 0x03, 0xe4,
+0x50, 0x6f, 0x80, 0x34, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x87, 0x08, 0x3a, 0x05, 0x04, 0x00,
+0x81, 0x09, 0xf0, 0x9b, 0x12, 0x1e, 0x00, 0x06, 0x3a, 0x02, 0x84, 0x00, 0x85, 0x20, 0xb4, 0x9e,
+0xb6, 0x1c, 0x12, 0x1e, 0x00, 0x02, 0x3a, 0x01, 0x04, 0x00, 0x41, 0xe2, 0x40, 0x09, 0x50, 0xaf,
+0x80, 0x5c, 0xb6, 0x0a, 0x12, 0x44, 0x00, 0x00, 0x12, 0x15, 0x00, 0x02, 0x11, 0xef, 0x80, 0x5a,
+0x14, 0x9f, 0x80, 0x2a, 0x44, 0x20, 0x00, 0x14, 0x80, 0x29, 0x80, 0x06, 0x4b, 0xe0, 0x1c, 0x01,
+0xa6, 0xf3, 0xa5, 0x73, 0x00, 0x83, 0x00, 0x04, 0x40, 0x22, 0xb8, 0x09, 0x40, 0x21, 0x38, 0x08,
+0x54, 0x41, 0x80, 0x3f, 0x54, 0x04, 0x00, 0x03, 0x44, 0x1f, 0xff, 0x80, 0x87, 0xc7, 0x58, 0x51,
+0x00, 0x18, 0x40, 0x32, 0x04, 0x04, 0x11, 0xe3, 0x00, 0x02, 0x58, 0x40, 0x00, 0x1c, 0x87, 0xc1,
+0x50, 0x8f, 0x80, 0x1c, 0x11, 0xe3, 0x00, 0x05, 0xad, 0x73, 0xae, 0xf3, 0xaf, 0x34, 0x80, 0x29,
+0x44, 0x20, 0x00, 0x18, 0x80, 0x08, 0x4b, 0xe0, 0x1c, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x24,
+0x00, 0x01, 0x54, 0x00, 0x80, 0x03, 0x58, 0x31, 0x00, 0x01, 0x58, 0x40, 0x00, 0x08, 0x10, 0x34,
+0x00, 0x01, 0x10, 0x44, 0x00, 0x00, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xf0, 0x50, 0x1f,
+0x80, 0x6c, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x20, 0xdd, 0x27, 0x80, 0x3c, 0x84, 0x46, 0x50, 0x0f,
+0x80, 0x26, 0xdd, 0x27, 0x80, 0x2a, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x2c, 0xdd, 0x27, 0x46, 0x50,
+0x04, 0x10, 0x04, 0xa2, 0x81, 0x01, 0x45, 0xcf, 0xff, 0x1f, 0x40, 0x45, 0x70, 0x02, 0x14, 0x42,
+0x81, 0x01, 0x46, 0x00, 0x04, 0x1d, 0x80, 0x26, 0x44, 0x20, 0x00, 0x14, 0xdd, 0x27, 0x46, 0x00,
+0x04, 0x1d, 0x80, 0x28, 0x44, 0x20, 0x00, 0x18, 0x58, 0x00, 0x00, 0x14, 0xdd, 0x27, 0x46, 0x00,
+0x04, 0x11, 0x84, 0x24, 0xa8, 0x41, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x04, 0x10, 0xb4, 0x60,
+0x80, 0x29, 0x58, 0x21, 0x80, 0x04, 0xb6, 0x40, 0xb4, 0xe0, 0x9c, 0x49, 0x55, 0xc3, 0x80, 0x40,
+0x4f, 0xc2, 0x00, 0x05, 0x44, 0x50, 0x00, 0x64, 0xd9, 0xf8, 0x46, 0x80, 0x04, 0x11, 0x85, 0x20,
+0x14, 0x94, 0x00, 0x01, 0x80, 0xc8, 0x05, 0xe3, 0x00, 0xca, 0x46, 0xa0, 0x00, 0x05, 0x58, 0xa5,
+0x07, 0xb8, 0x15, 0xef, 0x80, 0x05, 0x80, 0x29, 0x44, 0x00, 0x00, 0x1b, 0xdd, 0x2a, 0x47, 0xc0,
+0x00, 0x05, 0x59, 0xce, 0x06, 0xf4, 0x44, 0x10, 0x00, 0x41, 0x50, 0x2f, 0x80, 0xac, 0x80, 0x09,
+0xdd, 0x3c, 0xf5, 0x2b, 0x50, 0x2f, 0x80, 0xac, 0xf5, 0x84, 0x44, 0x10, 0x00, 0x42, 0x80, 0x09,
+0xdd, 0x3c, 0xf2, 0x2b, 0x44, 0x10, 0x00, 0x8c, 0xf2, 0x83, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a,
+0x44, 0x10, 0x00, 0x9f, 0x50, 0x2f, 0x80, 0xac, 0x80, 0x09, 0xdd, 0x3c, 0xf0, 0x2b, 0x46, 0x40,
+0x00, 0xc0, 0x58, 0x42, 0x00, 0x20, 0xf0, 0x82, 0x14, 0x43, 0x00, 0xca, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x85, 0xb4, 0x84, 0x21, 0x50, 0x2f, 0x80, 0xa4, 0x84, 0x05, 0xdd, 0x27, 0x84, 0x21,
+0x50, 0x2f, 0x80, 0xa0, 0x80, 0x09, 0xdd, 0x27, 0x80, 0x29, 0x50, 0x2f, 0x80, 0x9c, 0x84, 0x04,
+0xdd, 0x27, 0x84, 0x2b, 0x50, 0x2f, 0x80, 0x98, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x2d, 0x50, 0x2f,
+0x80, 0x94, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x90, 0x84, 0x04,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x8c, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10,
+0x00, 0x16, 0x50, 0x2f, 0x80, 0x88, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x11, 0x50, 0x2f,
+0x80, 0x84, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f, 0x80, 0x80, 0x84, 0x05,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x7c, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10,
+0x00, 0x14, 0x50, 0x2f, 0x80, 0x78, 0x84, 0x05, 0xdd, 0x27, 0x84, 0x21, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x06, 0x6c, 0x80, 0x41, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x21, 0x44, 0x20, 0x00, 0xe1,
+0x80, 0x09, 0xdd, 0x26, 0x80, 0x29, 0x44, 0x20, 0x00, 0x83, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x2b,
+0x44, 0x20, 0x00, 0x51, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x2d, 0x44, 0x20, 0x00, 0x3c, 0x84, 0x04,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x24, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x15, 0x9e, 0x8b, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x16, 0x44, 0x20, 0x00, 0xa1,
+0x84, 0x04, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xf1, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13,
+0x44, 0x20, 0x00, 0xa1, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x41, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x10, 0x9c, 0x0f, 0xdd, 0x2a, 0x80, 0x29, 0x44, 0x00, 0x00, 0x6d,
+0xdd, 0x2a, 0x80, 0x29, 0x44, 0x00, 0x00, 0x6e, 0xdd, 0x2a, 0x84, 0x28, 0x14, 0x14, 0x00, 0x01,
+0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0x8c, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x40, 0x44, 0x00,
+0x00, 0x9f, 0xdd, 0x2a, 0x80, 0x29, 0x44, 0x00, 0x00, 0x1b, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x39,
+0x44, 0x00, 0x00, 0x41, 0xdd, 0x2a, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0x8c, 0xdd, 0x2a,
+0x80, 0xc9, 0x50, 0x8f, 0x80, 0xac, 0x80, 0xfc, 0x84, 0x00, 0x44, 0x10, 0x00, 0x8c, 0x80, 0x48,
+0xdd, 0x27, 0xf3, 0x2b, 0x9d, 0xb1, 0xc3, 0x04, 0x44, 0x50, 0x00, 0x64, 0xde, 0xf6, 0x46, 0x60,
+0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x84, 0x20, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x22,
+0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x84, 0x2a, 0x44, 0x00, 0x00, 0xbc, 0xdd, 0x26, 0x84, 0x23,
+0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x41, 0x44, 0x00, 0x00, 0xbc, 0xdd, 0x26,
+0x84, 0x24, 0x44, 0x00, 0x00, 0xf1, 0xdd, 0x26, 0x87, 0x85, 0x44, 0x00, 0x00, 0xf2, 0x84, 0x20,
+0xdd, 0x26, 0x85, 0x20, 0x15, 0xcf, 0x80, 0x01, 0xb7, 0x3f, 0x50, 0xaf, 0x80, 0xa8, 0x50, 0x9f,
+0x80, 0xac, 0x50, 0x8f, 0x80, 0x74, 0x84, 0x20, 0x44, 0x00, 0x00, 0x1b, 0xdd, 0x26, 0x50, 0x4f,
+0x80, 0x48, 0x38, 0x12, 0x70, 0x00, 0x44, 0x00, 0x00, 0x42, 0xdd, 0x26, 0x84, 0x24, 0x84, 0x00,
+0x80, 0x4a, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf1, 0x2a, 0x54, 0x70,
+0x80, 0x10, 0xcf, 0x05, 0x58, 0x10, 0x80, 0x10, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x11,
+0x44, 0x00, 0x00, 0xf4, 0xdd, 0x26, 0x84, 0x21, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x21,
+0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0xbc, 0xdd, 0x26,
+0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x28, 0xdd, 0x2f, 0x84, 0xe0, 0x44, 0x10,
+0x00, 0xbc, 0x84, 0x00, 0x80, 0x49, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f,
+0xf0, 0x2b, 0x9d, 0xf9, 0x54, 0x10, 0x00, 0x80, 0xc1, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdf, 0xf0,
+0xf1, 0x2a, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x26, 0x84, 0x21,
+0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x84, 0x21,
+0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xff, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0xbc, 0x84, 0x00, 0x80, 0x48, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4,
+0xdd, 0x2f, 0xf1, 0x1d, 0x5c, 0xf0, 0x80, 0xb4, 0xe8, 0x08, 0x51, 0xce, 0x00, 0x01, 0x5e, 0xfe,
+0x00, 0x13, 0xe9, 0x8a, 0x48, 0x00, 0x00, 0x89, 0x5c, 0xf0, 0x80, 0xf6, 0xe9, 0x07, 0x51, 0xce,
+0x7f, 0xff, 0x4f, 0xc4, 0xff, 0x82, 0x48, 0x00, 0x00, 0x80, 0xb4, 0x9f, 0x84, 0x65, 0x40, 0x22,
+0x0c, 0xb6, 0x87, 0xc4, 0x4c, 0x5f, 0x40, 0x05, 0xf0, 0x01, 0x9c, 0x43, 0xf1, 0x81, 0xb4, 0x5f,
+0x84, 0xa5, 0xd2, 0x72, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x81, 0x10, 0xdd, 0x2f,
+0x84, 0x41, 0x4c, 0x01, 0x00, 0x09, 0x05, 0xef, 0x80, 0x00, 0x40, 0x7f, 0x08, 0x00, 0xb6, 0xff,
+0x48, 0xff, 0xff, 0x63, 0xf0, 0x2a, 0x54, 0x60, 0x00, 0x10, 0xce, 0x09, 0x58, 0x10, 0x00, 0x10,
+0x84, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x07, 0xb8, 0x84, 0x23, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x23, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x2f, 0x44, 0x00, 0x00, 0xbd, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x2f, 0x44, 0x00,
+0x00, 0xbd, 0xdd, 0x26, 0x84, 0x25, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x25, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x2f, 0x44, 0x00, 0x00, 0xbd, 0xdd, 0x26, 0x84, 0x26, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x26, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x2f, 0x44, 0x00,
+0x00, 0xbd, 0xdd, 0x26, 0x84, 0x27, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x27, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x2f, 0x44, 0x00, 0x00, 0xbd, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x1c,
+0x44, 0x00, 0x00, 0xbc, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x44, 0x00,
+0x00, 0xbc, 0x9c, 0x44, 0xdd, 0x26, 0xf1, 0x05, 0x46, 0x00, 0x04, 0x11, 0x14, 0x10, 0x00, 0xca,
+0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0xf1, 0x2a, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x1b, 0xdd, 0x26, 0xf1, 0x04, 0x44, 0x00, 0x00, 0x41, 0xdd, 0x26, 0xf1, 0x03,
+0x44, 0x00, 0x00, 0x42, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x8c, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0xf1, 0x02, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0xf2, 0x29, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x06, 0x6c, 0x84, 0x21, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x28, 0x84, 0x21, 0x84, 0x00, 0xdd, 0x26,
+0xf2, 0x27, 0x84, 0x20, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x26, 0x84, 0x2b, 0x84, 0x04, 0xdd, 0x26,
+0xf2, 0x25, 0x84, 0x2d, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x24, 0x44, 0x10, 0x00, 0x13, 0x84, 0x04,
+0xdd, 0x26, 0xf2, 0x23, 0x44, 0x10, 0x00, 0x15, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x22, 0x44, 0x10,
+0x00, 0x16, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x21, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x20, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x1f, 0x44, 0x10, 0x00, 0x13,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x1e, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0x46, 0x30,
+0x04, 0x11, 0x84, 0x80, 0xa9, 0x19, 0xec, 0xb4, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x54, 0x90,
+0x00, 0xff, 0x54, 0x80, 0x80, 0xff, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0xb0, 0x97, 0xd0,
+0x4b, 0xe0, 0x18, 0x01, 0x80, 0x29, 0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x4e, 0x83,
+0x00, 0x07, 0x44, 0x10, 0x00, 0xb1, 0x44, 0x00, 0x00, 0x9e, 0xd5, 0x05, 0x44, 0x00, 0x00, 0x9e,
+0x44, 0x10, 0x00, 0xb2, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x27, 0x44, 0x00, 0x00, 0x9f, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x54, 0x90,
+0x00, 0xff, 0x54, 0x80, 0x80, 0xff, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0xb0, 0x80, 0xe2,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x30, 0x00, 0xb2,
+0x44, 0x40, 0x00, 0xb1, 0x40, 0x12, 0x24, 0x1a, 0x40, 0x11, 0xa4, 0x1b, 0x44, 0x00, 0x00, 0x9e,
+0xdd, 0x26, 0x80, 0x28, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21,
+0xdd, 0x26, 0x84, 0x00, 0x92, 0x00, 0x84, 0x27, 0x9c, 0x01, 0x4c, 0x00, 0xff, 0xfd, 0x46, 0x60,
+0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x4b, 0xe0, 0x18, 0x01,
+0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x00, 0x00, 0x9f, 0x44, 0x10,
+0x00, 0x9b, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x00, 0x00, 0x9b, 0xf0, 0x81, 0x50, 0x6f, 0x80, 0x04,
+0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x06, 0xf4, 0xd5, 0x11, 0x92, 0x00, 0x84, 0x47, 0x9c, 0x49,
+0x4c, 0x11, 0x7f, 0xfd, 0x9c, 0x01, 0x84, 0xaa, 0xd0, 0x03, 0x84, 0x20, 0xd5, 0xf7, 0x84, 0x00,
+0x44, 0x10, 0x00, 0x9f, 0x80, 0x46, 0x4b, 0xe0, 0x20, 0x01, 0x05, 0xef, 0x80, 0x01, 0x44, 0x30,
+0x00, 0x9b, 0x4d, 0xe1, 0xc0, 0x04, 0x84, 0x00, 0xd5, 0xf1, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x07, 0xb8, 0x44, 0x10, 0x00, 0xba, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x2a,
+0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x40, 0x04, 0x10, 0x58, 0x42, 0x00, 0x7c,
+0xb4, 0x04, 0x40, 0x10, 0x40, 0x09, 0x4e, 0x04, 0x00, 0x05, 0x44, 0x2f, 0x00, 0x00, 0x98, 0x4a,
+0x45, 0xe0, 0x80, 0x00, 0x40, 0x50, 0x78, 0x02, 0x96, 0x01, 0xc5, 0x04, 0x44, 0x3f, 0x00, 0x00,
+0x98, 0x03, 0x42, 0x10, 0x84, 0x24, 0x42, 0x10, 0x00, 0x73, 0xb6, 0x27, 0xec, 0x0c, 0x3a, 0x6f,
+0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x74, 0x96, 0x00, 0xf0, 0x81, 0x4e, 0x03,
+0x02, 0x54, 0x47, 0xc0, 0x04, 0x11, 0x46, 0x80, 0x04, 0x10, 0x46, 0x60, 0x04, 0x10, 0x46, 0xa0,
+0x00, 0xcf, 0x44, 0x51, 0x20, 0x3e, 0x58, 0x84, 0x05, 0x0c, 0x59, 0xce, 0x00, 0x04, 0x58, 0x63,
+0x05, 0x04, 0x58, 0xa5, 0x08, 0x30, 0xb6, 0x1c, 0xb6, 0xa8, 0xb7, 0x46, 0x50, 0x2f, 0x80, 0x7c,
+0xf0, 0x01, 0x84, 0x24, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf2, 0x1f,
+0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x87, 0xb8, 0x54, 0x11, 0x00, 0xe7, 0x84, 0x04, 0x4b, 0xe0,
+0x24, 0x01, 0xf0, 0x01, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x05, 0xb4, 0x50, 0x2f, 0x80, 0x70,
+0x84, 0x21, 0xdd, 0x26, 0xf0, 0x01, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x22, 0xdd, 0x26, 0xf0, 0x01,
+0x50, 0x2f, 0x80, 0x68, 0x44, 0x10, 0x00, 0x23, 0xdd, 0x26, 0xf0, 0x01, 0x50, 0x2f, 0x80, 0x64,
+0x44, 0x10, 0x00, 0x2a, 0xdd, 0x26, 0xf1, 0x01, 0x50, 0x2f, 0x80, 0x60, 0x84, 0x04, 0xdd, 0x26,
+0x50, 0x2f, 0x80, 0x5c, 0x84, 0x22, 0x84, 0x04, 0xdd, 0x26, 0x50, 0x2f, 0x80, 0x58, 0x44, 0x10,
+0x00, 0x22, 0x84, 0x04, 0xdd, 0x26, 0x50, 0x2f, 0x80, 0x54, 0x84, 0x23, 0x84, 0x05, 0xdd, 0x26,
+0x50, 0x2f, 0x80, 0x50, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0x50, 0x2f, 0x80, 0x4c, 0x44, 0x10,
+0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0x50, 0x2f, 0x80, 0x48, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05,
+0xdd, 0x26, 0x50, 0x2f, 0x80, 0x44, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0x50, 0x2f,
+0x80, 0x40, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0xf0, 0x01, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x86, 0x6c, 0x84, 0x21, 0x44, 0x20, 0x00, 0x21, 0xdd, 0x27, 0xf0, 0x01, 0x84, 0x22,
+0x44, 0x20, 0x00, 0x10, 0xdd, 0x27, 0xf0, 0x01, 0x44, 0x10, 0x00, 0x23, 0x80, 0x40, 0xdd, 0x27,
+0xf0, 0x01, 0x44, 0x10, 0x00, 0x2a, 0x44, 0x20, 0x00, 0x1b, 0xdd, 0x27, 0xf1, 0x01, 0x44, 0x20,
+0x00, 0x81, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x22, 0x44, 0x20, 0x00, 0x81, 0x84, 0x04, 0xdd, 0x27,
+0x44, 0x10, 0x00, 0x22, 0x44, 0x20, 0x00, 0xee, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x23, 0x44, 0x20,
+0x00, 0x3f, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x20, 0x00, 0x3f, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x27,
+0x46, 0x00, 0x60, 0x12, 0x58, 0x00, 0x00, 0x3e, 0xb6, 0x08, 0x44, 0x10, 0x00, 0x40, 0x44, 0x00,
+0x00, 0x16, 0x4b, 0xe0, 0x24, 0x01, 0x50, 0x8f, 0x80, 0x80, 0xf1, 0x01, 0x80, 0x48, 0x84, 0x05,
+0xdd, 0x26, 0x04, 0x9f, 0x80, 0x20, 0xf1, 0x01, 0x54, 0x44, 0x80, 0x01, 0xf4, 0xa0, 0x80, 0x44,
+0x84, 0x05, 0xdd, 0x27, 0x80, 0x48, 0x84, 0x21, 0x84, 0x05, 0xdd, 0x26, 0xf1, 0x20, 0x84, 0x05,
+0x58, 0x30, 0x80, 0x04, 0xf3, 0xa0, 0x80, 0x43, 0x84, 0x21, 0xdd, 0x27, 0xd5, 0x0b, 0x84, 0x00,
+0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x84, 0x05, 0x84, 0x21, 0x80, 0x48,
+0xdd, 0x26, 0xf7, 0x20, 0x54, 0x73, 0x80, 0x04, 0xcf, 0xf3, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84,
+0x07, 0xb8, 0x80, 0x27, 0x44, 0x00, 0x00, 0x16, 0x4b, 0xe0, 0x20, 0x01, 0x44, 0x00, 0x00, 0x15,
+0x84, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x67, 0x92, 0x00, 0x84, 0x27, 0x9c, 0xd9, 0x4c, 0x30,
+0xff, 0xfd, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce, 0x07, 0xb8, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15,
+0xdd, 0x3c, 0x80, 0x49, 0x84, 0x20, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x86, 0x6c, 0x84, 0x05,
+0xdd, 0x29, 0x46, 0x10, 0x04, 0x11, 0x44, 0x30, 0x00, 0x10, 0x58, 0x10, 0x80, 0x04, 0xb6, 0x61,
+0x44, 0x20, 0x00, 0x80, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x12,
+0x44, 0x20, 0x00, 0xd7, 0x84, 0x05, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0xa2,
+0x84, 0x05, 0xdd, 0x29, 0x44, 0x20, 0x00, 0x20, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x29,
+0x44, 0x10, 0x00, 0xaa, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x3c, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0xab, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x3c, 0x84, 0x2a, 0x44, 0x00,
+0x00, 0x9f, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0xac, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x3c, 0x44, 0x10,
+0x00, 0x3f, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0xad, 0x44, 0x00, 0x00, 0x9e,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0x3f, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x40,
+0x44, 0x00, 0x00, 0xf4, 0xdd, 0x3c, 0x50, 0x2f, 0x80, 0x7c, 0x44, 0x10, 0x00, 0x1f, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0x04, 0x8f, 0x80, 0x1f, 0x44, 0x00,
+0x00, 0x1f, 0x58, 0x74, 0x00, 0x60, 0xf7, 0x9f, 0x80, 0x27, 0xdd, 0x3c, 0x84, 0x25, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x3c, 0x44, 0x00, 0x00, 0x9f, 0x84, 0x20, 0xdd, 0x3c, 0x46, 0x60, 0x00, 0x09,
+0x58, 0x63, 0x04, 0x14, 0x46, 0x50, 0x00, 0x09, 0x58, 0x52, 0x84, 0x18, 0x46, 0x00, 0x00, 0x09,
+0x58, 0x00, 0x04, 0x10, 0xb5, 0x45, 0xb4, 0x46, 0xb5, 0x20, 0x46, 0x40, 0x00, 0x0c, 0x58, 0x42,
+0x02, 0x20, 0x84, 0x60, 0x14, 0xaf, 0x80, 0x09, 0xf2, 0x8a, 0x14, 0x9f, 0x80, 0x0b, 0xf4, 0x85,
+0xf3, 0x82, 0x05, 0xcf, 0x80, 0x09, 0xf5, 0x02, 0x15, 0xcf, 0x80, 0x0f, 0x50, 0xaf, 0x80, 0x3c,
+0x38, 0x65, 0x14, 0x00, 0xf4, 0x0a, 0xf3, 0x0b, 0x40, 0x03, 0x64, 0x08, 0x44, 0x21, 0x20, 0x3e,
+0x46, 0x90, 0x04, 0x10, 0x40, 0x10, 0x08, 0x04, 0x58, 0x94, 0x85, 0x0c, 0xf4, 0x8e, 0xf3, 0x8d,
+0xb6, 0x29, 0x50, 0x8f, 0x80, 0x38, 0x05, 0xef, 0x80, 0x02, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce,
+0x06, 0x6c, 0x38, 0x74, 0x78, 0x00, 0x84, 0x23, 0x80, 0x47, 0x84, 0x05, 0xdd, 0x3c, 0x80, 0x47,
+0x84, 0x24, 0x84, 0x05, 0xdd, 0x3c, 0xf5, 0x02, 0x50, 0xaf, 0x80, 0x34, 0x38, 0x15, 0x14, 0x00,
+0x44, 0x00, 0x00, 0x17, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x84, 0xc0,
+0x50, 0x2f, 0x80, 0x84, 0x44, 0x00, 0x00, 0x20, 0x84, 0x85, 0x85, 0x20, 0xaf, 0x91, 0xaf, 0x90,
+0xf0, 0x84, 0xf4, 0x86, 0x50, 0x5f, 0x80, 0x74, 0xd5, 0x68, 0x81, 0x49, 0xf1, 0x03, 0xf7, 0x04,
+0xa7, 0x88, 0x45, 0xe0, 0x00, 0x20, 0x40, 0x83, 0x1c, 0x01, 0x54, 0x74, 0x00, 0x3f, 0x80, 0x1c,
+0x80, 0x27, 0x50, 0x2f, 0x80, 0x78, 0x4c, 0x6f, 0x40, 0x06, 0x14, 0x9f, 0x80, 0x1e, 0x80, 0xe6,
+0xd5, 0x08, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x88, 0xa0, 0xdd, 0x2f, 0xb4, 0xbf,
+0xf4, 0x07, 0x80, 0x45, 0x40, 0x92, 0x18, 0x00, 0x54, 0x84, 0x80, 0x3f, 0x80, 0x1c, 0x80, 0x28,
+0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x88, 0xa0, 0xdd, 0x2f, 0x04, 0x9f, 0x80, 0x1e,
+0xf4, 0x1d, 0x40, 0x04, 0xa8, 0x06, 0xf1, 0x08, 0x56, 0x50, 0x00, 0x01, 0x40, 0x22, 0x84, 0x02,
+0x40, 0x35, 0x10, 0x06, 0x40, 0x01, 0x0c, 0x02, 0xb4, 0xbf, 0xc0, 0x07, 0x05, 0xef, 0x80, 0x03,
+0x81, 0x2a, 0x10, 0x6f, 0x00, 0x00, 0xd5, 0x0a, 0xe3, 0x24, 0xe8, 0x04, 0xf6, 0x03, 0xaf, 0xf0,
+0xd5, 0x05, 0xf7, 0x03, 0x81, 0x24, 0x10, 0x83, 0x80, 0x00, 0xf3, 0x03, 0x80, 0x3c, 0x08, 0x21,
+0x80, 0x01, 0x84, 0x00, 0x51, 0xce, 0x00, 0x01, 0x85, 0x02, 0xb6, 0xbf, 0xf3, 0x83, 0x46, 0xf0,
+0x00, 0x07, 0x58, 0xf7, 0x88, 0x40, 0xdd, 0x2f, 0xb4, 0xbf, 0x4d, 0xc4, 0x7f, 0xa8, 0xf4, 0x06,
+0x84, 0x5f, 0x9e, 0x21, 0x96, 0x42, 0xf1, 0x86, 0x4c, 0x11, 0x00, 0x1c, 0x05, 0xcf, 0x80, 0x04,
+0x40, 0xae, 0x04, 0x09, 0x14, 0xaf, 0x80, 0x04, 0xf2, 0x06, 0x87, 0x80, 0xf6, 0x04, 0x56, 0x71,
+0x00, 0x05, 0x84, 0x20, 0x83, 0xdc, 0x40, 0x30, 0x9c, 0x06, 0x50, 0x8f, 0x80, 0x84, 0x41, 0xe3,
+0x1c, 0x1b, 0xf3, 0x88, 0x14, 0x8f, 0x80, 0x03, 0x81, 0x49, 0x15, 0xef, 0x80, 0x07, 0xd5, 0x87,
+0xf4, 0x05, 0x04, 0x8f, 0x80, 0x02, 0x50, 0x6f, 0x80, 0x84, 0xa7, 0xf1, 0x01, 0xe3, 0x00, 0x00,
+0x50, 0x54, 0x00, 0x01, 0x9c, 0x22, 0x85, 0x24, 0xf5, 0x82, 0xaf, 0xe1, 0x11, 0xe2, 0x00, 0x00,
+0xf0, 0x85, 0x4c, 0x54, 0xff, 0x30, 0x46, 0x90, 0x00, 0x0c, 0x58, 0x94, 0x82, 0x20, 0x85, 0x00,
+0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x87, 0xb8, 0x44, 0x10, 0x00, 0xb0, 0x44, 0x00, 0x00, 0x9e,
+0xdd, 0x27, 0x80, 0x28, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0x44, 0x10, 0x00, 0xb1, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x27, 0x00, 0x14, 0x80, 0x00, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0x44, 0x10,
+0x00, 0xb2, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x27, 0x00, 0x14, 0x80, 0x01, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x27, 0x8d, 0x01, 0x84, 0x64, 0x8d, 0x22, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8,
+0x4c, 0x81, 0xff, 0xdc, 0xf1, 0x01, 0x4e, 0x13, 0x00, 0x85, 0x46, 0x50, 0x04, 0x11, 0x58, 0x52,
+0x80, 0x04, 0xb6, 0x25, 0x44, 0x00, 0x00, 0xf4, 0xf1, 0x01, 0xdd, 0x26, 0xf0, 0x01, 0x50, 0x2f,
+0x80, 0x7c, 0x44, 0x10, 0x00, 0x1f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f,
+0xf1, 0x1f, 0x44, 0x00, 0x00, 0x1f, 0x54, 0x20, 0x80, 0x9f, 0xf2, 0x9f, 0x80, 0x22, 0xdd, 0x26,
+0x84, 0x28, 0x44, 0x00, 0x00, 0x1f, 0xdd, 0x26, 0xf1, 0x01, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0xf1, 0x01, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x26,
+0xf0, 0x01, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x15, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0x46, 0x60, 0x04, 0x10,
+0x46, 0x00, 0x04, 0x10, 0x84, 0xe0, 0x58, 0x63, 0x05, 0x04, 0x58, 0x00, 0x05, 0x0c, 0xb6, 0xe6,
+0xb6, 0xe0, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0xf2, 0x1c, 0x84, 0x21, 0x80, 0x07,
+0xdd, 0x26, 0xf2, 0x1b, 0x84, 0x22, 0x80, 0x07, 0xdd, 0x26, 0xf2, 0x1a, 0x44, 0x10, 0x00, 0x23,
+0x80, 0x07, 0xdd, 0x26, 0xf2, 0x19, 0x44, 0x10, 0x00, 0x2a, 0x80, 0x07, 0xdd, 0x26, 0xf2, 0x18,
+0x80, 0x27, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x17, 0x84, 0x22, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x16,
+0x44, 0x10, 0x00, 0x22, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x15, 0x84, 0x23, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x14, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x13, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x12, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x11, 0x44, 0x10,
+0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x10, 0x84, 0x05, 0x44, 0x10, 0x00, 0x14, 0xdd, 0x26,
+0xec, 0x8c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc, 0xef, 0xf8, 0x84, 0x21,
+0x80, 0xe0, 0x44, 0x00, 0x00, 0x15, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f,
+0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0x07, 0x9c, 0x91, 0x4c, 0x20, 0x7f, 0xfd, 0x9c, 0x49,
+0x84, 0x6a, 0x4c, 0x11, 0x80, 0x04, 0x84, 0x40, 0xd5, 0xf6, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x07, 0xb8, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x9b, 0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0,
+0x18, 0x01, 0x44, 0x10, 0x00, 0x9b, 0xf1, 0x81, 0x50, 0x6f, 0x80, 0x04, 0x46, 0x80, 0x00, 0x05,
+0x58, 0x84, 0x06, 0xf4, 0xd5, 0x12, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x91, 0x4c, 0x22, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0x4a, 0x4c, 0x11, 0x00, 0x04, 0x84, 0x40, 0xd5, 0xf6, 0x84, 0x00, 0x44, 0x10,
+0x00, 0x9f, 0x80, 0x46, 0x4b, 0xe0, 0x20, 0x01, 0xf5, 0x01, 0x45, 0xe0, 0x00, 0x9b, 0x4c, 0x5f,
+0x40, 0x04, 0x84, 0x20, 0xd5, 0xf2, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x44, 0x10,
+0x00, 0xba, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x14, 0x44, 0x00,
+0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x00, 0x7c, 0xb4, 0x20,
+0x40, 0x20, 0xc0, 0x09, 0x4e, 0x14, 0x00, 0x05, 0x44, 0x3f, 0x00, 0x00, 0x98, 0x93, 0x44, 0x50,
+0x80, 0x00, 0x40, 0x40, 0x94, 0x02, 0x96, 0x49, 0xc4, 0x04, 0x45, 0xef, 0x00, 0x00, 0x88, 0x3e,
+0x42, 0x21, 0x08, 0x24, 0x42, 0x20, 0x84, 0x73, 0xb6, 0x47, 0xec, 0x08, 0x3a, 0x6f, 0xa0, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x94, 0x96, 0x00, 0xf0, 0x82, 0x4e, 0x03,
+0x02, 0x22, 0x46, 0x30, 0x04, 0x11, 0x46, 0x80, 0x04, 0x10, 0x80, 0x28, 0x46, 0x60, 0x00, 0xcf,
+0x58, 0x63, 0x08, 0x30, 0x45, 0xc0, 0x00, 0x10, 0x44, 0x91, 0x20, 0x3e, 0xa8, 0x19, 0x15, 0xc1,
+0x80, 0x01, 0x14, 0x94, 0x01, 0x43, 0x14, 0x60, 0x81, 0x41, 0x51, 0xef, 0x80, 0x64, 0x15, 0xef,
+0x80, 0x01, 0xf0, 0x02, 0x80, 0x5e, 0x46, 0xa0, 0x00, 0x05, 0x58, 0xa5, 0x06, 0xf4, 0x84, 0x24,
+0x4b, 0xe0, 0x28, 0x01, 0xf5, 0x19, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x54, 0x12,
+0x80, 0xe7, 0x84, 0x04, 0xdd, 0x26, 0xf0, 0x02, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x85, 0xb4,
+0x84, 0x21, 0x50, 0x2f, 0x80, 0x60, 0xdd, 0x27, 0xf0, 0x02, 0x84, 0x22, 0x50, 0x2f, 0x80, 0x5c,
+0xdd, 0x27, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x23, 0x50, 0x2f, 0x80, 0x58, 0xdd, 0x27, 0xf0, 0x02,
+0x44, 0x10, 0x00, 0x2a, 0x50, 0x2f, 0x80, 0x54, 0xdd, 0x27, 0xf1, 0x02, 0x50, 0x2f, 0x80, 0x50,
+0x84, 0x04, 0xdd, 0x27, 0x84, 0x22, 0x50, 0x2f, 0x80, 0x4c, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10,
+0x00, 0x22, 0x50, 0x2f, 0x80, 0x48, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x44,
+0x84, 0x05, 0xdd, 0x27, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x40, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10,
+0x00, 0x11, 0x50, 0x2f, 0x80, 0x3c, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f,
+0x80, 0x38, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x34, 0x84, 0x05,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x30, 0x84, 0x05, 0xdd, 0x27, 0xf0, 0x02,
+0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x86, 0x6c, 0x84, 0x21, 0x44, 0x20, 0x00, 0x21, 0xdd, 0x27,
+0xf0, 0x02, 0x80, 0x5c, 0x84, 0x22, 0xdd, 0x27, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x23, 0x80, 0x40,
+0xdd, 0x27, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x2a, 0x44, 0x20, 0x00, 0x1b, 0xdd, 0x27, 0xf1, 0x02,
+0x44, 0x20, 0x00, 0x81, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x22, 0x44, 0x20, 0x00, 0x81, 0x84, 0x04,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x22, 0x44, 0x20, 0x00, 0xee, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x23,
+0x44, 0x20, 0x00, 0x2d, 0x84, 0x05, 0xdd, 0x27, 0x84, 0x24, 0x44, 0x20, 0x00, 0x2d, 0x84, 0x05,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10,
+0x00, 0x12, 0x44, 0x20, 0x00, 0xd7, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20,
+0x00, 0xa2, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x20, 0x00, 0x20, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0xaa, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0xf1, 0x02, 0x44, 0x00,
+0x00, 0x9f, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xab, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x84, 0x2a,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xac, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x3f, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xad, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x3f, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x40, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x26, 0xf2, 0x01, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x1f,
+0x4b, 0xe0, 0x28, 0x01, 0xf2, 0x19, 0x44, 0x00, 0x00, 0x1f, 0x58, 0x31, 0x00, 0x60, 0xf3, 0x99,
+0x80, 0x23, 0xdd, 0x26, 0x14, 0x94, 0x01, 0x43, 0x84, 0x23, 0x44, 0x20, 0x00, 0x3e, 0x84, 0x05,
+0xdd, 0x27, 0x44, 0x20, 0x00, 0x3e, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x1f,
+0x44, 0x00, 0x00, 0x17, 0xdd, 0x26, 0x84, 0x25, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x84, 0x24,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x84, 0x23, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x60, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x04, 0xaf, 0x80, 0x02, 0x84, 0x05, 0x44, 0x10,
+0x00, 0x20, 0x14, 0xaf, 0x80, 0x05, 0xf0, 0x83, 0xf1, 0x84, 0x50, 0x2f, 0x80, 0x2c, 0x50, 0x5f,
+0x80, 0x28, 0x48, 0x00, 0x00, 0xdb, 0x14, 0xaf, 0x80, 0x06, 0x84, 0x01, 0x4d, 0xc0, 0x00, 0x0b,
+0xf4, 0x03, 0xe4, 0x84, 0x4e, 0xf2, 0x00, 0xba, 0x04, 0x9f, 0x80, 0x09, 0x04, 0xaf, 0x80, 0x05,
+0xd5, 0x03, 0x04, 0x9f, 0x80, 0x08, 0x05, 0xef, 0x80, 0x04, 0x40, 0x75, 0x78, 0x01, 0x96, 0xf8,
+0x4f, 0xc3, 0x00, 0x12, 0x44, 0x10, 0x00, 0x28, 0x44, 0x00, 0x00, 0x9e, 0xf2, 0x81, 0xb6, 0xbf,
+0x54, 0x71, 0x80, 0x0f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xf2, 0x01,
+0xb4, 0xbf, 0xd5, 0x10, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0x29, 0xf2, 0x81, 0xb6, 0xbf,
+0x54, 0x71, 0x80, 0x3f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xb4, 0xbf,
+0xf2, 0x01, 0x80, 0x27, 0x44, 0x00, 0x00, 0x9f, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xf6, 0x01, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7,
+0x8f, 0xe8, 0xdd, 0x2f, 0xf5, 0x04, 0x84, 0x20, 0x40, 0x50, 0xa4, 0x1b, 0x40, 0x22, 0xa8, 0x00,
+0x96, 0xd0, 0xb4, 0xbf, 0xf2, 0x01, 0x4f, 0xc3, 0x00, 0x10, 0x44, 0x10, 0x00, 0x28, 0x44, 0x00,
+0x00, 0x9e, 0x54, 0x61, 0x80, 0x0f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f,
+0xf2, 0x01, 0xb4, 0xbf, 0xd5, 0x10, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0x29, 0xf2, 0x81,
+0xb6, 0xbf, 0x54, 0x61, 0x80, 0x3f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f,
+0xb4, 0xbf, 0xf2, 0x01, 0x80, 0x26, 0x44, 0x00, 0x00, 0x9f, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xb4, 0x1f, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7,
+0x8f, 0xe8, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf, 0x4e, 0x93, 0x00, 0x08, 0xf0, 0x0b, 0xe2, 0x08,
+0xe9, 0x04, 0xf4, 0x0a, 0xe3, 0x04, 0xe9, 0x0a, 0xf3, 0x0b, 0x04, 0x8f, 0x80, 0x0a, 0xe2, 0x68,
+0xe8, 0x04, 0x81, 0x03, 0x81, 0x47, 0xd5, 0x02, 0x81, 0x46, 0x4f, 0xc3, 0x00, 0x10, 0x44, 0x10,
+0x00, 0x28, 0x44, 0x00, 0x00, 0x9e, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x87, 0xb8, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf, 0xd5, 0x0e, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10,
+0x00, 0x29, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f,
+0xb4, 0xbf, 0xf2, 0x01, 0x44, 0x00, 0x00, 0x9f, 0x80, 0x2a, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x87, 0xb8, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf, 0x4f, 0xc3, 0x00, 0x06,
+0x14, 0xaf, 0x80, 0x05, 0x04, 0xaf, 0x80, 0x06, 0x51, 0xce, 0x00, 0x01, 0x55, 0xce, 0x00, 0xff,
+0x84, 0xe2, 0x4d, 0xc3, 0xff, 0x3a, 0x05, 0xef, 0x80, 0x03, 0x14, 0x8f, 0x80, 0x07, 0x4f, 0xe7,
+0x00, 0x06, 0xf6, 0x04, 0x40, 0x13, 0x04, 0x09, 0xf1, 0x84, 0xf7, 0x03, 0x84, 0x7e, 0x9f, 0x39,
+0x96, 0x22, 0xf0, 0x83, 0x4c, 0x01, 0x80, 0x16, 0xf6, 0x03, 0x14, 0xaf, 0x80, 0x06, 0x57, 0xc3,
+0x00, 0x03, 0x56, 0x13, 0x00, 0x05, 0x5c, 0x8e, 0x00, 0x01, 0x5d, 0xe0, 0x80, 0x01, 0x14, 0x8f,
+0x80, 0x09, 0x15, 0xef, 0x80, 0x08, 0x87, 0x80, 0x04, 0x8f, 0x80, 0x07, 0x48, 0xff, 0xff, 0x17,
+0xf5, 0x05, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x57, 0x82, 0x1c, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0xa7,
+0x82, 0x1d, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x07, 0xb8, 0x44, 0x10, 0x00, 0x28, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x26, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x37, 0x82, 0x1c, 0x44, 0x00, 0x00, 0x9f,
+0x54, 0x11, 0x80, 0x0f, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x29, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0x46, 0xf0, 0x00, 0x0c, 0x00, 0x77, 0x82, 0x1d, 0x44, 0x00, 0x00, 0x9f, 0x54, 0x13, 0x80, 0x3f,
+0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x26, 0x46, 0x20, 0x04, 0x11, 0x84, 0xe0, 0xa9, 0xd1, 0x80, 0x27, 0x44, 0x00, 0x00, 0xf4,
+0xdd, 0x26, 0x50, 0x2f, 0x80, 0x64, 0x44, 0x10, 0x00, 0x1f, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x86, 0xf4, 0xdd, 0x2f, 0xf1, 0x19, 0x44, 0x00, 0x00, 0x1f, 0x54, 0x40, 0x80, 0x9f,
+0xf4, 0x99, 0x80, 0x24, 0xdd, 0x26, 0x84, 0x21, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x84, 0x01,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x85, 0x28, 0xdd, 0x2f, 0x80, 0x27, 0x44, 0x00, 0x00, 0x15,
+0xdd, 0x26, 0xf3, 0x02, 0xcb, 0x48, 0x05, 0xef, 0x80, 0x02, 0x46, 0x40, 0x04, 0x10, 0x80, 0xc4,
+0x15, 0xe2, 0x01, 0x41, 0x15, 0xe3, 0x01, 0x43, 0x84, 0x21, 0xf2, 0x18, 0xf0, 0x02, 0x46, 0x60,
+0x00, 0x05, 0x58, 0x63, 0x06, 0x6c, 0xdd, 0x26, 0xf2, 0x17, 0xf0, 0x02, 0x84, 0x22, 0xdd, 0x26,
+0xf2, 0x16, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x23, 0xdd, 0x26, 0xf2, 0x15, 0xf0, 0x02, 0x44, 0x10,
+0x00, 0x2a, 0xdd, 0x26, 0xf2, 0x14, 0xf1, 0x02, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x13, 0x84, 0x22,
+0x84, 0x04, 0xdd, 0x26, 0xf2, 0x12, 0x44, 0x10, 0x00, 0x22, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x11,
+0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x10, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0f,
+0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0e, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x0d, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0c, 0x84, 0x05,
+0x94, 0x42, 0xdd, 0x26, 0xec, 0x6c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x96, 0x49, 0xe6, 0x24, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x51, 0xb4, 0x20, 0x84, 0xa4,
+0xd1, 0x22, 0xe4, 0x25, 0xe8, 0x09, 0x84, 0xa2, 0xd1, 0x15, 0xe4, 0x23, 0xe8, 0x16, 0x84, 0x01,
+0x4c, 0x10, 0x40, 0x45, 0xd5, 0x09, 0x84, 0x46, 0x4c, 0x11, 0x00, 0x2a, 0xe0, 0x22, 0xe9, 0x1e,
+0x84, 0xa7, 0xd1, 0x37, 0xd5, 0x3b, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x8a, 0xf0, 0xdd, 0x2f,
+0xd5, 0x35, 0x9d, 0x44, 0xb4, 0x05, 0xd5, 0x32, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x88, 0x10,
+0xdd, 0x2f, 0xd5, 0x2c, 0x9c, 0x44, 0x05, 0xe0, 0x80, 0x00, 0x54, 0x0f, 0x00, 0x01, 0x46, 0xf0,
+0x00, 0x07, 0x58, 0xf7, 0x89, 0xc4, 0xdd, 0x2f, 0xd5, 0x21, 0x9c, 0xc4, 0xb4, 0x43, 0x96, 0x14,
+0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x80, 0xe4, 0xdd, 0x2f, 0xd5, 0x18, 0x9c, 0x04, 0x05, 0xe0,
+0x00, 0x00, 0xb4, 0x20, 0xb4, 0x80, 0x40, 0x50, 0xa0, 0x09, 0x54, 0x0f, 0x00, 0xff, 0x96, 0x68,
+0x42, 0x22, 0x40, 0x0b, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8f, 0x0c, 0xdd, 0x2f, 0xd5, 0x06,
+0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x81, 0xb8, 0xdd, 0x2f, 0x84, 0x00, 0xec, 0x04, 0x3b, 0xff,
+0xfc, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0x3c, 0x46, 0x30, 0x04, 0x00, 0x58, 0x31, 0x80, 0x64,
+0x46, 0x00, 0x04, 0x00, 0xb4, 0x83, 0x58, 0x00, 0x00, 0x38, 0x46, 0x51, 0x00, 0x00, 0xb4, 0x60,
+0x44, 0x6f, 0xe0, 0x00, 0x40, 0x02, 0x14, 0x02, 0x96, 0x48, 0x40, 0x31, 0x98, 0x02, 0xc0, 0x04,
+0x58, 0x31, 0x80, 0x39, 0xd5, 0x03, 0x58, 0x31, 0x80, 0x19, 0x46, 0x50, 0x04, 0x00, 0x58, 0x52,
+0x80, 0x38, 0xb6, 0x65, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x08, 0xb4, 0xa0, 0xb4, 0x80,
+0x44, 0x6f, 0xef, 0xff, 0x40, 0x42, 0x18, 0x02, 0xb6, 0x80, 0x46, 0x30, 0x04, 0x00, 0x58, 0x31,
+0x80, 0x80, 0xb4, 0x83, 0x84, 0xdc, 0x40, 0x42, 0x18, 0x02, 0xb6, 0x83, 0x46, 0x00, 0x04, 0x00,
+0x58, 0x00, 0x02, 0x14, 0xb4, 0xc0, 0x46, 0x30, 0x04, 0x00, 0x42, 0x43, 0x3c, 0x08, 0xb6, 0x80,
+0x58, 0x31, 0x82, 0x58, 0xb4, 0x83, 0x46, 0x6f, 0x0f, 0xff, 0x58, 0x63, 0x0f, 0xff, 0x40, 0x42,
+0x18, 0x02, 0x46, 0x60, 0xa0, 0x00, 0x40, 0x42, 0x18, 0x04, 0x46, 0x00, 0x04, 0x00, 0xb6, 0x83,
+0x58, 0x00, 0x00, 0x88, 0xb4, 0x60, 0xc2, 0x09, 0x46, 0x4f, 0xf0, 0x00, 0x40, 0x61, 0x90, 0x02,
+0x99, 0x16, 0x42, 0x32, 0x7c, 0x08, 0xb6, 0x60, 0x46, 0x40, 0x04, 0x00, 0x58, 0x42, 0x00, 0x3c,
+0xb4, 0x04, 0x46, 0x6f, 0x00, 0x00, 0x84, 0x63, 0x40, 0x00, 0x18, 0x02, 0x4c, 0x11, 0x80, 0x15,
+0xe6, 0x24, 0xe8, 0x05, 0x84, 0x62, 0x4c, 0x11, 0xc0, 0x18, 0xd5, 0x12, 0x84, 0xc4, 0x4c, 0x13,
+0x00, 0x08, 0x84, 0x85, 0x4c, 0x12, 0x40, 0x11, 0x44, 0x60, 0xff, 0x01, 0xd5, 0x0f, 0x44, 0x10,
+0xef, 0x01, 0x98, 0x01, 0xd5, 0x0c, 0x44, 0x30, 0xe3, 0x01, 0x98, 0x03, 0xd5, 0x08, 0x44, 0x60,
+0xc0, 0x01, 0x98, 0x06, 0xd5, 0x04, 0x44, 0x60, 0x80, 0x01, 0x98, 0x06, 0x46, 0x10, 0x04, 0x00,
+0x58, 0x10, 0x80, 0x3c, 0xb6, 0x01, 0x46, 0x60, 0x04, 0x00, 0x58, 0x63, 0x02, 0x14, 0xb4, 0x06,
+0x44, 0x4f, 0xef, 0xff, 0x40, 0x30, 0x10, 0x02, 0x46, 0x10, 0x00, 0x0c, 0x58, 0x10, 0x82, 0x44,
+0x84, 0x00, 0xb6, 0x66, 0xae, 0x08, 0x64, 0x00, 0x00, 0x20, 0xa7, 0x88, 0xce, 0x02, 0xd5, 0xfc,
+0x44, 0x40, 0x03, 0xe8, 0x40, 0x21, 0x10, 0x17, 0x46, 0x30, 0x04, 0x00, 0x58, 0x31, 0x80, 0x3c,
+0xb4, 0x23, 0x44, 0x6f, 0xff, 0xbf, 0x40, 0x00, 0x98, 0x02, 0xb6, 0x03, 0x46, 0x40, 0x00, 0x0c,
+0x58, 0x42, 0x01, 0x70, 0xb4, 0xc4, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x14, 0x46, 0x00,
+0x04, 0x00, 0x58, 0x00, 0x00, 0x80, 0x46, 0x30, 0x04, 0x00, 0x58, 0x31, 0x82, 0x08, 0x98, 0x96,
+0xb6, 0x44, 0xb4, 0x81, 0x58, 0x22, 0x10, 0x00, 0xb6, 0x41, 0xb4, 0x80, 0x58, 0x22, 0x00, 0x03,
+0xb6, 0x40, 0xb6, 0xa3, 0x3a, 0x6f, 0x98, 0x04, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x96, 0x00, 0x96, 0x48, 0xc2, 0x0d, 0x46, 0xf0, 0x00, 0x0c, 0x14, 0x27, 0x80, 0x92,
+0x46, 0xf0, 0x00, 0x0c, 0x10, 0x07, 0x82, 0x47, 0x46, 0xf0, 0x00, 0x0c, 0x10, 0x17, 0x82, 0x46,
+0x46, 0xf0, 0x00, 0x0c, 0x00, 0x07, 0x82, 0x47, 0x46, 0xf0, 0x00, 0x0c, 0x00, 0x17, 0x82, 0x46,
+0x46, 0xf0, 0x00, 0x0c, 0x04, 0x27, 0x80, 0x92, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x87, 0x24,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x96, 0x49, 0xe6, 0x28, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x1f, 0x80, 0x60, 0xa2, 0x19,
+0x44, 0x20, 0x00, 0x33, 0xb4, 0x23, 0x4c, 0x01, 0x40, 0x0f, 0x84, 0x81, 0x46, 0xf0, 0x00, 0x0c,
+0x10, 0x47, 0x82, 0x45, 0x96, 0x48, 0x84, 0x40, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x88, 0xbc,
+0xdd, 0x2f, 0xd5, 0x0a, 0x44, 0x50, 0x00, 0x34, 0xd0, 0x02, 0xd5, 0x06, 0x84, 0x20, 0x46, 0xf0,
+0x00, 0x0c, 0x10, 0x17, 0x82, 0x45, 0x84, 0x00, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xf4, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63, 0x02, 0x84, 0x50, 0x0f,
+0x80, 0x04, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f, 0x04, 0x73, 0x00, 0x2d,
+0xf0, 0x01, 0x97, 0xfc, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c, 0xdd, 0x2f, 0xc7, 0x07,
+0x80, 0x06, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8e, 0x6c, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f,
+0x9c, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x46, 0x60, 0x00, 0x0c, 0x58, 0x63,
+0x02, 0x84, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0xf8, 0xdd, 0x2f,
+0x04, 0x33, 0x00, 0x2d, 0x84, 0x40, 0xb6, 0x7f, 0x14, 0x23, 0x00, 0x2d, 0xf0, 0x01, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x80, 0x0c, 0xdd, 0x2f, 0xb4, 0x3f, 0x96, 0x0c, 0xc0, 0x07, 0x80, 0x06,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8e, 0x6c, 0xdd, 0x2f, 0xb4, 0xbf, 0x54, 0x42, 0x80, 0x02,
+0xc4, 0x0a, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x84, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x8d, 0xe8, 0xdd, 0x2f, 0xb4, 0x1f, 0x41, 0xe0, 0x3c, 0x08, 0x41, 0xef, 0x7c, 0x09, 0x4f, 0xe2,
+0x00, 0x0b, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x84, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x8f, 0xc4, 0xdd, 0x2f, 0xb4, 0x7f, 0x40, 0x21, 0xb8, 0x08, 0x92, 0x5f, 0xc2, 0x0a, 0x46, 0x00,
+0x00, 0x0c, 0x58, 0x00, 0x02, 0x84, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8e, 0xe0, 0xdd, 0x2f,
+0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0x44, 0x00,
+0x02, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x80, 0x60, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x09,
+0x00, 0x07, 0x85, 0x83, 0x84, 0xa1, 0xd8, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x84, 0x68,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0c, 0x20, 0x37, 0x82, 0x45, 0x84, 0x81, 0x4c, 0x32, 0x40, 0x0a,
+0x84, 0x00, 0x80, 0x20, 0x80, 0x40, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x88, 0xbc, 0xdd, 0x2f,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0x2c, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7,
+0x89, 0xa4, 0xdd, 0x2f, 0x46, 0xa0, 0x00, 0x00, 0x58, 0xa5, 0x02, 0x78, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x83, 0xf0, 0xdd, 0x2f, 0x46, 0x90, 0x00, 0x02, 0x58, 0x94, 0x83, 0x7c, 0x46, 0x70,
+0x00, 0x00, 0x58, 0x73, 0x82, 0xbc, 0x46, 0x80, 0x00, 0x01, 0x58, 0x84, 0x0b, 0xf8, 0xd5, 0x20,
+0x4b, 0xe0, 0x28, 0x01, 0x00, 0x10, 0x00, 0x14, 0x80, 0xc0, 0xc9, 0x0f, 0x80, 0x20, 0x46, 0x00,
+0x00, 0x0c, 0x58, 0x00, 0x02, 0x84, 0x4b, 0xe0, 0x20, 0x01, 0xc8, 0x12, 0x80, 0x26, 0x46, 0x00,
+0x00, 0x0c, 0x58, 0x00, 0x02, 0x74, 0xd5, 0x0a, 0x84, 0xa1, 0xd9, 0x0a, 0x4b, 0xe0, 0x24, 0x01,
+0x80, 0x26, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x02, 0x64, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0xf0,
+0x00, 0x0c, 0x04, 0x17, 0x80, 0xd1, 0x46, 0x00, 0x00, 0x0c, 0x58, 0x00, 0x03, 0x3c, 0xc9, 0xd9,
+0x46, 0x50, 0x00, 0x0c, 0x05, 0xe2, 0x80, 0x93, 0x5e, 0x4f, 0x03, 0xe9, 0x50, 0x3f, 0x00, 0x01,
+0x40, 0x21, 0x90, 0x1b, 0x40, 0x20, 0x90, 0x1a, 0x46, 0xf0, 0x00, 0x0c, 0x04, 0x07, 0x80, 0xce,
+0x14, 0x22, 0x80, 0x93, 0xc8, 0x08, 0x44, 0x00, 0x02, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x80, 0xa4, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x41, 0x00, 0x00, 0xf0, 0x3b, 0x00, 0x00,
+0x5c, 0x37, 0x00, 0x00, 0xfc, 0x3a, 0x00, 0x00, 0x5c, 0x37, 0x00, 0x00, 0xf4, 0x38, 0x00, 0x00,
+0x5c, 0x3f, 0x00, 0x00, 0x5c, 0x37, 0x00, 0x00, 0x18, 0x41, 0x00, 0x00, 0xc0, 0x3a, 0x00, 0x00,
+0xf8, 0x40, 0x00, 0x00, 0xa8, 0x3a, 0x00, 0x00, 0x5c, 0x37, 0x00, 0x00, 0x01, 0x99, 0x99, 0x09,
+0x50, 0x02, 0x46, 0x44, 0x0a, 0x50, 0x03, 0xec, 0xee, 0x0a, 0x50, 0x04, 0x99, 0x99, 0x0b, 0x50,
+0x05, 0x46, 0x44, 0x08, 0x51, 0x06, 0xec, 0xee, 0x08, 0x51, 0x07, 0x99, 0x99, 0x09, 0x51, 0x08,
+0x46, 0x44, 0x0a, 0x51, 0x09, 0xec, 0xee, 0x0a, 0x51, 0x0a, 0x99, 0x99, 0x0b, 0x51, 0x0b, 0x46,
+0x44, 0x08, 0x52, 0x0c, 0xec, 0xee, 0x08, 0x52, 0x0d, 0x99, 0x99, 0x09, 0x52, 0x0e, 0x33, 0x33,
+0x0b, 0x52, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xaa, 0xbb, 0xcc,
+0xdd, 0xee, 0x00, 0x00, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x00, 0x00, 0x10, 0x14, 0x18, 0x1c,
+0x20, 0x30, 0x34, 0x38, 0x3c, 0x40, 0x44, 0x60, 0x64, 0x68, 0x6c, 0x70, 0x74, 0x78, 0x7c, 0x00,
+0x1a, 0x14, 0x10, 0x10, 0x2f, 0x2c, 0x2c, 0x2c, 0x02, 0x06, 0x0a, 0x0c, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0f, 0xac, 0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x03, 0x00,
+0x00, 0xf8, 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x88, 0x8e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+0x86, 0xdd, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x12, 0x01, 0x00, 0x02,
+0x00, 0x00, 0x00, 0x40, 0x8f, 0x14, 0x01, 0x76, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x0a, 0x06,
+0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x05, 0x0f, 0x0c, 0x00, 0x01, 0x07, 0x10, 0x02,
+0x02, 0x00, 0x00, 0x00, 0x09, 0x02, 0x4a, 0x00, 0x01, 0x01, 0x00, 0xa0, 0x50, 0x09, 0x04, 0x00,
+0x00, 0x08, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x84, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x85,
+0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x08, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x04, 0x02, 0x00,
+0x02, 0x00, 0x07, 0x05, 0x05, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x06, 0x02, 0x00, 0x02, 0x00,
+0x07, 0x05, 0x07, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x09, 0x02, 0x00, 0x02, 0x00, 0x09, 0x04,
+0x01, 0x00, 0x05, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x81, 0x03, 0x40, 0x00, 0x00, 0x07, 0x05,
+0x82, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x02, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x83, 0x01,
+0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x01, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x12, 0x03,
+0x4d, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x61, 0x00, 0x54, 0x00, 0x65, 0x00, 0x6b, 0x00,
+0x1c, 0x03, 0x38, 0x00, 0x30, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x31, 0x00, 0x31, 0x00, 0x20, 0x00,
+0x6e, 0x00, 0x20, 0x00, 0x57, 0x00, 0x4c, 0x00, 0x41, 0x00, 0x4e, 0x00, 0x08, 0x03, 0x31, 0x00,
+0x2e, 0x00, 0x30, 0x00, 0x38, 0x4f, 0x00, 0x00, 0x3c, 0x4f, 0x00, 0x00, 0x40, 0x4f, 0x00, 0x00,
+0x44, 0x4f, 0x00, 0x00, 0x48, 0x4f, 0x00, 0x00, 0x4c, 0x4f, 0x00, 0x00, 0x50, 0x4f, 0x00, 0x00,
+0x54, 0x4f, 0x00, 0x00, 0x58, 0x4f, 0x00, 0x00, 0x5c, 0x4f, 0x00, 0x00, 0x60, 0x4f, 0x00, 0x00,
+0x64, 0x4f, 0x00, 0x00, 0x68, 0x4f, 0x00, 0x00, 0x6c, 0x4f, 0x00, 0x00, 0x70, 0x4f, 0x00, 0x00,
+0x74, 0x4f, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0xb1, 0x00, 0x00, 0x00, 0x03, 0x08, 0x12, 0x20, } ;
diff --git a/cleopatre/devkit/mt7601udrv/include/frq_cal.h b/cleopatre/devkit/mt7601udrv/include/frq_cal.h
new file mode 100644
index 0000000000..60316706a3
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/frq_cal.h
@@ -0,0 +1,107 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ eeprom.h
+
+ Abstract:
+ Miniport header file for eeprom related information
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+#ifndef __FRQCAL_H__
+#define __FRQCAL_H__
+
+/* */
+/* The frequency calibration control */
+/* */
+typedef struct _FREQUENCY_CALIBRATION_CONTROL
+{
+ BOOLEAN bEnableFrequencyCalibration; /* Enable the frequency calibration algorithm */
+
+ BOOLEAN bSkipFirstFrequencyCalibration; /* Avoid calibrating frequency at the time the STA is just link-up */
+ BOOLEAN bApproachFrequency; /* Approach the frequency */
+ UCHAR AdaptiveFreqOffset; /* Adaptive frequency offset */
+ CHAR LatestFreqOffsetOverBeacon; /* Latest frequency offset from the beacon */
+ CHAR BeaconPhyMode; /* Latest frequency offset from the beacon */
+
+} FREQUENCY_CALIBRATION_CONTROL, *PFREQUENCY_CALIBRATION_CONTROL;
+
+#define RTMP_FREQ_CAL_DISABLE(__pAd) \
+ __pAd->FreqCalibrationCtrl.bEnableFrequencyCalibration = FALSE;
+
+/* */
+/* Invalid frequency offset */
+/* */
+#define INVALID_FREQUENCY_OFFSET -128
+
+/* */
+/* The upperbound/lowerbound of the frequency offset */
+/* */
+#define UPPERBOUND_OF_FREQUENCY_OFFSET 127
+#define LOWERBOUND_OF_FREQUENCY_OFFSET -127
+
+
+/*#ifdef RT5390 */
+/* */
+/* The trigger point of the high/low frequency */
+/* */
+#define HIGH_FREQUENCY_TRIGGER_POINT_OFDM 20
+#define LOW_FREQUENCY_TRIGGER_POINT_OFDM -20
+#define HIGH_FREQUENCY_TRIGGER_POINT_CCK 4
+#define LOW_FREQUENCY_TRIGGER_POINT_CCK -4
+
+#ifdef MT7601
+#define MT7601_HIGH_FREQUENCY_TRIGGER_POINT_CCK 19
+#define MT7601_LOW_FREQUENCY_TRIGGER_POINT_CCK -19
+#define MT7601_DECREASE_FREQUENCY_OFFSET_CCK 5
+#define MT7601_INCREASE_FREQUENCY_OFFSET_CCK -5
+
+#define MT7601_HIGH_FREQUENCY_TRIGGER_POINT_OFDM20 102
+#define MT7601_LOW_FREQUENCY_TRIGGER_POINT_OFDM20 -102
+#define MT7601_DECREASE_FREQUENCY_OFFSET_OFDM20 32
+#define MT7601_INCREASE_FREQUENCY_OFFSET_OFDM20 -32
+
+#define MT7601_HIGH_FREQUENCY_TRIGGER_POINT_OFDM40 82
+#define MT7601_LOW_FREQUENCY_TRIGGER_POINT_OFDM40 -82
+#define MT7601_DECREASE_FREQUENCY_OFFSET_OFDM40 20
+#define MT7601_INCREASE_FREQUENCY_OFFSET_OFDM40 -20
+#endif /* MT7601 */
+
+/* */
+/* The trigger point of decreasng/increasing the frequency offset */
+/* */
+#define DECREASE_FREQUENCY_OFFSET_OFDM 10
+#define INCREASE_FREQUENCY_OFFSET_OFDM -10
+#define DECREASE_FREQUENCY_OFFSET_CCK 2
+#define INCREASE_FREQUENCY_OFFSET_CCK -2
+/*#endif // RT5390 */
+/* */
+/* The trigger point of decreasng/increasing the frequency offset */
+/* */
+#define DECREASE_FREQUENCY_OFFSET 3
+#define INCREASE_FREQUENCY_OFFSET -3
+
+/* */
+/* Frequency calibration period */
+/* */
+
+#define FREQUENCY_CALIBRATION_PERIOD 100
+
+#endif /* __FRQCAL_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/iface/iface_util.h b/cleopatre/devkit/mt7601udrv/include/iface/iface_util.h
new file mode 100644
index 0000000000..c9b8cb3d9b
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/iface/iface_util.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rtmp_util.h
+
+ Abstract:
+ Common for PCI/USB/RBUS.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_UTIL_H__
+#define __RTMP_UTIL_H__
+
+/* maximum of PCI, USB, or RBUS, int PCI, it is 0 but in USB, it is 11 */
+#define RTMP_PKT_TAIL_PADDING 11 /* 3(max 4 byte padding) + 4 (last packet padding) + 4 (MaxBulkOutsize align padding) */
+
+#ifdef PCI_MSI_SUPPORT
+#define RTMP_MSI_ENABLE(_pAd) \
+ { POS_COOKIE _pObj = (POS_COOKIE)(_pAd->OS_Cookie); \
+ (_pAd)->HaveMsi = pci_enable_msi(_pObj->pci_dev) == 0 ? TRUE : FALSE; \
+ }
+
+#define RTMP_MSI_DISABLE(_pci_dev, _pHaveMsi) \
+ { \
+ if (*(_pHaveMsi) == TRUE) \
+ pci_disable_msi(_pci_dev); \
+ *(_pHaveMsi) = FALSE; \
+ }
+
+#else
+#define RTMP_MSI_ENABLE(_pAd) do{}while(0)
+#define RTMP_MSI_DISABLE(_pci_dev, _pHaveMsi) do{}while(0)
+#endif /* PCI_MSI_SUPPORT */
+
+#define RTMP_PCI_DMA_TODEVICE 0xFF00
+#define RTMP_PCI_DMA_FROMDEVICE 0xFF01
+
+
+
+
+#define UNLINK_TIMEOUT_MS 3
+
+#define USBD_TRANSFER_DIRECTION_OUT 0
+#define USBD_TRANSFER_DIRECTION_IN 0
+#define USBD_SHORT_TRANSFER_OK 0
+#define PURB purbb_t
+
+#define OS_RTUSBMlmeUp RtmpOsMlmeUp
+
+
+
+
+#endif /* __RTMP_UTIL_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/iface/rtmp_reg_pcirbs.h b/cleopatre/devkit/mt7601udrv/include/iface/rtmp_reg_pcirbs.h
new file mode 100644
index 0000000000..e3f0e2925a
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/iface/rtmp_reg_pcirbs.h
@@ -0,0 +1,384 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rtmp_reg_pcirbus.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_REG_PCIRBUS_H__
+#define __RTMP_REG_PCIRBUS_H__
+
+
+// TODO: shiang, for RT3290, make sure following definition is correct to put as here
+
+#define ASIC_VERSION 0x0000
+
+#define CMB_CTRL 0x20
+#ifdef RT_BIG_ENDIAN
+typedef union _CMB_CTRL_STRUC{
+ struct{
+ UINT32 LDO0_EN:1;
+ UINT32 LDO3_EN:1;
+ UINT32 LDO_BGSEL:2;
+ UINT32 LDO_CORE_LEVEL:4;
+ UINT32 PLL_LD:1;
+ UINT32 XTAL_RDY:1;
+ UINT32 Rsv:2;
+ UINT32 LDO25_FRC_ON:1;//4
+ UINT32 LDO25_LARGEA:1;
+ UINT32 LDO25_LEVEL:2;
+ UINT32 AUX_OPT_Bit15_Two_AntennaMode:1;
+ UINT32 AUX_OPT_Bit14_TRSW1_as_GPIO:1;
+ UINT32 AUX_OPT_Bit13_GPIO7_as_GPIO:1;
+ UINT32 AUX_OPT_Bit12_TRSW0_as_WLAN_ANT_SEL:1;
+ UINT32 AUX_OPT_Bit11_Rsv:1;
+ UINT32 AUX_OPT_Bit10_NotSwap_WL_LED_ACT_RDY:1;
+ UINT32 AUX_OPT_Bit9_GPIO3_as_GPIO:1;
+ UINT32 AUX_OPT_Bit8_AuxPower_Exists:1;
+ UINT32 AUX_OPT_Bit7_KeepInterfaceClk:1;
+ UINT32 AUX_OPT_Bit6_KeepXtal_On:1;
+ UINT32 AUX_OPT_Bit5_RemovePCIePhyClk_BTOff:1;
+ UINT32 AUX_OPT_Bit4_RemovePCIePhyClk_WLANOff:1;
+ UINT32 AUX_OPT_Bit3_PLLOn_L1:1;
+ UINT32 AUX_OPT_Bit2_PCIeCoreClkOn_L1:1;
+ UINT32 AUX_OPT_Bit1_PCIePhyClkOn_L1:1;
+ UINT32 AUX_OPT_Bit0_InterfaceClk_40Mhz:1;
+ }field;
+ UINT32 word;
+}CMB_CTRL_STRUC, *PCMB_CTRL_STRUC;
+#else
+typedef union _CMB_CTRL_STRUC{
+ struct{
+ UINT32 AUX_OPT_Bit0_InterfaceClk_40Mhz:1;
+ UINT32 AUX_OPT_Bit1_PCIePhyClkOn_L1:1;
+ UINT32 AUX_OPT_Bit2_PCIeCoreClkOn_L1:1;
+ UINT32 AUX_OPT_Bit3_PLLOn_L1:1;
+ UINT32 AUX_OPT_Bit4_RemovePCIePhyClk_WLANOff:1;
+ UINT32 AUX_OPT_Bit5_RemovePCIePhyClk_BTOff:1;
+ UINT32 AUX_OPT_Bit6_KeepXtal_On:1;
+ UINT32 AUX_OPT_Bit7_KeepInterfaceClk:1;
+ UINT32 AUX_OPT_Bit8_AuxPower_Exists:1;
+ UINT32 AUX_OPT_Bit9_GPIO3_as_GPIO:1;
+ UINT32 AUX_OPT_Bit10_NotSwap_WL_LED_ACT_RDY:1;
+ UINT32 AUX_OPT_Bit11_Rsv:1;
+ UINT32 AUX_OPT_Bit12_TRSW0_as_WLAN_ANT_SEL:1;
+ UINT32 AUX_OPT_Bit13_GPIO7_as_GPIO:1;
+ UINT32 AUX_OPT_Bit14_TRSW1_as_GPIO:1;
+ UINT32 AUX_OPT_Bit15_Two_AntennaMode:1;
+ UINT32 LDO25_LEVEL:2;
+ UINT32 LDO25_LARGEA:1;
+ UINT32 LDO25_FRC_ON:1;//4
+ UINT32 Rsv:2;
+ UINT32 XTAL_RDY:1;
+ UINT32 PLL_LD:1;
+ UINT32 LDO_CORE_LEVEL:4;
+ UINT32 LDO_BGSEL:2;
+ UINT32 LDO3_EN:1;
+ UINT32 LDO0_EN:1;
+ }field;
+ UINT32 word;
+}CMB_CTRL_STRUC, *PCMB_CTRL_STRUC;
+#endif
+
+
+#define OSCCTL 0x38
+#ifdef RT_BIG_ENDIAN
+typedef union _OSCCTL_STRUC{
+ struct{
+ UINT32 ROSC_EN:1;
+ UINT32 CAL_REQ:1;
+ UINT32 CLK_32K_VLD:1;
+ UINT32 CAL_ACK:1;
+ UINT32 CAL_CNT:12;
+ UINT32 Rsv:3;
+ UINT32 REF_CYCLE:13;
+ }field;
+ UINT32 word;
+}OSCCTL_STRUC, *POSCCTL_STRUC;
+#else
+typedef union _OSCCTL_STRUC{
+ struct{
+ UINT32 REF_CYCLE:13;
+ UINT32 Rsv:3;
+ UINT32 CAL_CNT:12;
+ UINT32 CAL_ACK:1;
+ UINT32 CLK_32K_VLD:1;
+ UINT32 CAL_REQ:1;
+ UINT32 ROSC_EN:1;
+ }field;
+ UINT32 word;
+}OSCCTL_STRUC, *POSCCTL_STRUC;
+#endif
+
+
+#define COEXCFG0 0x40
+#ifdef RT_BIG_ENDIAN
+typedef union _COEXCFG0_STRUC{
+ struct{
+ UINT32 COEX_CFG1:8;
+ UINT32 COEX_CFG0:8;
+ UINT32 FIX_WL_RF_LNA:2;
+ UINT32 FIX_BT_H_PA:3;
+ UINT32 FIX_BT_L_PA:3;
+ UINT32 FIX_WL_TX_PWR:2;
+ UINT32 Rsv:3;
+ UINT32 FIX_WL_ANT_EN:1;
+ UINT32 FIX_WL_DI_ANT:1;
+ UINT32 COEX_ENT:1;
+ }field;
+ UINT32 word;
+}COEXCFG0_STRUC, *PCOEXCFG0_STRUC;
+#else
+typedef union _COEXCFG0_STRUC{
+ struct{
+ UINT32 COEX_ENT:1;
+ UINT32 FIX_WL_DI_ANT:1;
+ UINT32 FIX_WL_ANT_EN:1;
+ UINT32 Rsv:3;
+ UINT32 FIX_WL_TX_PWR:2;
+ UINT32 FIX_BT_L_PA:3;
+ UINT32 FIX_BT_H_PA:3;
+ UINT32 FIX_WL_RF_LNA:2;
+
+ UINT32 COEX_CFG0:8;
+ UINT32 COEX_CFG1:8;
+ }field;
+ UINT32 word;
+}COEXCFG0_STRUC, *PCOEXCFG0_STRUC;
+#endif
+
+
+#define COEXCFG1 0x44
+#ifdef RT_BIG_ENDIAN
+typedef union _COEXCFG1_STRUC{
+ struct{
+ UINT32 Rsv:8;
+ UINT32 DIS_WL_RF_DELY:8;
+ UINT32 DIS_WL_PA_DELY:8;
+ UINT32 DIS_WL_TR_DELY:8;
+ }field;
+ UINT32 word;
+}COEXCFG1_STRUC, *PCOEXCFG1_STRUC;
+#else
+typedef union _COEXCFG1_STRUC{
+ struct{
+ UINT32 DIS_WL_TR_DELY:8;
+ UINT32 DIS_WL_PA_DELY:8;
+ UINT32 DIS_WL_RF_DELY:8;
+ UINT32 Rsv:8;
+ }field;
+ UINT32 word;
+}COEXCFG1_STRUC, *PCOEXCFG1_STRUC;
+#endif
+
+
+#define COEXCFG2 0x48
+#ifdef RT_BIG_ENDIAN
+typedef union _COEXCFG2_STRUC{
+ struct{
+ UINT32 BT_COEX_CFG1_Bit31_Rsv:1;
+ UINT32 BT_COEX_CFG1_Bit30_Rsv:1;
+ UINT32 BT_COEX_CFG1_Bit29_HaltHighPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG1_Bit28_HaltHighPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG1_Bit27_HaltHighPriorityTx_wl_busy:1;
+ UINT32 BT_COEX_CFG1_Bit26_HaltLowPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG1_Bit25_HaltLowPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG1_Bit24_HaltLowPriorityTx_wl_busy:1;
+
+ UINT32 BT_COEX_CFG0_Bit23_Rsv:1;
+ UINT32 BT_COEX_CFG0_Bit22_Rsv:1;
+ UINT32 BT_COEX_CFG0_Bit21_HaltHighPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG0_Bit20_HaltHighPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG0_Bit19_HaltHighPriorityTx_wl_busy:1;
+ UINT32 BT_COEX_CFG0_Bit18_HaltLowPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG0_Bit17_HaltLowPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG0_Bit16_HaltLowPriorityTx_wl_busy:1;
+
+ UINT32 WL_COEX_CFG1_Bit15_LowerTxPwr_bt_high_priority:1;
+ UINT32 WL_COEX_CFG1_Bit14_Enable_Tx_free_timer:1;
+ UINT32 WL_COEX_CFG1_Bit13_Disable_TxAgg_bi_high_priority:1;
+ UINT32 WL_COEX_CFG1_Bit12_Disable_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG1_Bit11_HaltTx_bt_tx_req_l:1;
+ UINT32 WL_COEX_CFG1_Bit10_HaltTx_bt_tx_req_h:1;
+ UINT32 WL_COEX_CFG1_Bit9_HaltTx_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG1_Bit8_HaltTx_bt_rx_busy:1;
+
+ UINT32 WL_COEX_CFG0_Bit7_LowerTxPwr_bt_high_priority:1;
+ UINT32 WL_COEX_CFG0_Bit6_Enable_Tx_free_timer:1;
+ UINT32 WL_COEX_CFG0_Bit5_Disable_TxAgg_bi_high_priority:1;
+ UINT32 WL_COEX_CFG0_Bit4_Disable_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG0_Bit3_HaltTx_bt_tx_req_l:1;
+ UINT32 WL_COEX_CFG0_Bit2_HaltTx_bt_tx_req_h:1;
+ UINT32 WL_COEX_CFG0_Bit1_HaltTx_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG0_Bit0_HaltTx_bt_rx_busy:1;
+ }field;
+ UINT32 word;
+}COEXCFG2_STRUC, *PCOEXCFG2_STRUC;
+#else
+typedef union _COEXCFG2_STRUC{
+ struct{
+ UINT32 WL_COEX_CFG0_Bit0_HaltTx_bt_rx_busy:1;
+ UINT32 WL_COEX_CFG0_Bit1_HaltTx_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG0_Bit2_HaltTx_bt_tx_req_h:1;
+ UINT32 WL_COEX_CFG0_Bit3_HaltTx_bt_tx_req_l:1;
+ UINT32 WL_COEX_CFG0_Bit4_Disable_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG0_Bit5_Disable_TxAgg_bi_high_priority:1;
+ UINT32 WL_COEX_CFG0_Bit6_Enable_Tx_free_timer:1;
+ UINT32 WL_COEX_CFG0_Bit7_LowerTxPwr_bt_high_priority:1;
+
+ UINT32 WL_COEX_CFG1_Bit8_HaltTx_bt_rx_busy:1;
+ UINT32 WL_COEX_CFG1_Bit9_HaltTx_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG1_Bit10_HaltTx_bt_tx_req_h:1;
+ UINT32 WL_COEX_CFG1_Bit11_HaltTx_bt_tx_req_l:1;
+ UINT32 WL_COEX_CFG1_Bit12_Disable_bt_rx_req_h:1;
+ UINT32 WL_COEX_CFG1_Bit13_Disable_TxAgg_bi_high_priority:1;
+ UINT32 WL_COEX_CFG1_Bit14_Enable_Tx_free_timer:1;
+ UINT32 WL_COEX_CFG1_Bit15_LowerTxPwr_bt_high_priority:1;
+
+ UINT32 BT_COEX_CFG0_Bit16_HaltLowPriorityTx_wl_busy:1;
+ UINT32 BT_COEX_CFG0_Bit17_HaltLowPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG0_Bit18_HaltLowPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG0_Bit19_HaltHighPriorityTx_wl_busy:1;
+ UINT32 BT_COEX_CFG0_Bit20_HaltHighPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG0_Bit21_HaltHighPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG0_Bit22_Rsv:1;
+ UINT32 BT_COEX_CFG0_Bit23_Rsv:1;
+
+ UINT32 BT_COEX_CFG1_Bit24_HaltLowPriorityTx_wl_busy:1;
+ UINT32 BT_COEX_CFG1_Bit25_HaltLowPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG1_Bit26_HaltLowPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG1_Bit27_HaltHighPriorityTx_wl_busy:1;
+ UINT32 BT_COEX_CFG1_Bit28_HaltHighPriorityTx_wl_rx_busy:1;
+ UINT32 BT_COEX_CFG1_Bit29_HaltHighPriorityTx_wl_bcn_busy:1;
+ UINT32 BT_COEX_CFG1_Bit30_Rsv:1;
+ UINT32 BT_COEX_CFG1_Bit31_Rsv:1;
+ }field;
+ UINT32 word;
+}COEXCFG2_STRUC, *PCOEXCFG2_STRUC;
+#endif
+
+
+#define PLL_CTRL 0x50
+#ifdef RT_BIG_ENDIAN
+typedef union _PLL_CTRL_STRUC {
+ struct {
+ ULONG VBGBK_EN:1;
+ ULONG LOCK_DETECT_WINDOW_CTRL:3;
+ ULONG PFD_DELAY_CTRL:2;
+ ULONG CP_CURRENT_CTRL:2;
+ ULONG LPF_C2_CTRL:2;
+ ULONG LPF_C1_CTRL:2;
+ ULONG LPF_R1:1;
+ ULONG VCO_FIXED_CURRENT_CONTROL:3;
+ ULONG RESERVED_INPUT2:8;
+ ULONG RESERVED_INPUT1:8;
+ } field;
+ ULONG word;
+} PLL_CTRL_STRUC, *PPLL_CTRL_STRUC;
+#else
+typedef union _PLL_CTRL_STRUC {
+ struct {
+ ULONG RESERVED_INPUT1:8;
+ ULONG RESERVED_INPUT2:8;
+ ULONG VCO_FIXED_CURRENT_CONTROL:3;
+ ULONG LPF_R1:1;
+ ULONG LPF_C1_CTRL:2;
+ ULONG LPF_C2_CTRL:2;
+ ULONG CP_CURRENT_CTRL:2;
+ ULONG PFD_DELAY_CTRL:2;
+ ULONG LOCK_DETECT_WINDOW_CTRL:3;
+ ULONG VBGBK_EN:1;
+ } field;
+ ULONG word;
+} PLL_CTRL_STRUC, *PPLL_CTRL_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+
+#define WPDMA_RST_IDX 0x20c
+#ifdef RT_BIG_ENDIAN
+typedef union _WPDMA_RST_IDX_STRUC {
+ struct {
+ UINT32 :14;
+ UINT32 RST_DRX_IDX1:1;
+ UINT32 RST_DRX_IDX0:1;
+ UINT32 rsv:6;
+ UINT32 RST_DTX_IDX9:1;
+ UINT32 RST_DTX_IDX8:1;
+ UINT32 RST_DTX_IDX7:1;
+ UINT32 RST_DTX_IDX6:1;
+ UINT32 RST_DTX_IDX5:1;
+ UINT32 RST_DTX_IDX4:1;
+ UINT32 RST_DTX_IDX3:1;
+ UINT32 RST_DTX_IDX2:1;
+ UINT32 RST_DTX_IDX1:1;
+ UINT32 RST_DTX_IDX0:1;
+ } field;
+ UINT32 word;
+}WPDMA_RST_IDX_STRUC, *PWPDMA_RST_IDX_STRUC;
+#else
+typedef union _WPDMA_RST_IDX_STRUC {
+ struct {
+ UINT32 RST_DTX_IDX0:1;
+ UINT32 RST_DTX_IDX1:1;
+ UINT32 RST_DTX_IDX2:1;
+ UINT32 RST_DTX_IDX3:1;
+ UINT32 RST_DTX_IDX4:1;
+ UINT32 RST_DTX_IDX5:1;
+ UINT32 RST_DTX_IDX6:1;
+ UINT32 RST_DTX_IDX7:1;
+ UINT32 RST_DTX_IDX8:1;
+ UINT32 RST_DTX_IDX9:1;
+ UINT32 rsv:6;
+ UINT32 RST_DRX_IDX0:1;
+ UINT32 RST_DRX_IDX1:1;
+ UINT32 :14;
+ } field;
+ UINT32 word;
+} WPDMA_RST_IDX_STRUC, *PWPDMA_RST_IDX_STRUC;
+#endif
+#define DELAY_INT_CFG 0x0210
+#ifdef RT_BIG_ENDIAN
+typedef union _DELAY_INT_CFG_STRUC {
+ struct {
+ UINT32 TXDLY_INT_EN:1;
+ UINT32 TXMAX_PINT:7;
+ UINT32 TXMAX_PTIME:8;
+ UINT32 RXDLY_INT_EN:1;
+ UINT32 RXMAX_PINT:7;
+ UINT32 RXMAX_PTIME:8;
+ } field;
+ UINT32 word;
+}DELAY_INT_CFG_STRUC, *PDELAY_INT_CFG_STRUC;
+#else
+typedef union _DELAY_INT_CFG_STRUC {
+ struct {
+ UINT32 RXMAX_PTIME:8;
+ UINT32 RXMAX_PINT:7;
+ UINT32 RXDLY_INT_EN:1;
+ UINT32 TXMAX_PTIME:8;
+ UINT32 TXMAX_PINT:7;
+ UINT32 TXDLY_INT_EN:1;
+ } field;
+ UINT32 word;
+} DELAY_INT_CFG_STRUC, *PDELAY_INT_CFG_STRUC;
+#endif
+
+#endif /* __RTMP_REG_PCIRBUS_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/iface/rtmp_usb.h b/cleopatre/devkit/mt7601udrv/include/iface/rtmp_usb.h
new file mode 100644
index 0000000000..80d05fe5cc
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/iface/rtmp_usb.h
@@ -0,0 +1,89 @@
+#ifndef __RTMP_USB_H__
+#define __RTMP_USB_H__
+
+#include "rtusb_io.h"
+
+extern UCHAR EpToQueue[6];
+
+#define RXBULKAGGRE_SIZE 12
+#define MAX_TXBULK_LIMIT (LOCAL_TXBUF_SIZE*(BULKAGGRE_SIZE-1))
+#define MAX_TXBULK_SIZE (LOCAL_TXBUF_SIZE*BULKAGGRE_SIZE)
+#define MAX_RXBULK_SIZE (LOCAL_TXBUF_SIZE*RXBULKAGGRE_SIZE)
+#define MAX_MLME_HANDLER_MEMORY 20
+#define CMD_RSP_BULK_SIZE 1024
+
+/*Power saving */
+#define PowerWakeCID 3
+#define CID0MASK 0x000000ff
+#define CID1MASK 0x0000ff00
+#define CID2MASK 0x00ff0000
+#define CID3MASK 0xff000000
+
+
+/* Flags for Bulkflags control for bulk out data */
+/* */
+#define fRTUSB_BULK_OUT_DATA_NULL 0x00000001
+#define fRTUSB_BULK_OUT_RTS 0x00000002
+#define fRTUSB_BULK_OUT_MLME 0x00000004
+
+#define fRTUSB_BULK_OUT_PSPOLL 0x00000010
+#define fRTUSB_BULK_OUT_DATA_FRAG 0x00000020
+#define fRTUSB_BULK_OUT_DATA_FRAG_2 0x00000040
+#define fRTUSB_BULK_OUT_DATA_FRAG_3 0x00000080
+#define fRTUSB_BULK_OUT_DATA_FRAG_4 0x00000100
+
+#define fRTUSB_BULK_OUT_DATA_NORMAL 0x00010000
+#define fRTUSB_BULK_OUT_DATA_NORMAL_2 0x00020000
+#define fRTUSB_BULK_OUT_DATA_NORMAL_3 0x00040000
+#define fRTUSB_BULK_OUT_DATA_NORMAL_4 0x00080000
+
+
+#define fRTUSB_BULK_OUT_DATA_HCCA 0x00100000
+#define fRTUSB_BULK_OUT_DATA_NULL_HCCA 0x00400000
+#define fRTUSB_BULK_OUT_MLME_HCCA 0x00800000
+
+
+
+/* TODO:move to ./ate/include/iface/ate_usb.h */
+#ifdef RALINK_ATE
+#define fRTUSB_BULK_OUT_DATA_ATE 0x00100000
+#endif /* RALINK_ATE */
+
+
+#define FREE_HTTX_RING(_pCookie, _pipeId, _txContext) \
+{ \
+ if ((_txContext)->ENextBulkOutPosition == (_txContext)->CurWritePosition) \
+ { \
+ (_txContext)->bRingEmpty = TRUE; \
+ } \
+ /*NdisInterlockedDecrement(&(_p)->TxCount); */\
+}
+
+#define NT_SUCCESS(status) (((status) >=0) ? (TRUE):(FALSE))
+
+
+
+
+#define PIRP PVOID
+/*#define NDIS_OID UINT */
+#ifndef USB_ST_NOERROR
+#define USB_ST_NOERROR 0
+#endif
+
+
+/* vendor-specific control operations */
+#define CONTROL_TIMEOUT_JIFFIES ( (300 * OS_HZ) / 1000)
+/*#define UNLINK_TIMEOUT_MS 3 // os abl move */
+
+
+#define DEVICE_VENDOR_REQUEST_OUT 0x40
+#define DEVICE_VENDOR_REQUEST_IN 0xc0
+/*#define INTERFACE_VENDOR_REQUEST_OUT 0x41 */
+/*#define INTERFACE_VENDOR_REQUEST_IN 0xc1 */
+#define BULKOUT_MGMT_RESET_FLAG 0x80
+
+#define RTUSB_SET_BULK_FLAG(_M, _F) ((_M)->BulkFlags |= (_F))
+#define RTUSB_CLEAR_BULK_FLAG(_M, _F) ((_M)->BulkFlags &= ~(_F))
+#define RTUSB_TEST_BULK_FLAG(_M, _F) (((_M)->BulkFlags & (_F)) != 0)
+
+#endif /* __RTMP_USB_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/igmp_snoop.h b/cleopatre/devkit/mt7601udrv/include/igmp_snoop.h
new file mode 100644
index 0000000000..f51f821b6e
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/igmp_snoop.h
@@ -0,0 +1,155 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ igmp_snoop.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+
+#ifndef __RTMP_IGMP_SNOOP_H__
+#define __RTMP_IGMP_SNOOP_H__
+
+#include "link_list.h"
+
+#define IGMP_PROTOCOL_DESCRIPTOR 0x02
+#define IGMP_V1_MEMBERSHIP_REPORT 0x12
+#define IGMP_V2_MEMBERSHIP_REPORT 0x16
+#define IGMP_LEAVE_GROUP 0x17
+#define IGMP_V3_MEMBERSHIP_REPORT 0x22
+
+#define MLD_V1_LISTENER_REPORT 131
+#define MLD_V1_LISTENER_DONE 132
+#define MLD_V2_LISTERNER_REPORT 143
+
+#define IGMPMAC_TB_ENTRY_AGEOUT_TIME (120 * OS_HZ)
+
+#define MULTICAST_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) & (MAX_LEN_OF_MULTICAST_FILTER_HASH_TABLE - 1))
+
+#define IS_MULTICAST_MAC_ADDR(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
+#define IS_IPV6_MULTICAST_MAC_ADDR(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) == 0x33))
+#define IS_BROADCAST_MAC_ADDR(Addr) ((((Addr[0]) & 0xff) == 0xff))
+
+#define IGMP_NONE 0
+#define IGMP_PKT 1
+#define IGMP_IN_GROUP 2
+
+
+VOID MulticastFilterTableInit(
+ IN PRTMP_ADAPTER pAd,
+ IN PMULTICAST_FILTER_TABLE *ppMulticastFilterTable);
+
+VOID MultiCastFilterTableReset(
+ IN PMULTICAST_FILTER_TABLE *ppMulticastFilterTable);
+
+BOOLEAN MulticastFilterTableInsertEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pGrpId,
+ IN PUCHAR pMemberAddr,
+ IN PNET_DEV dev,
+ IN MulticastFilterEntryType type);
+
+BOOLEAN MulticastFilterTableDeleteEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pGrpId,
+ IN PUCHAR pMemberAddr,
+ IN PNET_DEV dev);
+
+PMULTICAST_FILTER_TABLE_ENTRY MulticastFilterTableLookup(
+ IN PMULTICAST_FILTER_TABLE pMulticastFilterTable,
+ IN PUCHAR pAddr,
+ IN PNET_DEV dev);
+
+BOOLEAN isIgmpPkt(
+ IN PUCHAR pDstMacAddr,
+ IN PUCHAR pIpHeader);
+
+VOID IGMPSnooping(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDstMacAddr,
+ IN PUCHAR pSrcMacAddr,
+ IN PUCHAR pIpHeader,
+ IN PNET_DEV pDev);
+
+BOOLEAN isMldPkt(
+ IN PUCHAR pDstMacAddr,
+ IN PUCHAR pIpHeader,
+ OUT UINT8 *pProtoType,
+ OUT PUCHAR *pMldHeader);
+
+BOOLEAN IPv6MulticastFilterExcluded(
+ IN PUCHAR pDstMacAddr,
+ IN PUCHAR pIpHeader);
+
+VOID MLDSnooping(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDstMacAddr,
+ IN PUCHAR pSrcMacAddr,
+ IN PUCHAR pIpHeader,
+ IN PNET_DEV pDev);
+
+UCHAR IgmpMemberCnt(
+ IN PLIST_HEADER pList);
+
+VOID IgmpGroupDelMembers(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pMemberAddr,
+ IN PNET_DEV pDev);
+
+INT Set_IgmpSn_Enable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_IgmpSn_AddEntry_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_IgmpSn_DelEntry_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_IgmpSn_TabDisplay_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+void rtmp_read_igmp_snoop_from_file(
+ IN PRTMP_ADAPTER pAd,
+ PSTRING tmpbuf,
+ PSTRING buffer);
+
+NDIS_STATUS IgmpPktInfoQuery(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pSrcBufVA,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR FromWhichBSSID,
+ OUT INT *pInIgmpGroup,
+ OUT PMULTICAST_FILTER_TABLE_ENTRY *ppGroupEntry);
+
+NDIS_STATUS IgmpPktClone(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN INT IgmpPktInGroup,
+ IN PMULTICAST_FILTER_TABLE_ENTRY pGroupEntry,
+ IN UCHAR QueIdx,
+ IN UINT8 UserPriority,
+ IN PNET_DEV pNetDev);
+
+#endif /* __RTMP_IGMP_SNOOP_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/ipv6.h b/cleopatre/devkit/mt7601udrv/include/ipv6.h
new file mode 100644
index 0000000000..16c9b8ea9c
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/ipv6.h
@@ -0,0 +1,205 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ ipv6.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __IPV6_HDR_H_
+#define __IPV6_HDR_H_
+
+#define IPV6_ADDR_LEN 16
+#define IPV6_HDR_LEN 40
+
+/* IPv6 address definition */
+#define IPV6_LINK_LOCAL_ADDR_PREFIX 0xFE8
+#define IPV6_SITE_LOCAL_ADDR_PREFIX 0xFEC
+#define IPV6_LOCAL_ADDR_PREFIX 0xFE8
+#define IPV6_MULTICAST_ADDR_PREFIX 0xFF
+#define IPV6_LOOPBACK_ADDR 0x1
+#define IPV6_UNSPECIFIED_ADDR 0x0
+
+/* defined as sequence in IPv6 header */
+#define IPV6_NEXT_HEADER_HOP_BY_HOP 0x00 /* 0 */
+#define IPV6_NEXT_HEADER_DESTINATION 0x3c /* 60 */
+#define IPV6_NEXT_HEADER_ROUTING 0x2b /* 43 */
+#define IPV6_NEXT_HEADER_FRAGMENT 0x2c /* 44 */
+#define IPV6_NEXT_HEADER_AUTHENTICATION 0x33 /* 51 */
+#define IPV6_NEXT_HEADER_ENCAPSULATION 0x32 /* 50, RFC-2406 */
+#define IPV6_NEXT_HEADER_NONE 0x3b /* 59 */
+
+#define IPV6_NEXT_HEADER_TCP 0x06
+#define IPV6_NEXT_HEADER_UDP 0x11
+#define IPV6_NEXT_HEADER_ICMPV6 0x3a
+#define IPV6_NEXT_HEADER_PIM 0x67
+
+/* ICMPv6 msg type definition */
+#define ICMPV6_MSG_TYPE_ROUTER_SOLICITATION 0x85 /* 133 */
+#define ROUTER_SOLICITATION_FIXED_LEN 8
+
+#define ICMPV6_MSG_TYPE_ROUTER_ADVERTISEMENT 0x86 /* 134 */
+#define ROUTER_ADVERTISEMENT_FIXED_LEN 16
+
+#define ICMPV6_MSG_TYPE_NEIGHBOR_SOLICITATION 0x87 /* 135 */
+#define NEIGHBOR_SOLICITATION_FIXED_LEN 24
+
+#define ICMPV6_MSG_TYPE_NEIGHBOR_ADVERTISEMENT 0x88 /* 136 */
+#define NEIGHBOR_ADVERTISEMENT_FIXED_LEN 24
+
+#define ICMPV6_MSG_TYPE_REDIRECT 0x89 /* 137 */
+#define REDIRECT_FIXED_LEN 40
+
+/* IPv6 Address related structures */
+typedef struct rt_ipv6_addr_
+{
+ union
+ {
+ UCHAR ipv6Addr8[16];
+ USHORT ipv6Addr16[8];
+ UINT32 ipv6Addr32[4];
+ }addr;
+#define ipv6_addr addr.ipv6Addr8
+#define ipv6_addr16 addr.ipv6Addr16
+#define ipv6_addr32 addr.ipv6Addr32
+}RT_IPV6_ADDR, *PRT_IPV6_ADDR;
+
+
+#define PRINT_IPV6_ADDR(ipv6Addr) \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[0]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[1]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[2]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[3]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[4]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[5]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[6]), \
+ OS_NTOHS((ipv6Addr).ipv6_addr16[7])
+
+
+/*IPv6 Header related structures */
+typedef struct GNU_PACKED _rt_ipv6_hdr_
+{
+ UINT32 ver:4,
+ trafficClass:8,
+ flowLabel:20;
+ USHORT payload_len;
+ UCHAR nextHdr;
+ UCHAR hopLimit;
+ RT_IPV6_ADDR srcAddr;
+ RT_IPV6_ADDR dstAddr;
+}RT_IPV6_HDR, *PRT_IPV6_HDR;
+
+
+typedef struct GNU_PACKED _rt_ipv6_ext_hdr_
+{
+ UCHAR nextProto; /* Indicate the protocol type of next extension header. */
+ UCHAR extHdrLen; /* optional field for msg length of this extension header which didn't include the first "nextProto" field. */
+ UCHAR octets[1]; /* hook to extend header message body. */
+}RT_IPV6_EXT_HDR, *PRT_IPV6_EXT_HDR;
+
+
+/* ICMPv6 related structures */
+typedef struct GNU_PACKED _rt_ipv6_icmpv6_hdr_
+{
+ UCHAR type;
+ UCHAR code;
+ USHORT chksum;
+ UCHAR octets[1]; /*hook to extend header message body. */
+}RT_ICMPV6_HDR, *PRT_ICMPV6_HDR;
+
+
+typedef struct GNU_PACKED _rt_icmp6_option_hdr_
+{
+ UCHAR type;
+ UCHAR len;
+ UCHAR octet[1];
+}RT_ICMPV6_OPTION_HDR, *PRT_ICMPV6_OPTION_HDR;
+
+typedef enum{
+/* Defined ICMPv6 Option Types. */
+ TYPE_SRC_LL_ADDR = 1,
+ TYPE_TGT_LL_ADDR = 2,
+ TYPE_PREFIX_INFO = 3,
+ TYPE_REDIRECTED_HDR = 4,
+ TYPE_MTU = 5,
+}ICMPV6_OPTIONS_TYPE_DEF;
+
+
+static inline BOOLEAN IPv6ExtHdrHandle(
+ RT_IPV6_EXT_HDR *pExtHdr,
+ UCHAR *pProto,
+ UINT32 *pOffset)
+{
+ UCHAR nextProto = 0xff;
+ UINT32 extLen = 0;
+ BOOLEAN status = TRUE;
+
+ /*printk("%s(): parsing the Extension Header with Protocol(0x%x):\n", __FUNCTION__, *pProto); */
+ switch (*pProto)
+ {
+ case IPV6_NEXT_HEADER_HOP_BY_HOP:
+ /* IPv6ExtHopByHopHandle(); */
+ nextProto = pExtHdr->nextProto;
+ extLen = (pExtHdr->extHdrLen + 1) * 8;
+ break;
+
+ case IPV6_NEXT_HEADER_DESTINATION:
+ /* IPv6ExtDestHandle(); */
+ nextProto = pExtHdr->nextProto;
+ extLen = (pExtHdr->extHdrLen + 1) * 8;
+ break;
+
+ case IPV6_NEXT_HEADER_ROUTING:
+ /* IPv6ExtRoutingHandle(); */
+ nextProto = pExtHdr->nextProto;
+ extLen = (pExtHdr->extHdrLen + 1) * 8;
+ break;
+
+ case IPV6_NEXT_HEADER_FRAGMENT:
+ /* IPv6ExtFragmentHandle(); */
+ nextProto = pExtHdr->nextProto;
+ extLen = 8; /* The Fragment header length is fixed to 8 bytes. */
+ break;
+
+ case IPV6_NEXT_HEADER_AUTHENTICATION:
+ /* IPV6_NEXT_HEADER_ENCAPSULATION: */
+ /*
+ TODO: Not support. For encryption issue.
+ */
+ nextProto = 0xFF;
+ status = FALSE;
+ break;
+
+ default:
+ nextProto = 0xFF;
+ status = FALSE;
+ break;
+ }
+
+ *pProto = nextProto;
+ *pOffset += extLen;
+ /*printk("%s(): nextProto = 0x%x!, offset=0x%x!\n", __FUNCTION__, nextProto, offset); */
+
+ return status;
+
+}
+
+#endif /* __IPV6_HDR_H_ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/link_list.h b/cleopatre/devkit/mt7601udrv/include/link_list.h
new file mode 100644
index 0000000000..a262b3e05e
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/link_list.h
@@ -0,0 +1,182 @@
+
+#ifndef __LINK_LIST_H__
+#define __LINK_LIST_H__
+
+typedef struct _LIST_ENTRY
+{
+ struct _LIST_ENTRY *pNext;
+} LIST_ENTRY, *PLIST_ENTRY;
+
+typedef struct _LIST_HEADR
+{
+ PLIST_ENTRY pHead;
+ PLIST_ENTRY pTail;
+ UCHAR size;
+} LIST_HEADER, *PLIST_HEADER;
+
+static inline VOID initList(
+ IN PLIST_HEADER pList)
+{
+ pList->pHead = pList->pTail = NULL;
+ pList->size = 0;
+ return;
+}
+
+static inline VOID insertTailList(
+ IN PLIST_HEADER pList,
+ IN PLIST_ENTRY pEntry)
+{
+ pEntry->pNext = NULL;
+ if (pList->pTail)
+ pList->pTail->pNext = pEntry;
+ else
+ pList->pHead = pEntry;
+ pList->pTail = pEntry;
+ pList->size++;
+
+ return;
+}
+
+static inline PLIST_ENTRY removeHeadList(
+ IN PLIST_HEADER pList)
+{
+ PLIST_ENTRY pNext;
+ PLIST_ENTRY pEntry;
+
+ pEntry = pList->pHead;
+ if (pList->pHead != NULL)
+ {
+ pNext = pList->pHead->pNext;
+ pList->pHead = pNext;
+ if (pNext == NULL)
+ pList->pTail = NULL;
+ pList->size--;
+ }
+ return pEntry;
+}
+
+static inline int getListSize(
+ IN PLIST_HEADER pList)
+{
+ return pList->size;
+}
+
+static inline PLIST_ENTRY delEntryList(
+ IN PLIST_HEADER pList,
+ IN PLIST_ENTRY pEntry)
+{
+ PLIST_ENTRY pCurEntry;
+ PLIST_ENTRY pPrvEntry;
+
+ if(pList->pHead == NULL)
+ return NULL;
+
+ if(pEntry == pList->pHead)
+ {
+ pCurEntry = pList->pHead;
+ pList->pHead = pCurEntry->pNext;
+
+ if(pList->pHead == NULL)
+ pList->pTail = NULL;
+
+ pList->size--;
+ return pCurEntry;
+ }
+
+ pPrvEntry = pList->pHead;
+ pCurEntry = pPrvEntry->pNext;
+ while(pCurEntry != NULL)
+ {
+ if (pEntry == pCurEntry)
+ {
+ pPrvEntry->pNext = pCurEntry->pNext;
+
+ if(pEntry == pList->pTail)
+ pList->pTail = pPrvEntry;
+
+ pList->size--;
+ break;
+ }
+ pPrvEntry = pCurEntry;
+ pCurEntry = pPrvEntry->pNext;
+ }
+
+ return pCurEntry;
+}
+
+
+typedef struct _DL_LIST
+{
+ struct _DL_LIST *Next;
+ struct _DL_LIST *Prev;
+}DL_LIST, *PDL_LIST;
+
+static inline void DlListInit(struct _DL_LIST *List)
+{
+ List->Next = List;
+ List->Prev = List;
+}
+
+static inline void DlListAdd(struct _DL_LIST *List, struct _DL_LIST *Item)
+{
+ Item->Next = List->Next;
+ Item->Prev = List;
+ List->Next->Prev = Item;
+ List->Next = Item;
+}
+
+static inline void DlListAddTail(struct _DL_LIST *List, struct _DL_LIST *Item)
+{
+ DlListAdd(List->Prev, Item);
+}
+
+static inline void DlListDel(struct _DL_LIST *Item)
+{
+ Item->Next->Prev = Item->Prev;
+ Item->Prev->Next = Item->Next;
+ Item->Next = NULL;
+ Item->Prev = NULL;
+}
+
+static inline int DlListEmpty(struct _DL_LIST *List)
+{
+ return List->Next == List;
+}
+
+static inline unsigned int DlListLen(struct _DL_LIST *List)
+{
+ struct _DL_LIST *Item;
+ unsigned int Count = 0;
+
+ for (Item = List->Next; Item != List; Item = Item->Next)
+ Count++;
+
+ return Count;
+}
+
+
+#ifndef offsetof
+#define offsetof(type, member) ((long) &((type *) 0)->member)
+#endif
+
+#define DlListEntry(item, type, member) \
+ ((type *) ((char *) item - offsetof(type, member)))
+
+#define DlListFirst(list, type, member) \
+ (DlListEmpty((list)) ? NULL : \
+ DlListEntry((list)->Next, type, member))
+
+#define DlListForEach(item, list, type, member) \
+ for (item = DlListEntry((list)->Next, type, member); \
+ &item->member != (list); \
+ item = DlListEntry(item->member.Next, type, member))
+
+#define DlListForEachSafe(item, n, list, type, member) \
+ for (item = DlListEntry((list)->Next, type, member), \
+ n = DlListEntry(item->member.Next, type, member); \
+ &item->member != (list); \
+ item = n, n = DlListEntry(n->member.Next, type, member))
+
+
+#endif /* ___LINK_LIST_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/fce.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/fce.h
new file mode 100644
index 0000000000..3d1cdd7aed
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/fce.h
@@ -0,0 +1,70 @@
+/*
+
+*/
+
+#ifndef __FCE_H__
+#define __FCE_H__
+
+#include "rt_config.h"
+
+#define FCE_PSE_CTRL 0x0800
+#define FCE_CSO 0x0808
+#define FCE_L2_STUFF 0x080c
+#define TX_CPU_PORT_FROM_FCE_BASE_PTR 0x09A0
+#define TX_CPU_PORT_FROM_FCE_MAX_COUNT 0x09A4
+#define FCE_PDMA_GLOBAL_CONF 0x09C4
+#define TX_CPU_PORT_FROM_FCE_CPU_DESC_INDEX 0x09A8
+#define FCE_SKIP_FS 0x0A6C
+#define PER_PORT_PAUSE_ENABLE_CONTROL1 0x0A38
+
+#ifdef BIG_ENDIAN
+typedef union _L2_STUFFING_STRUC
+{
+ struct {
+ UINT32 RSV:6;
+ UINT32 OTHER_PORT:2;
+ UINT32 TS_LENGTH_EN:8;
+ UINT32 TS_CMD_QSEL_EN:8;
+ UINT32 RSV2:2;
+ UINT32 MVINF_BYTE_SWP:1;
+ UINT32 FS_WR_MPDU_LEN_EN:1;
+ UINT32 TX_L2_DE_STUFFING_EN:1;
+ UINT32 RX_L2_STUFFING_EN:1;
+ UINT32 QoS_L2_EN:1;
+ UINT32 HT_L2_EN:1;
+ } field;
+
+ UINT32 word;
+} L2_STUFFING_STRUC, *PL2_STUFFING_STRUC;
+#else
+typedef union _L2_STUFFING_STRUC
+{
+ struct {
+ UINT32 HT_L2_EN:1;
+ UINT32 QoS_L2_EN:1;
+ UINT32 RX_L2_STUFFING_EN:1;
+ UINT32 TX_L2_DE_STUFFING_EN:1;
+ UINT32 FS_WR_MPDU_LEN_EN:1;
+ UINT32 MVINF_BYTE_SWP:1;
+ UINT32 RSV2:2;
+ UINT32 TS_CMD_QSEL_EN:8;
+ UINT32 TS_LENGTH_EN:8;
+ UINT32 OTHER_PORT:2;
+ UINT32 RSV:6;
+ } field;
+
+ UINT32 word;
+} L2_STUFFING_STRUC, *PL2_STUFFING_STRUC;
+#endif
+
+#define NORMAL_PKT 0x0
+#define CMD_PKT 0x1
+
+#define FCE_WLAN_PORT 0x0
+#define FCE_CPU_RX_PORT 0x1
+#define FCE_CPU_TX_PORT 0x2
+#define FCE_HOST_PORT 0x3
+#define FCE_VIRTUAL_CPU_RX_PORT 0x4
+#define FCE_VIRTUAL_CPU_TX_PORT 0x5
+#define FCE_DISCARD 0x6
+#endif /*__FCE_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/mac_pci.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/mac_pci.h
new file mode 100644
index 0000000000..d4423ba636
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/mac_pci.h
@@ -0,0 +1,405 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ mac_pci.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __MAC_PCI_H__
+#define __MAC_PCI_H__
+
+#include "rtmp_type.h"
+
+#ifdef RLT_MAC
+#include "mac_ral/nmac/ral_nmac_pci.h"
+#endif /* RLT_MAC */
+#ifdef RTMP_MAC
+#include "mac_ral/omac/ral_omac_pci.h"
+#endif /* RTMP_MAC */
+
+#include "mac_ral/rtmp_mac.h"
+#include "chip/rtmp_phy.h"
+#include "rtmp_iface.h"
+#include "rtmp_dot11.h"
+
+
+
+#define fRTMP_ADAPTER_NEED_STOP_TX 0
+
+
+/* =================================================================================
+ PCI/RBUS TX / RX Frame Descriptors format
+
+ Memory Layout
+
+ 1. Tx Descriptor
+ TxD (12 bytes) + TXINFO (4 bytes)
+ 2. Packet Buffer
+ TXWI + 802.11
+ 31 0
+ +--------------------------------------------------------------------------+
+ | SDP0[31:0] |
+ +-+--+---------------------+-+--+-----------------------------------------+
+ |D |L0| SDL0[13:0] |B|L1| SDL1[13:0] |
+ +-+--+---------------------+-+--+-----------------------------------------+
+ | SDP1[31:0] |
+ +--------------------------------------------------------------------------+
+ | TXINFO |
+ +--------------------------------------------------------------------------+
+================================================================================= */
+/*
+ TX descriptor format for Tx Data/Mgmt Rings
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _TXD_STRUC {
+ /* Word 0 */
+ UINT32 SDPtr0;
+ /* Word 1 */
+ UINT32 DMADONE:1;
+ UINT32 LastSec0:1;
+ UINT32 SDLen0:14;
+ UINT32 Burst:1;
+ UINT32 LastSec1:1;
+ UINT32 SDLen1:14;
+ /* Word 2 */
+ UINT32 SDPtr1;
+} TXD_STRUC, *PTXD_STRUC;
+#else
+typedef struct GNU_PACKED _TXD_STRUC {
+ /* Word 0 */
+ UINT32 SDPtr0;
+ /* Word 1 */
+ UINT32 SDLen1:14;
+ UINT32 LastSec1:1;
+ UINT32 Burst:1;
+ UINT32 SDLen0:14;
+ UINT32 LastSec0:1;
+ UINT32 DMADONE:1;
+ /*Word2 */
+ UINT32 SDPtr1;
+} TXD_STRUC, *PTXD_STRUC;
+#endif
+
+
+/*
+ Rx descriptor format, Rx Ring
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXD_STRUC{
+ /* Word 0 */
+ UINT32 SDP0;
+ /* Word 1 */
+ UINT32 DDONE:1;
+ UINT32 LS0:1;
+ UINT32 SDL0:14;
+ UINT32 BURST:1;
+ UINT32 LS1:1;
+ UINT32 SDL1:14;
+ /* Word 2 */
+ UINT32 SDP1;
+}RXD_STRUC, *PRXD_STRUC;
+#else
+typedef struct GNU_PACKED _RXD_STRUC{
+ /* Word 0 */
+ UINT32 SDP0;
+ /* Word 1 */
+ UINT32 SDL1:14;
+ UINT32 LS1:1;
+ UINT32 BURST:1;
+ UINT32 SDL0:14;
+ UINT32 LS0:1;
+ UINT32 DDONE:1;
+ /* Word 2 */
+ UINT32 SDP1;
+}RXD_STRUC, *PRXD_STRUC;
+#endif
+
+
+/* ----------------- EEPROM Related MACRO ----------------- */
+
+/* 8051 firmware image for RT2860 - base address = 0x4000 */
+#define FIRMWARE_IMAGE_BASE 0x2000
+#define MAX_FIRMWARE_IMAGE_SIZE 0x2000 /* 8kbyte */
+
+
+/* ----------------- Frimware Related MACRO ----------------- */
+#define RTMP_WRITE_FIRMWARE(_pAd, _pFwImage, _FwLen) \
+ do{ \
+ ULONG _i, _firm; \
+ /* protect 8051 we will do firmware upload */ \
+ RTMP_IO_WRITE32(_pAd, PBF_SYS_CTRL, 0x10000); \
+ \
+ for(_i=0; _i<_FwLen; _i+=4) \
+ { \
+ _firm = _pFwImage[_i] + \
+ (_pFwImage[_i+3] << 24) + \
+ (_pFwImage[_i+2] << 16) + \
+ (_pFwImage[_i+1] << 8); \
+ RTMP_IO_WRITE32(_pAd, FIRMWARE_IMAGE_BASE + _i, _firm); \
+ } \
+ /* do 8051 firmware reset */ \
+ RTMP_IO_WRITE32(_pAd, PBF_SYS_CTRL, 0x00000); \
+ RTMP_IO_WRITE32(_pAd, PBF_SYS_CTRL, 0x00001); \
+ \
+ /* initialize BBP R/W access agent */ \
+ RTMP_IO_WRITE32(_pAd, H2M_BBP_AGENT, 0); \
+ RTMP_IO_WRITE32(_pAd, H2M_MAILBOX_CSR, 0); \
+ }while(0)
+
+
+/* ----------------- TX Related MACRO ----------------- */
+#define RTMP_START_DEQUEUE(pAd, QueIdx, irqFlags) do{}while(0)
+#define RTMP_STOP_DEQUEUE(pAd, QueIdx, irqFlags) do{}while(0)
+
+
+#define RTMP_HAS_ENOUGH_FREE_DESC(pAd, pTxBlk, freeNum, pPacket) \
+ ((freeNum) >= (ULONG)(pTxBlk->TotalFragNum + RTMP_GET_PACKET_FRAGMENTS(pPacket) + 3)) /* rough estimate we will use 3 more descriptor. */
+#define RTMP_RELEASE_DESC_RESOURCE(pAd, QueIdx) \
+ do{}while(0)
+
+#define NEED_QUEUE_BACK_FOR_AGG(pAd, QueIdx, freeNum, _TxFrameType) \
+ (((freeNum != (TX_RING_SIZE-1)) && (pAd->TxSwQueue[QueIdx].Number == 0)) || (freeNum<3))
+ /*(((freeNum) != (TX_RING_SIZE-1)) && (pAd->TxSwQueue[QueIdx].Number == 1)) */
+
+
+#define HAL_KickOutMgmtTx(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen) \
+ RtmpPCIMgmtKickOut(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen)
+
+#define HAL_WriteSubTxResource(pAd, pTxBlk, bIsLast, pFreeNumber) \
+ /* RtmpPCI_WriteSubTxResource(pAd, pTxBlk, bIsLast, pFreeNumber)*/
+
+#define HAL_WriteTxResource(pAd, pTxBlk,bIsLast, pFreeNumber) \
+ RtmpPCI_WriteSingleTxResource(pAd, pTxBlk, bIsLast, pFreeNumber)
+
+#define HAL_WriteFragTxResource(pAd, pTxBlk, fragNum, pFreeNumber) \
+ RtmpPCI_WriteFragTxResource(pAd, pTxBlk, fragNum, pFreeNumber)
+
+#define HAL_WriteMultiTxResource(pAd, pTxBlk,frameNum, pFreeNumber) \
+ RtmpPCI_WriteMultiTxResource(pAd, pTxBlk, frameNum, pFreeNumber)
+
+#define HAL_FinalWriteTxResource(_pAd, _pTxBlk, _TotalMPDUSize, _FirstTxIdx) \
+ RtmpPCI_FinalWriteTxResource(_pAd, _pTxBlk, _TotalMPDUSize, _FirstTxIdx)
+
+#define HAL_LastTxIdx(_pAd, _QueIdx,_LastTxIdx) \
+ /*RtmpPCIDataLastTxIdx(_pAd, _QueIdx,_LastTxIdx)*/
+
+#ifdef RLT_MAC
+#define HAL_KickOutTx(_pAd, _pTxBlk, _QueIdx) \
+ RTMP_IO_WRITE32((_pAd), TX_RING_CIDX + ((_QueIdx)*0x10), (_pAd)->TxRing[(_QueIdx)].TxCpuIdx)
+#endif /* RLT_MAC */
+#ifdef RTMP_MAC
+#define HAL_KickOutTx(_pAd, _pTxBlk, _QueIdx) \
+ RTMP_IO_WRITE32((_pAd), TX_CTX_IDX0+((_QueIdx)*0x10), (_pAd)->TxRing[(_QueIdx)].TxCpuIdx)
+/* RtmpPCIDataKickOut(_pAd, _pTxBlk, _QueIdx)*/
+#endif /* RTMP_MAC */
+
+#define HAL_KickOutNullFrameTx(_pAd, _QueIdx, _pNullFrame, _frameLen) \
+ MiniportMMRequest(_pAd, _QueIdx, _pNullFrame, _frameLen)
+
+#define GET_TXRING_FREENO(_pAd, _QueIdx) \
+ (_pAd->TxRing[_QueIdx].TxSwFreeIdx > _pAd->TxRing[_QueIdx].TxCpuIdx) ? \
+ (_pAd->TxRing[_QueIdx].TxSwFreeIdx - _pAd->TxRing[_QueIdx].TxCpuIdx - 1) \
+ : \
+ (_pAd->TxRing[_QueIdx].TxSwFreeIdx + TX_RING_SIZE - _pAd->TxRing[_QueIdx].TxCpuIdx - 1);
+
+
+#define GET_MGMTRING_FREENO(_pAd) \
+ (_pAd->MgmtRing.TxSwFreeIdx > _pAd->MgmtRing.TxCpuIdx) ? \
+ (_pAd->MgmtRing.TxSwFreeIdx - _pAd->MgmtRing.TxCpuIdx - 1) \
+ : \
+ (_pAd->MgmtRing.TxSwFreeIdx + MGMT_RING_SIZE - _pAd->MgmtRing.TxCpuIdx - 1);
+
+
+/* ----------------- RX Related MACRO ----------------- */
+
+
+/* ----------------- ASIC Related MACRO ----------------- */
+/* reset MAC of a station entry to 0x000000000000 */
+#define RTMP_STA_ENTRY_MAC_RESET(pAd, Wcid) \
+ AsicDelWcidTab(pAd, Wcid);
+
+/* add this entry into ASIC RX WCID search table */
+#define RTMP_STA_ENTRY_ADD(pAd, pEntry) \
+ AsicUpdateRxWCIDTable(pAd, pEntry->Aid, pEntry->Addr);
+
+#define RTMP_UPDATE_PROTECT(_pAd, _OperationMode, _SetMask, _bDisableBGProtect, _bNonGFExist) \
+ AsicUpdateProtect(pAd, _OperationMode, _SetMask, _bDisableBGProtect, _bNonGFExist);
+
+#ifdef CONFIG_AP_SUPPORT
+#define RTMP_AP_UPDATE_CAPABILITY_AND_ERPIE(pAd) \
+ APUpdateCapabilityAndErpIe(pAd);
+#endif /* CONFIG_AP_SUPPORT */
+
+/* Insert the BA bitmap to ASIC for the Wcid entry */
+#define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID) \
+ do{ \
+ UINT32 _Value = 0, _Offset; \
+ _Offset = MAC_WCID_BASE + (_Aid) * HW_WCID_ENTRY_SIZE + 4; \
+ RTMP_IO_READ32((_pAd), _Offset, &_Value);\
+ _Value |= (0x10000<<(_TID)); \
+ RTMP_IO_WRITE32((_pAd), _Offset, _Value);\
+ }while(0)
+
+
+/* Remove the BA bitmap from ASIC for the Wcid entry */
+/* bitmap field starts at 0x10000 in ASIC WCID table */
+#define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID) \
+ do{ \
+ UINT32 _Value = 0, _Offset; \
+ _Offset = MAC_WCID_BASE + (_Wcid) * HW_WCID_ENTRY_SIZE + 4; \
+ RTMP_IO_READ32((_pAd), _Offset, &_Value); \
+ _Value &= (~(0x10000 << (_TID))); \
+ RTMP_IO_WRITE32((_pAd), _Offset, _Value); \
+ }while(0)
+
+
+/* ----------------- Interface Related MACRO ----------------- */
+
+/* */
+/* Enable & Disable NIC interrupt via writing interrupt mask register */
+/* Since it use ADAPTER structure, it have to be put after structure definition. */
+/* */
+#define RTMP_ASIC_INTERRUPT_DISABLE(_pAd) \
+ do{ \
+ RTMP_IO_WRITE32((_pAd), INT_MASK_CSR, 0x0); /* 0: disable */ \
+ RTMP_CLEAR_FLAG((_pAd), fRTMP_ADAPTER_INTERRUPT_ACTIVE); \
+ }while(0)
+
+#define RTMP_ASIC_INTERRUPT_ENABLE(_pAd)\
+ do{ \
+ RTMP_IO_WRITE32((_pAd), INT_MASK_CSR, (_pAd)->int_enable_reg /*DELAYINTMASK*/); /* 1:enable */ \
+ RTMP_SET_FLAG((_pAd), fRTMP_ADAPTER_INTERRUPT_ACTIVE); \
+ }while(0)
+
+
+#ifdef RLT_MAC
+#define RTMP_IRQ_INIT(pAd) \
+ { unsigned long _irqFlags;\
+ RTMP_INT_LOCK(&pAd->irq_lock, _irqFlags);\
+ pAd->int_enable_reg = ((DELAYINTMASK) |(RxINT|TxDataInt|TxMgmtInt));\
+ pAd->int_disable_mask = 0;\
+ pAd->int_pending = 0;\
+ RTMP_INT_UNLOCK(&pAd->irq_lock, _irqFlags);\
+ }
+#endif /* RLT_MAC */
+
+#ifdef RTMP_MAC
+#define RTMP_IRQ_INIT(pAd) \
+ { unsigned long _irqFlags;\
+ RTMP_INT_LOCK(&pAd->irq_lock, _irqFlags);\
+ pAd->int_enable_reg = ((DELAYINTMASK) | \
+ (RxINT|TxDataInt|TxMgmtInt)) & ~(0x03); \
+ pAd->int_disable_mask = 0; \
+ pAd->int_pending = 0; \
+ RTMP_INT_UNLOCK(&pAd->irq_lock, _irqFlags);\
+ }
+#endif /* RTMP_MAC */
+
+#define RTMP_IRQ_ENABLE(pAd) \
+{ /* clear garbage ints */ \
+ unsigned long _irqFlags;\
+ RTMP_IO_WRITE32(pAd, INT_SOURCE_CSR, 0xffffffff);\
+ RTMP_INT_LOCK(&pAd->irq_lock, _irqFlags);\
+ RTMP_ASIC_INTERRUPT_ENABLE(pAd); \
+ RTMP_INT_UNLOCK(&pAd->irq_lock, _irqFlags);\
+}
+
+
+
+/* ----------------- MLME Related MACRO ----------------- */
+#define RTMP_MLME_HANDLER(pAd) MlmeHandler(pAd)
+
+#define RTMP_MLME_PRE_SANITY_CHECK(pAd)
+
+#define RTMP_MLME_RESET_STATE_MACHINE(pAd) \
+ MlmeRestartStateMachine(pAd)
+
+#define RTMP_HANDLE_COUNTER_MEASURE(_pAd, _pEntry)\
+ HandleCounterMeasure(_pAd, _pEntry)
+
+/* ----------------- Power Save Related MACRO ----------------- */
+#define RTMP_PS_POLL_ENQUEUE(pAd) EnqueuePsPoll(pAd)
+
+
+/* For RTMPPCIePowerLinkCtrlRestore () function */
+#define RESTORE_HALT 1
+#define RESTORE_WAKEUP 2
+#define RESTORE_CLOSE 3
+
+#define PowerSafeCID 1
+#define PowerRadioOffCID 2
+#define PowerWakeCID 3
+#define CID0MASK 0x000000ff
+#define CID1MASK 0x0000ff00
+#define CID2MASK 0x00ff0000
+#define CID3MASK 0xff000000
+
+
+
+#define RTMP_MLME_RADIO_ON(pAd) \
+ RT28xxPciMlmeRadioOn(pAd);
+
+#define RTMP_MLME_RADIO_OFF(pAd) \
+ RT28xxPciMlmeRadioOFF(pAd);
+
+/* ----------------- Security Related MACRO ----------------- */
+
+/* Set Asic WCID Attribute table */
+#define RTMP_SET_WCID_SEC_INFO(_pAd, _BssIdx, _KeyIdx, _CipherAlg, _Wcid, _KeyTabFlag) \
+ RTMPSetWcidSecurityInfo(_pAd, _BssIdx, _KeyIdx, _CipherAlg, _Wcid, _KeyTabFlag)
+
+/* Set Asic WCID IV/EIV table */
+#define RTMP_ASIC_WCID_IVEIV_TABLE(_pAd, _Wcid, _uIV, _uEIV) \
+ AsicUpdateWCIDIVEIV(_pAd, _Wcid, _uIV, _uEIV)
+
+/* Set Asic WCID Attribute table (offset:0x6800) */
+#define RTMP_ASIC_WCID_ATTR_TABLE(_pAd, _BssIdx, _KeyIdx, _CipherAlg, _Wcid, _KeyTabFlag)\
+ AsicUpdateWcidAttributeEntry(_pAd, _BssIdx, _KeyIdx, _CipherAlg, _Wcid, _KeyTabFlag)
+
+/* Set Asic Pairwise key table */
+#define RTMP_ASIC_PAIRWISE_KEY_TABLE(_pAd, _WCID, _pCipherKey) \
+ AsicAddPairwiseKeyEntry(_pAd, _WCID, _pCipherKey)
+
+/* Set Asic Shared key table */
+#define RTMP_ASIC_SHARED_KEY_TABLE(_pAd, _BssIndex, _KeyIdx, _pCipherKey) \
+ AsicAddSharedKeyEntry(_pAd, _BssIndex, _KeyIdx, _pCipherKey)
+
+
+/* Remove Pairwise Key table */
+#define RTMP_REMOVE_PAIRWISE_KEY_ENTRY(_pAd, _Wcid)\
+ AsicRemovePairwiseKeyEntry(_pAd, _Wcid)
+
+#ifdef PCI_MSI_SUPPORT
+#define RTMP_OS_IRQ_RELEASE(_pAd, _NetDev) \
+{ \
+ POS_COOKIE pObj = (POS_COOKIE)(_pAd->OS_Cookie); \
+ RtmpOSIRQRelease(_NetDev, pAd->infType, pObj->pci_dev, &_pAd->HaveMsi); \
+}
+#else
+#define RTMP_OS_IRQ_RELEASE(_pAd, _NetDev) \
+{ \
+ POS_COOKIE pObj = (POS_COOKIE)(_pAd->OS_Cookie); \
+ RtmpOSIRQRelease(_NetDev, pAd->infType, pObj->pci_dev, NULL); \
+}
+#endif /* PCI_MSI_SUPPORT */
+
+#endif /*__MAC_PCI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/mac_usb.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/mac_usb.h
new file mode 100644
index 0000000000..792e69e39e
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/mac_usb.h
@@ -0,0 +1,490 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ mac_usb.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __MAC_USB_H__
+#define __MAC_USB_H__
+
+#include "rtmp_type.h"
+#ifdef RLT_MAC
+#include "mac_ral/nmac/ral_nmac_usb.h"
+#endif /* RLT_MAC */
+#ifdef RTMP_MAC
+#include "mac_ral/omac/ral_omac_usb.h"
+#endif /* RTMP_MAC */
+
+#include "mac_ral/rtmp_mac.h"
+#include "chip/rtmp_phy.h"
+#include "rtmp_iface.h"
+#include "rtmp_dot11.h"
+
+
+#define USB_CYC_CFG 0x02a4
+
+/*#define BEACON_RING_SIZE 2 */
+#ifdef CONFIG_MULTI_CHANNEL
+#define MGMTPIPEIDX 5 /* EP6 is highest priority */
+#else
+#define MGMTPIPEIDX 0 /* EP6 is highest priority */
+#endif /* CONFIG_MULTI_CHANNEL */
+
+/* os abl move */
+/*#define RTMP_PKT_TAIL_PADDING 11 // 3(max 4 byte padding) + 4 (last packet padding) + 4 (MaxBulkOutsize align padding) */
+
+#define fRTMP_ADAPTER_NEED_STOP_TX \
+ (fRTMP_ADAPTER_NIC_NOT_EXIST | fRTMP_ADAPTER_HALT_IN_PROGRESS | \
+ fRTMP_ADAPTER_RESET_IN_PROGRESS | fRTMP_ADAPTER_BULKOUT_RESET | \
+ fRTMP_ADAPTER_RADIO_OFF | fRTMP_ADAPTER_REMOVE_IN_PROGRESS)
+
+
+/* =================================================================================
+ USB TX / RX Frame Descriptors format
+
+ Tx Memory Layout
+ 1. Packet Buffer
+ TxINFO(4 bytes) + TXWI( 16 bytes) + 802.11
+ 31 0
+ +--------------------------------------------------------------------------+
+ | TXINFO[31:0] |
+ +--------------------------------------------------------------------------+
+ | TxWI |
+ + +
+ | |
+ + +
+ | |
+ + +
+ | |
+ +--------------------------------------------------------------------------+
+ | 802.11 |
+ | ......... |
+ +--------------------------------------------------------------------------+
+
+
+ Rx Memory Layout
+ 1. Packet Buffer
+ RxDMALen(4 bytes) + RXWI(16 bytes) + 802.11 + RXINFO (4 bytes)
+ 31 0
+ +--------------------------------------------------------------------------+
+ | RXDMALen[31:0] |
+ +--------------------------------------------------------------------------+
+ | RxWI |
+ + +
+ | |
+ + +
+ | |
+ + +
+ | |
+ +--------------------------------------------------------------------------+
+ | 802.11 |
+ | ......... |
+ +--------------------------------------------------------------------------+
+ | RXINFO |
+ +--------------------------------------------------------------------------+
+
+================================================================================= */
+
+
+/*
+ RXINFO appends at the end of each rx packet
+*/
+#define RXDMA_FIELD_SIZE 4
+
+
+/*
+ Rx descriptor format, Rx Ring
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXD_STRUC{
+ UINT32 dma_len;
+}RXD_STRUC, *PRXD_STRUC;
+#else
+typedef struct GNU_PACKED _RXD_STRUC{
+ UINT32 dma_len;
+}RXD_STRUC, *PRXD_STRUC;
+#endif
+
+
+/*
+ Management ring buffer format
+*/
+typedef struct _MGMT_STRUC {
+ BOOLEAN Valid;
+ PUCHAR pBuffer;
+ ULONG Length;
+} MGMT_STRUC, *PMGMT_STRUC;
+
+
+/*////////////////////////////////////////////////////////////////////////*/
+/* The TX_BUFFER structure forms the transmitted USB packet to the device */
+/*////////////////////////////////////////////////////////////////////////*/
+typedef struct __TX_BUFFER{
+ union{
+ UCHAR WirelessPacket[TX_BUFFER_NORMSIZE];
+ HEADER_802_11 NullFrame;
+ PSPOLL_FRAME PsPollPacket;
+ RTS_FRAME RTSFrame;
+ }field;
+ UCHAR Aggregation[4]; /*Buffer for save Aggregation size. */
+} TX_BUFFER, *PTX_BUFFER;
+
+typedef struct __HTTX_BUFFER{
+ union{
+ UCHAR WirelessPacket[MAX_TXBULK_SIZE];
+ HEADER_802_11 NullFrame;
+ PSPOLL_FRAME PsPollPacket;
+ RTS_FRAME RTSFrame;
+ }field;
+ UCHAR Aggregation[4]; /*Buffer for save Aggregation size. */
+} HTTX_BUFFER, *PHTTX_BUFFER;
+
+#define EDCA_AC0_PIPE 0 /* Bulk EP1 OUT */
+#define EDCA_AC1_PIPE 1 /* Bulk EP2 OUT */
+#define EDCA_AC2_PIPE 2 /* Bulk EP3 OUT */
+#define EDCA_AC3_PIPE 3 /* Bulk EP4 OUT */
+#define HCCA_PIPE 4 /* Bulk EP5 OUT */
+
+/* used to track driver-generated write irps */
+typedef struct _TX_CONTEXT
+{
+ PVOID pAd; /*Initialized in MiniportInitialize */
+ PURB pUrb; /*Initialized in MiniportInitialize */
+ PIRP pIrp; /*used to cancel pending bulk out. */
+ /*Initialized in MiniportInitialize */
+ PTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */
+ ULONG BulkOutSize;
+ UCHAR BulkOutPipeId;
+ UCHAR SelfIdx;
+ BOOLEAN InUse;
+ BOOLEAN bWaitingBulkOut; /* at least one packet is in this TxContext, ready for making IRP anytime. */
+ BOOLEAN bFullForBulkOut; /* all tx buffer are full , so waiting for tx bulkout. */
+ BOOLEAN IRPPending;
+ BOOLEAN LastOne;
+ BOOLEAN bAggregatible;
+ UCHAR Header_802_3[LENGTH_802_3];
+ UCHAR Rsv[2];
+ ULONG DataOffset;
+ UINT TxRate;
+ ra_dma_addr_t data_dma;
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef UAPSD_SUPPORT
+ USHORT Wcid;
+#endif /* UAPSD_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+} TX_CONTEXT, *PTX_CONTEXT, **PPTX_CONTEXT;
+
+
+/* used to track driver-generated write irps */
+typedef struct _HT_TX_CONTEXT
+{
+ PVOID pAd; /*Initialized in MiniportInitialize */
+ PURB pUrb; /*Initialized in MiniportInitialize */
+ PIRP pIrp; /*used to cancel pending bulk out. */
+ /*Initialized in MiniportInitialize */
+ PHTTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */
+ ULONG BulkOutSize; /* Indicate the total bulk-out size in bytes in one bulk-transmission */
+ UCHAR BulkOutPipeId;
+ BOOLEAN IRPPending;
+ BOOLEAN LastOne;
+ BOOLEAN bCurWriting;
+ BOOLEAN bRingEmpty;
+ BOOLEAN bCopySavePad;
+ UCHAR SavedPad[8];
+ UCHAR Header_802_3[LENGTH_802_3];
+ ULONG CurWritePosition; /* Indicate the buffer offset which packet will be inserted start from. */
+ ULONG CurWriteRealPos; /* Indicate the buffer offset which packet now are writing to. */
+ ULONG NextBulkOutPosition; /* Indicate the buffer start offset of a bulk-transmission */
+ ULONG ENextBulkOutPosition; /* Indicate the buffer end offset of a bulk-transmission */
+ UINT TxRate;
+ ra_dma_addr_t data_dma; /* urb dma on linux */
+#ifdef USB_BULK_BUF_ALIGMENT
+ ULONG CurWriteIdx; /* pointer to next 32k bytes position when wirte tx resource or when bulk out sizze not > 0x6000 */
+ ULONG NextBulkIdx; /* pointer to next alignment section when bulk ot */
+#endif /* USB_BULK_BUF_ALIGMENT */
+
+} HT_TX_CONTEXT, *PHT_TX_CONTEXT, **PPHT_TX_CONTEXT;
+
+
+typedef struct _CMD_CONTEXT
+{
+ PVOID pAd;
+ PURB pUrb;
+ ra_dma_addr_t data_dma;
+ PUCHAR TransferBuffer;
+ BOOLEAN IRPPending;
+} CMD_CONTEXT, *PCMD_CONTEXT, **PPCMD_CONTEXT;
+
+/* */
+/* Structure to keep track of receive packets and buffers to indicate */
+/* receive data to the protocol. */
+/* */
+typedef struct _RX_CONTEXT
+{
+ PUCHAR TransferBuffer;
+ PVOID pAd;
+ PIRP pIrp;/*used to cancel pending bulk in. */
+ PURB pUrb;
+ /*These 2 Boolean shouldn't both be 1 at the same time. */
+ ULONG BulkInOffset; /* number of packets waiting for reordering . */
+/* BOOLEAN ReorderInUse; // At least one packet in this buffer are in reordering buffer and wait for receive indication */
+ BOOLEAN bRxHandling; /* Notify this packet is being process now. */
+ BOOLEAN InUse; /* USB Hardware Occupied. Wait for USB HW to put packet. */
+ BOOLEAN Readable; /* Receive Complete back. OK for driver to indicate receiving packet. */
+ BOOLEAN IRPPending; /* TODO: To be removed */
+ /*atomic_t IrpLock; */
+ NDIS_SPIN_LOCK RxContextLock;
+ ra_dma_addr_t data_dma; /* urb dma on linux */
+} RX_CONTEXT, *PRX_CONTEXT;
+
+
+typedef struct _CMD_RSP_CONTEXT
+{
+ PUCHAR CmdRspBuffer;
+ PVOID pAd;
+ PURB pUrb;
+ BOOLEAN IRPPending;
+ BOOLEAN InUse;
+ BOOLEAN Readable;
+ ra_dma_addr_t data_dma;
+} CMD_RSP_CONTEXT, *PCMD_RSP_CONTEXT;
+
+/******************************************************************************
+
+ USB Frimware Related MACRO
+
+******************************************************************************/
+/* 8051 firmware image for usb - use last-half base address = 0x3000 */
+#define FIRMWARE_IMAGE_BASE 0x3000
+#define MAX_FIRMWARE_IMAGE_SIZE 0x1000 /* 4kbyte */
+
+#define RTMP_WRITE_FIRMWARE(_pAd, _pFwImage, _FwLen) \
+ RTUSBFirmwareWrite(_pAd, _pFwImage, _FwLen)
+
+
+
+/******************************************************************************
+
+ USB TX Related MACRO
+
+******************************************************************************/
+#define RTMP_START_DEQUEUE(pAd, QueIdx, irqFlags) \
+ { \
+ RTMP_IRQ_LOCK(&pAd->DeQueueLock[QueIdx], irqFlags); \
+ if (pAd->DeQueueRunning[QueIdx]) \
+ { \
+ RTMP_IRQ_UNLOCK(&pAd->DeQueueLock[QueIdx], irqFlags);\
+ DBGPRINT(RT_DEBUG_OFF, ("DeQueueRunning[%d]= TRUE!\n", QueIdx)); \
+ continue; \
+ } \
+ else \
+ { \
+ pAd->DeQueueRunning[QueIdx] = TRUE; \
+ RTMP_IRQ_UNLOCK(&pAd->DeQueueLock[QueIdx], irqFlags);\
+ } \
+ }
+
+#define RTMP_STOP_DEQUEUE(pAd, QueIdx, irqFlags) \
+ do{ \
+ RTMP_IRQ_LOCK(&pAd->DeQueueLock[QueIdx], irqFlags); \
+ pAd->DeQueueRunning[QueIdx] = FALSE; \
+ RTMP_IRQ_UNLOCK(&pAd->DeQueueLock[QueIdx], irqFlags); \
+ }while(0)
+
+#define RTMP_HAS_ENOUGH_FREE_DESC(pAd, pTxBlk, freeNum, pPacket) \
+ (RTUSBFreeDescRequest(pAd, pTxBlk->QueIdx, (pTxBlk->TotalFrameLen + GET_OS_PKT_LEN(pPacket))) == NDIS_STATUS_SUCCESS)
+
+#define RTMP_RELEASE_DESC_RESOURCE(pAd, QueIdx) \
+ do{}while(0)
+
+#define NEED_QUEUE_BACK_FOR_AGG(_pAd, _QueIdx, _freeNum, _TxFrameType) \
+ ((_TxFrameType == TX_RALINK_FRAME) && (RTUSBNeedQueueBackForAgg(_pAd, _QueIdx)))
+
+#define HAL_WriteSubTxResource(pAd, pTxBlk, bIsLast, pFreeNumber) \
+ RtmpUSB_WriteSubTxResource(pAd, pTxBlk, bIsLast, pFreeNumber)
+
+#define HAL_WriteTxResource(pAd, pTxBlk,bIsLast, pFreeNumber) \
+ RtmpUSB_WriteSingleTxResource(pAd, pTxBlk,bIsLast, pFreeNumber)
+
+#define HAL_WriteFragTxResource(pAd, pTxBlk, fragNum, pFreeNumber) \
+ RtmpUSB_WriteFragTxResource(pAd, pTxBlk, fragNum, pFreeNumber)
+
+#define HAL_WriteMultiTxResource(pAd, pTxBlk,frameNum, pFreeNumber) \
+ RtmpUSB_WriteMultiTxResource(pAd, pTxBlk,frameNum, pFreeNumber)
+
+#define HAL_FinalWriteTxResource(pAd, pTxBlk, totalMPDUSize, TxIdx) \
+ RtmpUSB_FinalWriteTxResource(pAd, pTxBlk, totalMPDUSize, TxIdx)
+
+#define HAL_LastTxIdx(pAd, QueIdx,TxIdx) \
+ /*RtmpUSBDataLastTxIdx(pAd, QueIdx,TxIdx)*/
+
+#define HAL_KickOutTx(pAd, pTxBlk, QueIdx) \
+ RtmpUSBDataKickOut(pAd, pTxBlk, QueIdx)
+
+#define HAL_KickOutMgmtTx(pAd, QueIdx, pPacket, pSrcBufVA, SrcBufLen) \
+ RtmpUSBMgmtKickOut(pAd, QueIdx, pPacket, pSrcBufVA, SrcBufLen)
+
+#define HAL_KickOutNullFrameTx(_pAd, _QueIdx, _pNullFrame, _frameLen) \
+ RtmpUSBNullFrameKickOut(_pAd, _QueIdx, _pNullFrame, _frameLen)
+
+#define GET_TXRING_FREENO(_pAd, _QueIdx) (_QueIdx) /*(_pAd->TxRing[_QueIdx].TxSwFreeIdx) */
+#define GET_MGMTRING_FREENO(_pAd) (_pAd->MgmtRing.TxSwFreeIdx)
+
+
+/* ----------------- RX Related MACRO ----------------- */
+
+
+/*
+ * Device Hardware Interface Related MACRO
+ */
+#define RTMP_IRQ_INIT(pAd) do{}while(0)
+#define RTMP_IRQ_ENABLE(pAd) do{}while(0)
+
+
+/*
+ * MLME Related MACRO
+ */
+#define RTMP_MLME_HANDLER(pAd) RTUSBMlmeUp(&(pAd->mlmeTask))
+
+#define RTMP_MLME_PRE_SANITY_CHECK(pAd) \
+ { if ((pAd->StaCfg.bHardwareRadio == TRUE) && \
+ (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) && \
+ (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS))) { \
+ RTEnqueueInternalCmd(pAd, CMDTHREAD_CHECK_GPIO, NULL, 0); } }
+
+#define RTMP_MLME_RESET_STATE_MACHINE(pAd) \
+ MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_RESET_CONF, 0, NULL, 0); \
+ RTUSBMlmeUp(&(pAd->mlmeTask));
+
+#define RTMP_HANDLE_COUNTER_MEASURE(_pAd, _pEntry) \
+ { RTEnqueueInternalCmd(_pAd, CMDTHREAD_802_11_COUNTER_MEASURE, _pEntry, sizeof(MAC_TABLE_ENTRY)); \
+ RTUSBMlmeUp(&(_pAd->mlmeTask)); \
+ }
+
+
+/*
+ * Power Save Related MACRO
+ */
+
+#define RTMP_MLME_RADIO_ON(pAd) \
+ RT28xxUsbMlmeRadioOn(pAd);
+
+#define RTMP_MLME_RADIO_OFF(pAd) \
+ RT28xxUsbMlmeRadioOFF(pAd);
+
+/* MAC Search table */
+/* add this entry into ASIC RX WCID search table */
+#define RTMP_STA_ENTRY_ADD(pAd, pEntry) \
+{ \
+ RT_SET_ASIC_WCID Info; \
+ \
+ Info.WCID = pEntry->Aid; \
+ NdisMoveMemory(Info.Addr, pEntry->Addr, MAC_ADDR_LEN); \
+ \
+ RTEnqueueInternalCmd(pAd, CMDTHREAD_SET_CLIENT_MAC_ENTRY, \
+ &Info, sizeof(RT_SET_ASIC_WCID)); \
+}
+
+/* ----------------- Security Related MACRO ----------------- */
+
+/* Set Asic WCID Attribute table */
+#define RTMP_SET_WCID_SEC_INFO(_pAd, _BssIdx, _KeyIdx, _CipherAlg, _Wcid, _KeyTabFlag) \
+{ \
+ RT_ASIC_WCID_SEC_INFO Info; \
+ \
+ Info.BssIdx = _BssIdx; \
+ Info.KeyIdx = _KeyIdx; \
+ Info.CipherAlg = _CipherAlg; \
+ Info.Wcid = _Wcid; \
+ Info.KeyTabFlag = _KeyTabFlag; \
+ \
+ RTEnqueueInternalCmd(_pAd, CMDTHREAD_SET_WCID_SEC_INFO, \
+ &Info, sizeof(RT_ASIC_WCID_SEC_INFO)); \
+}
+
+/* Set Asic WCID IV/EIV table */
+#define RTMP_ASIC_WCID_IVEIV_TABLE(_pAd, _Wcid, _uIV, _uEIV) \
+{ \
+ RT_ASIC_WCID_IVEIV_ENTRY Info; \
+ \
+ Info.Wcid = _Wcid; \
+ Info.Iv = _uIV; \
+ Info.Eiv = _uEIV; \
+ \
+ RTEnqueueInternalCmd(_pAd, CMDTHREAD_SET_ASIC_WCID_IVEIV, \
+ &Info, \
+ sizeof(RT_ASIC_WCID_IVEIV_ENTRY)); \
+}
+
+/* Set Asic WCID Attribute table */
+#define RTMP_ASIC_WCID_ATTR_TABLE(_pAd, _BssIdx, _KeyIdx, _CipherAlg, _Wcid, _KeyTabFlag) \
+{ \
+ RT_ASIC_WCID_ATTR_ENTRY Info; \
+ \
+ Info.BssIdx = _BssIdx; \
+ Info.KeyIdx = _KeyIdx; \
+ Info.CipherAlg = _CipherAlg; \
+ Info.Wcid = _Wcid; \
+ Info.KeyTabFlag = _KeyTabFlag; \
+ \
+ RTEnqueueInternalCmd(_pAd, CMDTHREAD_SET_ASIC_WCID_ATTR, \
+ &Info, sizeof(RT_ASIC_WCID_ATTR_ENTRY)); \
+}
+
+/* Set Asic Pairwise key table */
+#define RTMP_ASIC_PAIRWISE_KEY_TABLE(_pAd, _WCID, _pCipherKey) \
+{ \
+ RT_ASIC_PAIRWISE_KEY Info; \
+ \
+ Info.WCID = _WCID; \
+ NdisMoveMemory(&Info.CipherKey, _pCipherKey, sizeof(CIPHER_KEY)); \
+ \
+ RTEnqueueInternalCmd(_pAd, CMDTHREAD_SET_ASIC_PAIRWISE_KEY, \
+ &Info, sizeof(RT_ASIC_PAIRWISE_KEY)); \
+}
+
+/* Set Asic Shared key table */
+#define RTMP_ASIC_SHARED_KEY_TABLE(_pAd, _BssIndex, _KeyIdx, _pCipherKey) \
+{ \
+ RT_ASIC_SHARED_KEY Info; \
+ \
+ Info.BssIndex = _BssIndex; \
+ Info.KeyIdx = _KeyIdx; \
+ NdisMoveMemory(&Info.CipherKey, _pCipherKey, sizeof(CIPHER_KEY)); \
+ \
+ RTEnqueueInternalCmd(_pAd, CMDTHREAD_SET_ASIC_SHARED_KEY, \
+ &Info, sizeof(RT_ASIC_SHARED_KEY)); \
+}
+
+
+/* Remove Pairwise Key table */
+#define RTMP_REMOVE_PAIRWISE_KEY_ENTRY(_pAd, _Wcid) \
+{ \
+ UCHAR _tWcid =_Wcid; \
+ RTEnqueueInternalCmd(_pAd, CMDTHREAD_REMOVE_PAIRWISE_KEY, &(_tWcid), sizeof(UCHAR));\
+}
+
+#define RTMP_OS_IRQ_RELEASE(_pAd, _NetDev)
+
+#endif /*__MAC_USB_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac.h
new file mode 100644
index 0000000000..93ebcca523
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac.h
@@ -0,0 +1,782 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_nmac.h
+
+ Abstract:
+ Ralink Wireless Chip RAL MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_NMAC_H__
+#define __RAL_NMAC_H__
+
+
+#include "rtmp_type.h"
+
+#ifdef MT7601
+#include "mac_ral/omac/ral_omac_rxwi.h"
+#else
+#include "mac_ral/nmac/ral_nmac_rxwi.h"
+#endif /* MT7601 */
+
+#include "mac_ral/nmac/ral_nmac_txwi.h"
+
+enum INFO_TYPE {
+ NORMAL_PACKET,
+ CMD_PACKET,
+};
+
+enum D_PORT {
+ WLAN_PORT,
+ CPU_RX_PORT,
+ CPU_TX_PORT,
+ HOST_PORT,
+ VIRTUAL_CPU_RX_PORT,
+ VIRTUAL_CPU_TX_PORT,
+ DISCARD,
+};
+
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _TXINFO_NMAC_PKT{
+ UINT32 info_type:2;
+ UINT32 d_port:3;
+ UINT32 QSEL:2;
+ UINT32 wiv:1;
+ UINT32 rsv1:2;
+ UINT32 cso:1;
+ UINT32 tso:1;
+ UINT32 pkt_80211:1;
+ UINT32 rsv0:1;
+ UINT32 tx_burst:1;
+ UINT32 next_vld:1;
+ UINT32 pkt_len:16;
+}TXINFO_NMAC_PKT;
+#else
+typedef struct GNU_PACKED _TXINFO_NMAC_PKT {
+ UINT32 pkt_len:16;
+ UINT32 next_vld:1;
+ UINT32 tx_burst:1;
+ UINT32 rsv0:1;
+ UINT32 pkt_80211:1;
+ UINT32 tso:1;
+ UINT32 cso:1;
+ UINT32 rsv1:2;
+ UINT32 wiv:1;
+ UINT32 QSEL:2;
+ UINT32 d_port:3;
+ UINT32 info_type:2;
+}TXINFO_NMAC_PKT;
+#endif /* RT_BIG_ENDIAN */
+
+#define TxInfoWIV txinfo_nmac_pkt.wiv
+#define TxInfoQSEL txinfo_nmac_pkt.QSEL
+#define TxInfoPktLen txinfo_nmac_pkt.pkt_len
+#define TxInfoSwLstRnd txinfo_nmac_pkt.rsv0
+#define TxInfoUDMATxburst txinfo_nmac_pkt.tx_burst
+#define TxInfoUDMANextVld txinfo_nmac_pkt.next_vld
+#define TxInfoPKT_80211 txinfo_nmac_pkt.pkt_80211
+#define TxInfoCSO txinfo_nmac_pkt.cso
+#define TxInfoTSO txinfo_nmac_pkt.tso
+
+
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _TXINFO_NMAC_CMD{
+ UINT32 info_type:2;
+ UINT32 d_port:3;
+ UINT32 cmd_type:7;
+ UINT32 cmd_seq:4;
+ UINT32 pkt_len:16;
+}TXINFO_NMAC_CMD;
+#else
+typedef struct GNU_PACKED _TXINFO_NMAC_CMD{
+ UINT32 pkt_len:16;
+ UINT32 cmd_seq:4;
+ UINT32 cmd_type:7;
+ UINT32 d_port:3;
+ UINT32 info_type:2;
+}TXINFO_NMAC_CMD;
+#endif /* RT_BIG_ENDIAN */
+
+
+typedef union GNU_PACKED _TXINFO_NMAC{
+ struct _TXINFO_NMAC_PKT txinfo_pkt;
+ struct _TXINFO_NMAC_CMD txinfo_cmd;
+}TXINFO_NMAC;
+
+
+/*
+ Rx Memory layout:
+
+ 1. Rx Descriptor
+ Rx Descriptor(12 Bytes) + RX_FCE_Info(4 Bytes)
+ 2. Rx Buffer
+ RxInfo(4 Bytes) + RXWI() + 802.11 packet
+*/
+
+
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXFCE_INFO{
+ UINT32 info_type:2;
+ UINT32 s_port:3;
+ UINT32 qsel:2;
+ UINT32 pcie_intr:1;
+
+ UINT32 mac_len:3;
+ UINT32 l3l4_done:1;
+ UINT32 pkt_80211:1;
+ UINT32 ip_err:1;
+ UINT32 tcp_err:1;
+ UINT32 udp_err:1;
+
+ UINT32 rsv:2;
+ UINT32 pkt_len:14;
+}RXFCE_INFO;
+#else
+typedef struct GNU_PACKED _RXFCE_INFO{
+ UINT32 pkt_len:14;
+ UINT32 rsv:2;
+
+ UINT32 udp_err:1;
+ UINT32 tcp_err:1;
+ UINT32 ip_err:1;
+ UINT32 pkt_80211:1;
+ UINT32 l3l4_done:1;
+ UINT32 mac_len:3;
+
+ UINT32 pcie_intr:1;
+ UINT32 qsel:2;
+ UINT32 s_port:3;
+ UINT32 info_type:2;
+}RXFCE_INFO;
+#endif /* RT_BIG_ENDIAN */
+
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXFCE_INFO_CMD{
+ UINT32 info_type:2;
+ UINT32 d_port:3;
+ UINT32 qsel:2;
+ UINT32 pcie_intr:1;
+ UINT32 evt_type:4;
+ UINT32 cmd_seq:4;
+ UINT32 self_gen:1;
+ UINT32 rsv:1;
+ UINT32 pkt_len:14;
+}RXFCE_INFO_CMD;
+#else
+typedef struct GNU_PACKED _RXFCE_INFO_CMD{
+ UINT32 pkt_len:14;
+ UINT32 rsv:1;
+ UINT32 self_gen:1;
+ UINT32 cmd_seq:4;
+ UINT32 evt_type:4;
+ UINT32 pcie_intr:1;
+ UINT32 qsel:2;
+ UINT32 d_port:3;
+ UINT32 info_type:2;
+}RXFCE_INFO_CMD;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXINFO_NMAC{
+ UINT32 ic_err:1;
+ UINT32 tc_err:1;
+ UINT32 ichk_bps:1;
+ UINT32 tchk_bps:1;
+ UINT32 rsv0:6;
+ UINT32 pn_len:3;
+ UINT32 wapi_kid:1;
+ UINT32 bssid_idx3:1;
+ UINT32 dec:1;
+ UINT32 ampdu:1;
+ UINT32 l2pad:1;
+ UINT32 rssi:1;
+ UINT32 htc:1;
+ UINT32 amsdu:1;
+ UINT32 mic_err:1;
+ UINT32 icv_err:1;
+ UINT32 crc_err:1;
+ UINT32 mybss:1;
+ UINT32 bc:1;
+ UINT32 mc:1;
+ UINT32 u2me:1;
+ UINT32 frag:1;
+ UINT32 null:1;
+ UINT32 data:1;
+ UINT32 ba:1;
+}RXINFO_NMAC;
+#else
+typedef struct GNU_PACKED _RXINFO_NMAC{
+ UINT32 ba:1;
+ UINT32 data:1;
+ UINT32 null:1;
+ UINT32 frag:1;
+ UINT32 u2me:1;
+ UINT32 mcast:1;
+ UINT32 bcast:1;
+ UINT32 mybss:1;
+ UINT32 crc_err:1;
+ UINT32 icv_err:1;
+ UINT32 mic_err:1;
+ UINT32 amsdu:1;
+ UINT32 htc:1;
+ UINT32 rssi:1;
+ UINT32 l2pad:1;
+ UINT32 ampdu:1;
+ UINT32 dec:1;
+ UINT32 bssid_idx3:1;
+ UINT32 wapi_kid:1;
+ UINT32 pn_len:3;
+ UINT32 rsv0:6;
+ UINT32 tchk_bps:1;
+ UINT32 ichk_bps:1;
+ UINT32 tc_err:1;
+ UINT32 ic_err:1;
+}RXINFO_NMAC;
+#endif /* RT_BIG_ENDIAN */
+
+
+/* ================================================================================= */
+/* Register format */
+/* ================================================================================= */
+
+
+#define WLAN_FUN_CTRL 0x80
+#ifdef RT_BIG_ENDIAN
+typedef union _WLAN_FUN_CTRL_STRUC{
+ struct{
+ UINT32 GPIO0_OUT_OE_N:8;
+ UINT32 GPIO0_OUT:8;
+ UINT32 GPIO0_IN:8;
+ UINT32 WLAN_ACC_BT:1;
+ UINT32 INV_TR_SW0:1;
+ UINT32 FRC_WL_ANT_SET:1;
+ UINT32 PCIE_APP0_CLK_REQ:1;
+ UINT32 WLAN_RESET:1;
+ UINT32 WLAN_RESET_RF:1;
+ UINT32 WLAN_CLK_EN:1;
+ UINT32 WLAN_EN:1;
+ }field;
+ UINT32 word;
+}WLAN_FUN_CTRL_STRUC, *PWLAN_FUN_CTRL_STRUC;
+#else
+typedef union _WLAN_FUN_CTRL_STRUC{
+ struct{
+ UINT32 WLAN_EN:1;
+ UINT32 WLAN_CLK_EN:1;
+ UINT32 WLAN_RESET_RF:1;
+ UINT32 WLAN_RESET:1;
+ UINT32 PCIE_APP0_CLK_REQ:1;
+ UINT32 FRC_WL_ANT_SET:1;
+ UINT32 INV_TR_SW0:1;
+ UINT32 WLAN_ACC_BT:1;
+ UINT32 GPIO0_IN:8;
+ UINT32 GPIO0_OUT:8;
+ UINT32 GPIO0_OUT_OE_N:8;
+ }field;
+ UINT32 word;
+}WLAN_FUN_CTRL_STRUC, *PWLAN_FUN_CTRL_STRUC;
+#endif
+
+
+#define WLAN_FUN_INFO 0x84
+#ifdef RT_BIG_ENDIAN
+typedef union _WLAN_FUN_INFO_STRUC{
+ struct{
+ UINT32 BT_EEP_BUSY:1; /* Read-only for WLAN Driver */
+ UINT32 Rsv1:26;
+ UINT32 COEX_MODE:5; /* WLAN function enable */
+ }field;
+ UINT32 word;
+}WLAN_FUN_INFO_STRUC, *PWLAN_FUN_INFO_STRUC;
+#else
+typedef union _WLAN_FUN_INFO_STRUC{
+ struct{
+ UINT32 COEX_MODE:5; /* WLAN function enable */
+ UINT32 Rsv1:26;
+ UINT32 BT_EEP_BUSY:1; /* Read-only for WLAN Driver */
+ }field;
+ UINT32 word;
+}WLAN_FUN_INFO_STRUC, *PWLAN_FUN_INFO_STRUC;
+#endif
+
+
+#define BT_FUN_CTRL 0xC0
+#ifdef RT_BIG_ENDIAN
+typedef union _BT_FUN_CTRL_STRUC{
+ struct{
+ UINT32 GPIO1_OUT_OE_N:8;
+ UINT32 GPIO1_OUT:8;
+ UINT32 GPIO1_IN:8;
+ UINT32 BT_ACC_WLAN:1;
+ UINT32 INV_TR_SW1:1;
+ UINT32 URXD_GPIO_MODE:1;
+ UINT32 PCIE_APP1_CLK_REQ:1;
+ UINT32 BT_RESET:1;
+ UINT32 BT_RF_EN:1;
+ UINT32 BT_CLK_EN:1;
+ UINT32 BT_EN:1;
+ }field;
+ UINT32 word;
+}BT_FUN_CTRL_STRUC, *PBT_FUN_CTRL_STRUC;
+#else
+typedef union _BT_FUN_CTRL_STRUC {
+ struct{
+ UINT32 BT_EN:1;
+ UINT32 BT_CLK_EN:1;
+ UINT32 BT_RF_EN:1;
+ UINT32 BT_RESET:1;
+ UINT32 PCIE_APP1_CLK_REQ:1;
+ UINT32 URXD_GPIO_MODE:1;
+ UINT32 INV_TR_SW1:1;
+ UINT32 BT_ACC_WLAN:1;
+ UINT32 GPIO1_IN:8;
+ UINT32 GPIO1_OUT:8;
+ UINT32 GPIO1_OUT_OE_N:8;
+ }field;
+ UINT32 word;
+}BT_FUN_CTRL_STRUC, *PBT_FUN_CTRL_STRUC;
+#endif
+
+
+#define BT_FUN_INFO 0xC4
+#ifdef RT_BIG_ENDIAN
+typedef union _BT_FUN_INFO_STRUC{
+ struct{
+ UINT32 WLAN_EEP_BUSY:1;
+ UINT32 BTPower1:7; /* Peer */
+ UINT32 BTPower0:8; /* Self */
+ UINT32 AFH_END_CH:8;
+ UINT32 AFH_START_CH:8;
+ }field;
+ UINT32 word;
+} BT_FUN_INFO_STRUC, *PBT_FUN_INFO_STRUC;
+#else
+typedef union _BT_FUN_INFO_STRUC {
+ struct{
+ UINT32 AFH_START_CH:8;
+ UINT32 AFH_END_CH:8;
+ UINT32 BTPower0:8; /* Self */
+ UINT32 BTPower1:7; /* Peer */
+ UINT32 WLAN_EEP_BUSY:1;
+ }field;
+ UINT32 word;
+}BT_FUN_INFO_STRUC, *PBT_FUN_INFO_STRUC;
+#endif
+
+// TODO: shiang, this data structure is not defined for register. may can move to other place
+typedef struct _WLAN_BT_COEX_SETTING
+{
+ BOOLEAN ampduOff;
+ BOOLEAN coexSettingRunning;
+ BOOLEAN RateSelectionForceToUseRSSI;
+ UCHAR TxQualityFlag;
+ ULONG alc;
+ ULONG slna;
+}WLAN_BT_COEX_SETTING, *PWLAN_BT_COEX_SETTING;
+
+
+#define MCU_CMD_CFG 0x0234
+
+
+#define TSO_CTRL 0x0250
+#ifdef RT_BIG_ENDIAN
+typedef union _TSO_CTRL_STRUC {
+ struct {
+ UINT32 rsv:13;
+ UINT32 TSO_WR_LEN_EN:1;
+ UINT32 TSO_SEG_EN:1;
+ UINT32 TSO_EN:1;
+ UINT32 RXWI_LEN:4;
+ UINT32 RX_L2_FIX_LEN:4;
+ UINT32 TXWI_LEN:4;
+ UINT32 TX_L2_FIX_LEN:4;
+ } field;
+ UINT32 word;
+} TSO_CTRL_STRUC;
+#else
+typedef union _TSO_CTRL_STRUC {
+ struct {
+ UINT32 TX_L2_FIX_LEN:4;
+ UINT32 TXWI_LEN:4;
+ UINT32 RX_L2_FIX_LEN:4;
+ UINT32 RXWI_LEN:4;
+ UINT32 TSO_EN:1;
+ UINT32 TSO_SEG_EN:1;
+ UINT32 TSO_WR_LEN_EN:1;
+ UINT32 rsv:13;
+ } field;
+ UINT32 word;
+} TSO_CTRL_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+
+#define TX_FBK_LIMIT 0x1398
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_FBK_LIMIT_STRUC {
+ struct {
+ UINT32 rsv:13;
+ UINT32 TX_RATE_LUT_EN:1;
+ UINT32 TX_AMPDU_UP_CLEAR:1;
+ UINT32 TX_MPDU_UP_CLEAR:1;
+ UINT32 TX_AMPDU_FBK_LIMIT:8;
+ UINT32 TX_MPDU_FBK_LIMIT:8;
+ } field;
+ UINT32 word;
+} TX_FBK_LIMIT_STRUC;
+#else
+typedef union _TX_FBK_LIMIT_STRUC {
+ struct {
+ UINT32 TX_MPDU_FBK_LIMIT:8;
+ UINT32 TX_AMPDU_FBK_LIMIT:8;
+ UINT32 TX_MPDU_UP_CLEAR:1;
+ UINT32 TX_AMPDU_UP_CLEAR:1;
+ UINT32 TX_RATE_LUT_EN:1;
+ UINT32 rsv:13;
+ } field;
+ UINT32 word;
+} TX_FBK_LIMIT_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+#define TX_PROT_CFG6 0x13E0 // VHT 20 Protection
+#define TX_PROT_CFG7 0x13E4 // VHT 40 Protection
+#define TX_PROT_CFG8 0x13E8 // VHT 80 Protection
+#define PIFS_TX_CFG 0x13EC // PIFS setting
+
+
+//----------------------------------------------------------------
+// Header Translation
+//----------------------------------------------------------------
+
+/*
+ WIFI INFO for TX translation
+ |TXINO|TXWI|WIFI INFO|802.3 MAC Header|Pyaload|
+*/
+
+#define WIFI_INFO_SIZE 4
+#ifdef RT_BIG_ENDIAN
+typedef union GNU_PACKED _WIFI_INFO_STRUC {
+ struct {
+ UINT32 More_Data:1;
+ UINT32 WEP:1;
+ UINT32 PS:1;
+ UINT32 RDG:1;
+ UINT32 QoS:1;
+ UINT32 EOSP:1;
+ UINT32 TID:4;
+ UINT32 Mode:2;
+ UINT32 VLAN:1;
+ UINT32 Rsv:3;
+ UINT32 BssIdx:4;
+ UINT32 Seq_Num:12;
+ } field;
+ UINT32 word;
+} WIFI_INFO_STRUC, *PWIFI_INFO_STRUC;
+#else
+typedef union GNU_PACKED _WIFI_INFO_STRUC {
+ struct {
+ UINT32 Seq_Num:12;
+ UINT32 BssIdx:4;
+ UINT32 Rsv:3;
+ UINT32 VLAN:1;
+ UINT32 Mode:2;
+ UINT32 TID:4;
+ UINT32 EOSP:1;
+ UINT32 QoS:1;
+ UINT32 RDG:1;
+ UINT32 PS:1;
+ UINT32 WEP:1;
+ UINT32 More_Data:1;
+ } field;
+ UINT32 word;
+} WIFI_INFO_STRUC, *PWIFI_INFO_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+/*
+ header translation control register
+ bit0 --> TX translation enable
+ bit1 --> RX translation enable
+*/
+#define HEADER_TRANS_CTRL_REG 0x0260
+#define HT_TX_ENABLE 0x1
+#define HT_RX_ENABLE 0x2
+
+#define HT_MAC_ADDR_DW0 0x02A4
+#define HT_MAC_ADDR_DW1 0x02A8
+#define HT_MAC_BSSID_DW0 0x02AC
+#define HT_MAC_BSSID_DW1 0x02B0
+
+#ifdef RT_BIG_ENDIAN
+typedef union GNU_PACKED _HDR_TRANS_CTRL_STRUC {
+ struct {
+ UINT32 Rsv:30;
+ UINT32 Rx_En:1;
+ UINT32 Tx_En:1;
+ } field;
+ UINT32 word;
+} HDR_TRANS_CTRL_STRUC, *PHDR_TRANS_CTRL_STRUC;
+#else
+typedef union GNU_PACKED _HDR_TRANS_CTRL_STRUC {
+ struct {
+ UINT32 Tx_En:1;
+ UINT32 Rx_En:1;
+ UINT32 Rsv:30;
+ } field;
+ UINT32 word;
+} HDR_TRANS_CTRL_STRUC, *PHDR_TRANS_CTRL_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+/* RX header translation enable by WCID */
+#define HT_RX_WCID_EN_BASE 0x0264
+#define HT_RX_WCID_OFFSET 32
+#if defined(MT7601)
+#define HT_RX_WCID_SIZE (HT_RX_WCID_OFFSET * 4) /* 128 WCIDs */
+#elif defined(RT65xx)
+#define HT_RX_WCID_SIZE (HT_RX_WCID_OFFSET * 8) /* 256 WCIDs */
+#endif /* defined(RT63xx) */
+#ifdef RT_BIG_ENDIAN
+typedef union GNU_PACKED _HT_RX_WCID_EN_STRUC {
+ struct {
+ UINT32 RX_WCID31_TRAN_EN:1;
+ UINT32 RX_WCID30_TRAN_EN:1;
+ UINT32 RX_WCID29_TRAN_EN:1;
+ UINT32 RX_WCID28_TRAN_EN:1;
+ UINT32 RX_WCID27_TRAN_EN:1;
+ UINT32 RX_WCID26_TRAN_EN:1;
+ UINT32 RX_WCID25_TRAN_EN:1;
+ UINT32 RX_WCID24_TRAN_EN:1;
+ UINT32 RX_WCID23_TRAN_EN:1;
+ UINT32 RX_WCID22_TRAN_EN:1;
+ UINT32 RX_WCID21_TRAN_EN:1;
+ UINT32 RX_WCID20_TRAN_EN:1;
+ UINT32 RX_WCID19_TRAN_EN:1;
+ UINT32 RX_WCID18_TRAN_EN:1;
+ UINT32 RX_WCID17_TRAN_EN:1;
+ UINT32 RX_WCID16_TRAN_EN:1;
+ UINT32 RX_WCID15_TRAN_EN:1;
+ UINT32 RX_WCID14_TRAN_EN:1;
+ UINT32 RX_WCID13_TRAN_EN:1;
+ UINT32 RX_WCID12_TRAN_EN:1;
+ UINT32 RX_WCID11_TRAN_EN:1;
+ UINT32 RX_WCID10_TRAN_EN:1;
+ UINT32 RX_WCID9_TRAN_EN:1;
+ UINT32 RX_WCID8_TRAN_EN:1;
+ UINT32 RX_WCID7_TRAN_EN:1;
+ UINT32 RX_WCID6_TRAN_EN:1;
+ UINT32 RX_WCID5_TRAN_EN:1;
+ UINT32 RX_WCID4_TRAN_EN:1;
+ UINT32 RX_WCID3_TRAN_EN:1;
+ UINT32 RX_WCID2_TRAN_EN:1;
+ UINT32 RX_WCID1_TRAN_EN:1;
+ UINT32 RX_WCID0_TRAN_EN:1;
+ } field;
+ UINT32 word;
+} HT_RX_WCID_EN_STRUC, *PHT_RX_WCID_EN_STRUC;
+#else
+typedef union GNU_PACKED _HT_RX_WCID_EN_STRUC {
+ struct {
+ UINT32 RX_WCID0_TRAN_EN:1;
+ UINT32 RX_WCID1_TRAN_EN:1;
+ UINT32 RX_WCID2_TRAN_EN:1;
+ UINT32 RX_WCID3_TRAN_EN:1;
+ UINT32 RX_WCID4_TRAN_EN:1;
+ UINT32 RX_WCID5_TRAN_EN:1;
+ UINT32 RX_WCID6_TRAN_EN:1;
+ UINT32 RX_WCID7_TRAN_EN:1;
+ UINT32 RX_WCID8_TRAN_EN:1;
+ UINT32 RX_WCID9_TRAN_EN:1;
+ UINT32 RX_WCID10_TRAN_EN:1;
+ UINT32 RX_WCID11_TRAN_EN:1;
+ UINT32 RX_WCID12_TRAN_EN:1;
+ UINT32 RX_WCID13_TRAN_EN:1;
+ UINT32 RX_WCID14_TRAN_EN:1;
+ UINT32 RX_WCID15_TRAN_EN:1;
+ UINT32 RX_WCID16_TRAN_EN:1;
+ UINT32 RX_WCID17_TRAN_EN:1;
+ UINT32 RX_WCID18_TRAN_EN:1;
+ UINT32 RX_WCID19_TRAN_EN:1;
+ UINT32 RX_WCID20_TRAN_EN:1;
+ UINT32 RX_WCID21_TRAN_EN:1;
+ UINT32 RX_WCID22_TRAN_EN:1;
+ UINT32 RX_WCID23_TRAN_EN:1;
+ UINT32 RX_WCID24_TRAN_EN:1;
+ UINT32 RX_WCID25_TRAN_EN:1;
+ UINT32 RX_WCID26_TRAN_EN:1;
+ UINT32 RX_WCID27_TRAN_EN:1;
+ UINT32 RX_WCID28_TRAN_EN:1;
+ UINT32 RX_WCID29_TRAN_EN:1;
+ UINT32 RX_WCID30_TRAN_EN:1;
+ UINT32 RX_WCID31_TRAN_EN:1;
+ } field;
+ UINT32 word;
+} HT_RX_WCID_EN_STRUC, *PHT_RX_WCID_EN_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+/* RX header translation - black list */
+#define HT_RX_BL_BASE 0x0284
+#define HT_RX_BL_OFFSET 2
+#define HT_RX_BL_SIZE 8
+#ifdef RT_BIG_ENDIAN
+typedef union GNU_PACKED _HT_RX_BLACK_LIST_STRUC {
+ struct {
+ UINT32 BLACK_ETHER_TYPE1:16;
+ UINT32 BLACK_ETHER_TYPE0:16;
+ } field;
+ UINT32 word;
+} HT_RX_BLACK_LIST_STRUC, *PHT_RX_BLACK_LIST_STRUC;
+#else
+typedef union GNU_PACKED _HT_RX_BLACK_LIST_STRUC {
+ struct {
+ UINT32 BLACK_ETHER_TYPE0:16;
+ UINT32 BLACK_ETHER_TYPE1:16;
+ } field;
+ UINT32 word;
+} HT_RX_BLACK_LIST_STRUC, *PHT_RX_BLACK_LIST_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+/* RX VLAN Mapping (TCI) */
+#define HT_BSS_VLAN_BASE 0x0294
+#define HT_BSS_VLAN_OFFSET 2
+#define HT_BSS_VLAN_SIZE 8
+#ifdef RT_BIG_ENDIAN
+typedef union GNU_PACKED _HT_BSS_VLAN_STRUC {
+ struct {
+ UINT32 TCI1_VID:12;
+ UINT32 TCI1_CFI:1;
+ UINT32 TCI1_PCP:3;
+ UINT32 TCI0_VID:12;
+ UINT32 TCI0_CFI:1;
+ UINT32 TCI0_PCP:3;
+ } field;
+ UINT32 word;
+} HT_BSS_VLAN_STRUC, *PHT_BSS_VLAN_STRUC;
+#else
+typedef union GNU_PACKED _HT_BSS_VLAN_STRUC {
+ struct {
+ UINT32 TCI0_PCP:3;
+ UINT32 TCI0_CFI:1;
+ UINT32 TCI0_VID:12;
+ UINT32 TCI1_PCP:3;
+ UINT32 TCI1_CFI:1;
+ UINT32 TCI1_VID:12;
+ } field;
+ UINT32 word;
+} HT_BSS_VLAN_STRUC, *PHT_BSS_VLAN_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+
+// TODO: shiang-6590, following definitions are dummy and not used for RT6590, shall remove/correct these!
+#define GPIO_CTRL_CFG 0x0228
+#define PBF_MAX_PCNT 0x0408 //actually, it's the TX_MAX_PCNT
+// TODO:shiang-6590 --------------------------
+
+#define PAIRWISE_KEY_TABLE_BASE 0x8000 /* 32-byte * 256-entry = -byte */
+#define HW_KEY_ENTRY_SIZE 0x20
+
+#define PAIRWISE_IVEIV_TABLE_BASE 0xa000 /* 8-byte * 256-entry = -byte */
+#define MAC_IVEIV_TABLE_BASE 0xa000 /* 8-byte * 256-entry = -byte */
+#define HW_IVEIV_ENTRY_SIZE 8
+
+#define MAC_WCID_ATTRIBUTE_BASE 0xa800 /* 4-byte * 256-entry = -byte */
+#define HW_WCID_ATTRI_SIZE 4
+
+#define SHARED_KEY_TABLE_BASE 0xac00 /* 32-byte * 16-entry = 512-byte */
+#define SHARED_KEY_MODE_BASE 0xb000 /* 32-byte * 16-entry = 512-byte */
+
+#define HW_SHARED_KEY_MODE_SIZE 4
+#define SHAREDKEYTABLE 0
+#define PAIRWISEKEYTABLE 1
+
+/* This resgiser is ONLY be supported for RT3883 or later.
+ It conflicted with BCN#0 offset of previous chipset. */
+#define WAPI_PN_TABLE_BASE 0xb800
+#define WAPI_PN_ENTRY_SIZE 8
+
+#define RF_MISC 0x0518
+#ifdef RT_BIG_ENDIAN
+typedef union _RF_MISC_STRUC{
+ struct{
+ UINT32 Rsv1:29;
+ UINT32 EXT_PA_EN:1;
+ UINT32 ADDAC_LDO_ADC9_EN:1;
+ UINT32 ADDAC_LDO_ADC6_EN:1;
+ }field;
+ UINT32 word;
+}RF_MISC_STRUC, *PRF_MISC_STRUC;
+#else
+typedef union _RF_MISC_STRUC{
+ struct{
+ UINT32 ADDAC_LDO_ADC6_EN:1;
+ UINT32 ADDAC_LDO_ADC9_EN:1;
+ UINT32 EXT_PA_EN:1;
+ UINT32 Rsv1:29;
+ }field;
+ UINT32 word;
+}RF_MISC_STRUC, *PRF_MISC_STRUC;
+#endif
+
+VOID ral_wlan_chip_onoff(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN BOOLEAN bOn,
+ IN BOOLEAN bResetWLAN);
+
+#ifdef MT7601
+VOID MT7601_WLAN_ChipOnOff(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN BOOLEAN bOn,
+ IN BOOLEAN bResetWLAN);
+#endif /* MT7601 */
+
+#define AUX_CLK_CFG 0x120C
+#define BB_PA_MODE_CFG0 0x1214
+#define BB_PA_MODE_CFG1 0x1218
+#define RF_PA_MODE_CFG0 0x121C
+#define RF_PA_MODE_CFG1 0x1220
+#define TX_ALC_CFG_0 0x13B0
+#define TX_ALC_CFG_1 0x13B4
+
+#define TX0_RF_GAIN_CORR 0x13A0
+#define TX0_RF_GAIN_ATTEN 0x13A8
+#define TX0_BB_GAIN_ATTEN 0x13C0
+#define TX_ALC_VGA3 0x13C8
+
+
+#if defined(RT65xx) || defined(MT7601)
+#define RESET_CTL 0x070C
+#define INT_LEVEL 0x0718
+#define COM_REG0 0x0730
+#define COM_REG1 0x0734
+#define COM_REG2 0x0738
+#define COM_REG3 0x073C
+#define PCIE_REMAP_BASE1 0x0740
+#define PCIE_REMAP_BASE2 0x0744
+#define PCIE_REMAP_BASE3 0x0748
+#define PCIE_REMAP_BASE4 0x074C
+#define LED_CTRL 0x0770
+#define LED_TX_BLINK_0 0x0774
+#define LED_TX_BLINK_1 0x0778
+#define LED0_S0 0x077C
+#define LED0_S1 0x0780
+#define SEMAPHORE_00 0x07B0
+#endif /* RT65xx */
+#endif /* __RAL_NMAC_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pbf.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pbf.h
new file mode 100644
index 0000000000..7e85dcd498
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pbf.h
@@ -0,0 +1,139 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_nmac_pbf.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_NMAC_PBF_H__
+#define __RAL_NMAC_PBF_H__
+
+
+
+/* ================================================================================= */
+/* Register format for PBF */
+/* ================================================================================= */
+
+
+/* Most are for debug. Driver doesn't touch PBF register. */
+#define PBF_SYS_CTRL 0x0400
+
+#ifdef RT_BIG_ENDIAN
+typedef union _PBF_SYS_CTRL_STRUC {
+ struct {
+ UINT32 rsv5:7; /* Reserved */
+ UINT32 CSR_TEST_EN:1;
+ UINT32 MAC_CLKSEL:2; /* MAC clock selection */
+ UINT32 PWRSV_EN:2;
+ UINT32 SHRM_SEL:1; /* Shared memory access selection */
+ UINT32 PBF_MSEL:2; /* Packet buffer memory access selection */
+ UINT32 rsv4:5;
+ UINT32 PBF_CLK_EN:1; /* PBF clock enable */
+ UINT32 MAC_CLK_EN:1; /* MAC clock enable */
+ UINT32 rsv3:6;
+ UINT32 PBF_RESET:1; /* PBF hardware reset */
+ UINT32 MAC_RESET:1; /* MAC hardware reset */
+ UINT32 rsv:2;
+ } field;
+ UINT32 word;
+} PBF_SYS_CTRL_STRUC;
+#else
+typedef union _PBF_SYS_CTRL_STRUC{
+ struct {
+ UINT32 rsv5:7; /* Reserved */
+ UINT32 CSR_TEST_EN:1;
+ UINT32 MAC_CLKSEL:2; /* MAC clock selection */
+ UINT32 PWRSV_EN:2;
+ UINT32 SHRM_SEL:1; /* Shared memory access selection */
+ UINT32 PBF_MSEL:2; /* Packet buffer memory access selection */
+ UINT32 rsv4:5;
+ UINT32 PBF_CLK_EN:1; /* PBF clock enable */
+ UINT32 MAC_CLK_EN:1; /* MAC clock enable */
+ UINT32 rsv3:6;
+ UINT32 PBF_RESET:1; /* PBF hardware reset */
+ UINT32 MAC_RESET:1; /* MAC hardware reset */
+ UINT32 rsv:2;
+ }field;
+ UINT32 word;
+} PBF_SYS_CTRL_STRUC;
+#endif
+
+
+#define PBF_CFG 0x0404
+#define TX_MAX_PCNT 0x0408
+#define RX_MAX_PCNT 0x040c
+#define PBF_CTRL 0x0410
+#define RXQ_STA 0x0430
+#define TXQ_STA 0x0434
+
+#define BCN_OFFSET0 0x041c
+#define BCN_OFFSET1 0x0420
+#define BCN_OFFSET2 0x0424
+#define BCN_OFFSET3 0x0428
+
+
+#define FCE_CTRL 0x0800
+#define FCE_PARAM 0x0804
+#define CHECKSUM_OFFLOAD 0x0808
+
+#ifdef RT_BIG_ENDIAN
+typedef union _CSO_CTRL_STRUC {
+ struct {
+ UINT32 rsv:21;
+ UINT32 stamp_seq_num_en:1;
+ UINT32 cso_bigendian:1;
+ UINT32 cso_en:1;
+ UINT32 tx_ipv6_en:1;
+ UINT32 tx_ipv4_cs_gen:1;
+ UINT32 tx_tcp_cs_gen:1;
+ UINT32 tx_udp_cs_gen:1;
+ UINT32 rx_ipv6_en:1;
+ UINT32 rx_ipv4_cs_en:1;
+ UINT32 rx_tcp_cs_en:1;
+ UINT32 rx_udp_cs_en:1;
+ } field;
+ UINT32 word;
+} CSO_CTRL_STRUC;
+#else
+typedef union _CSO_CTRL_STRUC{
+ struct {
+ UINT32 rx_udp_cs_en:1;
+ UINT32 rx_tcp_cs_en:1;
+ UINT32 rx_ipv4_cs_en:1;
+ UINT32 rx_ipv6_en:1;
+ UINT32 tx_udp_cs_gen:1;
+ UINT32 tx_tcp_cs_gen:1;
+ UINT32 tx_ipv4_cs_gen:1;
+ UINT32 tx_ipv6_en:1;
+ UINT32 cso_en:1;
+ UINT32 cso_bigendian:1;
+ UINT32 stamp_seq_num_en:1;
+ UINT32 rsv:21;
+ }field;
+ UINT32 word;
+} CSO_CTRL_STRUC;
+#endif
+
+#endif /* __RAL_NMAC_PBF_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pci.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pci.h
new file mode 100644
index 0000000000..e6ba8c7550
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_pci.h
@@ -0,0 +1,368 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ ral_nmac_pci.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RAL_NMAC_PCI_H__
+#define __RAL_NMAC_PCI_H__
+
+
+
+/* INT_SOURCE_CSR: Interrupt source register. Write one to clear corresponding bit */
+#define INT_SOURCE_CSR 0x200
+
+
+#define INT_R0_DONE (1<<0)
+#define INT_R1_DONE (1<<1)
+#define INT_T0_DONE (1<<4)
+#define INT_T1_DONE (1<<5)
+#define INT_T2_DONE (1<<6)
+#define INT_T3_DONE (1<<7)
+#define INT_T4_DONE (1<<8)
+#define INT_T5_DONE (1<<9)
+#define INT_T6_DONE (1<<10)
+#define INT_T7_DONE (1<<11)
+#define INT_T8_DONE (1<<12)
+#define INT_T9_DONE (1<<13)
+#define INT_RESVD ((1<<14) | (1<<15))
+#define INT_RX_COHE (1<<16)
+#define INT_TX_COHE (1<<17)
+#define INT_ANY_COH (1<<18)
+#define INT_MCU_CMD (1<<19)
+#define INT_TBTT_ISR (1<<20)
+#define INT_PRE_TBTT (1<<21)
+#define INT_TX_STAT (1<<22)
+#define INT_AUTO_WAKE (1<<23)
+#define INT_GP_TIMER (1<<24)
+#define INT_RESVD_2 (1<<25)
+#define INT_RX_DLY (1<<26)
+#define INT_TX_DLY (1<<27)
+#ifdef CARRIER_DETECTION_SUPPORT
+// TODO: shiang-6590, for 6590, what's the interrupt bit for TONE_RADAR?? now just give a reseved bit
+#define RT2860_INT_TONE_RADAR (1<<29)
+#endif /* CARRIER_DETECTION_SUPPORT*/
+
+ /* Delayed Rx or indivi rx */
+#define RxINT (INT_R0_DONE | INT_R1_DONE /* | INT_RX_DLY */)
+/* Delayed Tx or indivi tx */
+#define TxDataInt (INT_T0_DONE | INT_T1_DONE | INT_T2_DONE | INT_T3_DONE /*| INT_TX_DLY*/)
+
+#ifdef RT8592
+#define TxMgmtInt (INT_T5_DONE /*| INT_TX_DLY*/)
+#else
+#define TxMgmtInt (INT_T9_DONE /*| INT_TX_DLY*/)
+#endif /* RT8592 */
+
+#define RxCoherent INT_RX_COHE
+#define TxCoherent INT_TX_COHE
+#define TxRxCoherent INT_ANY_COH
+
+/* mcu */
+#define McuCommand INT_MCU_CMD
+#define PreTBTTInt INT_PRE_TBTT
+#define TBTTInt INT_TBTT_ISR
+
+/* fifo statistics full interrupt */
+#define FifoStaFullInt INT_TX_STAT
+
+/* AutoWakeupInt interrupt */
+#define AutoWakeupInt INT_AUTO_WAKE
+
+/* GPtimeout interrupt */
+#define GPTimeOutInt INT_GP_TIMER
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#define RadarInt (RT2860_INT_TONE_RADAR)
+#endif /* CARRIER_DETECTION_SUPPORT*/
+
+#define INT_RX (INT_R0_DONE | INT_R1_DONE)
+
+#define INT_AC0_DLY (INT_T0_DONE)
+#define INT_AC1_DLY (INT_T1_DONE)
+#define INT_AC2_DLY (INT_T2_DONE)
+#define INT_AC3_DLY (INT_T3_DONE)
+#ifdef RT8592
+#define INT_HCCA_DLY (INT_T4_DONE)
+#define INT_MGMT_DLY (INT_T5_DONE)
+#else
+#define INT_HCCA_DLY (INT_T8_DONE)
+#define INT_MGMT_DLY (INT_T9_DONE)
+#endif /* RT8592 */
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#define INT_TONE_RADAR (RT2860_INT_TONE_RADAR)
+#endif /* CARRIER_DETECTION_SUPPORT*/
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#define DELAYINTMASK (0x0DFF3FF3 | (RadarInt))
+#define INTMASK (0x0DFF3FF3 | (RadarInt))
+#else
+#define DELAYINTMASK 0x0DFF3FF3
+#define INTMASK 0x0DFF3FF3
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _INT_SOURCE_CSR_STRUC {
+ struct {
+ UINT32 rsv1:4;
+ UINT32 TxDelayINT:1;
+ UINT32 RxDelayINT:1;
+ UINT32 rsv2:1;
+ UINT32 GPTimer:1;
+ UINT32 AutoWakeup:1;
+ UINT32 TXFifoStatusInt:1;
+ UINT32 PreTBTT:1;
+ UINT32 tbttInt:1;
+ UINT32 MCUCommandINT:1;
+ UINT32 trCoherent:1;
+ UINT32 txCoherent:1;
+ UINT32 rxCoherent:1;
+ UINT32 rsv3:2;
+ UINT32 TxDone9:1;
+ UINT32 TxDone8:1;
+ UINT32 TxDone7:1;
+ UINT32 TxDone6:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac0DmaDone:1;
+ UINT32 rsv4:2;
+ UINT32 RxDone1:1;
+ UINT32 RxDone:1;
+ }field;
+ UINT32 word;
+}INT_SOURCE_CSR_STRUC;
+#else
+typedef union _INT_SOURCE_CSR_STRUC {
+ struct {
+ UINT32 RxDone:1;
+ UINT32 RxDone1:1;
+ UINT32 rsv4:2;
+ UINT32 Ac0DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 TxDone6:1;
+ UINT32 TxDone7:1;
+ UINT32 TxDone8:1;
+ UINT32 TxDone9:1;
+ UINT32 rsv3:2;
+ UINT32 rxCoherent:1;
+ UINT32 txCoherent:1;
+ UINT32 trCoherent:1;
+ UINT32 MCUCommandINT:1;
+ UINT32 tbttInt:1;
+ UINT32 PreTBTT:1;
+ UINT32 TXFifoStatusInt:1;
+ UINT32 AutoWakeup:1;
+ UINT32 GPTimer:1;
+ UINT32 rsv2:1;
+ UINT32 RxDelayINT:1;
+ UINT32 TxDelayINT:1;
+ UINT32 rsv1:4;
+ }field;
+ UINT32 word;
+}INT_SOURCE_CSR_STRUC;
+#endif /* RT_BIG_ENDIAN */
+
+
+/* INT_MASK_CSR: Interrupt MASK register. 1: the interrupt is mask OFF */
+#define INT_MASK_CSR 0x204
+#ifdef RT_BIG_ENDIAN
+typedef union _PDMA_INT_MASK{
+ struct {
+ UINT32 rsv1:4;
+ UINT32 TxDelayINT:1;
+ UINT32 RxDelayINT:1;
+ UINT32 rsv2:1;
+ UINT32 GPTimer:1;
+ UINT32 AutoWakeup:1;
+ UINT32 TXFifoStatusInt:1;
+ UINT32 PreTBTT:1;
+ UINT32 tbttInt:1;
+ UINT32 MCUCommandINT:1;
+ UINT32 trCoherent:1;
+ UINT32 txCoherent:1;
+ UINT32 rxCoherent:1;
+ UINT32 rsv3:2;
+ UINT32 TxDone9:1;
+ UINT32 TxDone8:1;
+ UINT32 TxDone7:1;
+ UINT32 TxDone6:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac0DmaDone:1;
+ UINT32 rsv4:2;
+ UINT32 RxDone1:1;
+ UINT32 RxDone:1;
+ }field;
+ UINT32 word;
+}PMDA_INT_MASK;
+#else
+typedef union _PDMA_INT_MASK{
+ struct {
+ UINT32 RxDone:1;
+ UINT32 RxDone1:1;
+ UINT32 rsv4:2;
+ UINT32 Ac0DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 TxDone6:1;
+ UINT32 TxDone7:1;
+ UINT32 TxDone8:1;
+ UINT32 TxDone9:1;
+ UINT32 rsv3:2;
+ UINT32 rxCoherent:1;
+ UINT32 txCoherent:1;
+ UINT32 trCoherent:1;
+ UINT32 MCUCommandINT:1;
+ UINT32 tbttInt:1;
+ UINT32 PreTBTT:1;
+ UINT32 TXFifoStatusInt:1;
+ UINT32 AutoWakeup:1;
+ UINT32 GPTimer:1;
+ UINT32 rsv2:1;
+ UINT32 RxDelayINT:1;
+ UINT32 TxDelayINT:1;
+ UINT32 rsv1:4;
+ }field;
+ UINT32 word;
+}PMDA_INT_MASK;
+#endif /* RT_BIG_ENDIAN */
+
+
+/*
+ Tx Ring Layout and assignments
+
+ Totally we have 10 Tx Rings and assigned as following usage:
+ 1. RT85592
+ TxRing 0~3: for TxQ Channel 1 with AC_BK/BE/VI/VO
+ TxRing 4 : for TxQ CTRL
+ TxRing 5 : for TxQ MGMT
+ TxRing 6~9: for TxQ Channel 2 with AC_BK/BE/VI/VO
+
+ 2. MT7650
+ TxRing 0~3: for TxQ Channel 1 with AC_BK/BE/VI/VO
+ TxRing 4~7: for TxQ Channel 2 with AC_BK/BE/VI/VO
+ TxRing 8 : for TxQ CTRL
+ TxRing 9 : for TxQ MGMT
+
+ For each TxRing, we have four register to control it
+ TX_RINGn_CTRL0 (0x0): base address of this ring(4-DWORD aligned address)
+ TX_RINGn_CTRL1 (0x4): maximum number of TxD count in this ring
+ TX_RINGn_CTRL2 (0x8): Point to the next TxD CPU wants to use
+ TX_RINGn_CTRL3 (0xc): Point to the next TxD DMA wants to use
+
+*/
+#define RINGREG_DIFF 0x10
+#define TX_RING_BASE 0x0300
+#define TX_RING_NUM 10
+#define TX_RING_PTR 0x0300
+#define TX_RING_CNT 0x0304
+#define TX_RING_CIDX 0x0308
+#define TX_RING_DIDX 0x030c
+
+#ifdef RT8592
+#define TX_MGMT_BASE (TX_RING_BASE + RINGREG_DIFF * 5)
+#else
+/* Mgmt Tx Ring registers */
+#define TX_MGMT_BASE (TX_RING_BASE + RINGREG_DIFF * 9)
+#endif /* RT8592 */
+#define TX_MGMT_CNT (TX_MGMT_BASE + 0x04)
+#define TX_MGMT_CIDX (TX_MGMT_BASE + 0x08)
+#define TX_MGMT_DIDX (TX_MGMT_BASE + 0x0c)
+
+#ifdef RT8592
+#define TX_CTRL_BASE (TX_RING_BASE + RINGREG_DIFF * 4)
+#else
+/* Mgmt Tx Ring registers */
+#define TX_CTRL_BASE (TX_RING_BASE + RINGREG_DIFF * 8)
+#endif /* RT8592 */
+#define TX_CTRL_CNT (TX_CTRL_BASE + 0x04)
+#define TX_CTRL_CIDX (TX_CTRL_BASE + 0x08)
+#define TX_CTRL_DIDX (TX_CTRL_BASE + 0x0c)
+
+
+#define TX_CHAN_BASE_1 (TX_RING_BASE + RINGREG_DIFF * 0)
+#define TX_CHAN_BASE_2 (TX_RING_BASE + RINGREG_DIFF * 6)
+
+/* following address is base on TX_CHAN_BASE_X */
+#define TX_RING_BK_BASE 0x0
+#define TX_RING_BK_CNT (TX_RING_BK_BASE + 0x04)
+#define TX_RING_BK_CIDX (TX_RING_BK_BASE + 0x08)
+#define TX_RING_BK_DIDX (TX_RING_BK_BASE + 0x0c)
+
+#define TX_RING_BE_BASE (TX_RING_BK_BASE + RINGREG_DIFF)
+#define TX_RING_BE_CNT (TX_RING_BE_BASE + 0x04)
+#define TX_RING_BE_CIDX (TX_RING_BE_BASE + 0x08)
+#define TX_RING_BE_DIDX (TX_RING_BE_BASE + 0x0c)
+
+#define TX_RING_VI_BASE (TX_RING_BE_BASE + RINGREG_DIFF)
+#define TX_RING_VI_CNT (TX_RING_VI_BASE + 0x04)
+#define TX_RING_VI_CIDX (TX_RING_VI_BASE + 0x08)
+#define TX_RING_VI_DIDX (TX_RING_VI_BASE + 0x0c)
+
+#define TX_RING_VO_BASE (TX_RING_VI_BASE + RINGREG_DIFF)
+#define TX_RING_VO_CNT (TX_RING_VO_BASE + 0x04)
+#define TX_RING_VO_CIDX (TX_RING_VO_BASE + 0x08)
+#define TX_RING_VO_DIDX (TX_RING_VO_BASE + 0x0c)
+
+
+/*
+ Rx Ring Layput and assignments
+
+ Totally we have 2 Rx Rings and assigned as following usage:
+ RxRing 0: for all received data packets
+ RxRing 1: for internal ctrl/info packets generated by on-chip CPU.
+
+ For each TxRing, we have four register to control it
+ RX_RING_CTRL0 (0x0): base address of this ring(4-DWORD aligned address)
+ RX_RING_CTRL1 (0x4): maximum number of RxD count in this ring
+ RX_RING_CTRL2 (0x8): Point to the next RxD CPU wants to use
+ RX_RING_CTRL3 (0xc): Point to the next RxD DMA wants to use
+*/
+#define RX_RING_BASE 0x03c0
+#define RX_RING_NUM 2
+#define RX_RING_PTR RX_RING_BASE
+#define RX_RING_CNT (RX_RING_BASE + 0x04)
+#define RX_RING_CIDX (RX_RING_BASE + 0x08)
+#define RX_RING_DIDX (RX_RING_BASE + 0x0c)
+#define RX_CTRL_BASE (RX_RING_BASE + RINGREG_DIFF)
+#define RX_CTRL_PTR RX_CTRL_BASE
+#define RX_CTRL_CNT (RX_CTRL_BASE + 0x04)
+#define RX_CTRL_CIDX (RX_CTRL_BASE + 0x08)
+#define RX_CTRL_DIDX (RX_CTRL_BASE + 0x0c)
+
+#endif /*__RAL_NMAC_PCI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_rxwi.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_rxwi.h
new file mode 100644
index 0000000000..9d1c62887a
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_rxwi.h
@@ -0,0 +1,117 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_nmac_rxwi.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_NMAC_RXWI_H__
+#define __RAL_NMAC_RXWI_H__
+
+#include "rtmp_type.h"
+
+/*
+ RXWI wireless information format.
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXWI_NMAC{
+ /* Word 0 */
+ UINT32 eof:1;
+ UINT32 rsv:1;
+ UINT32 MPDUtotalByteCnt:14;
+ UINT32 udf:3;
+ UINT32 bss_idx:3;
+ UINT32 key_idx:2;
+ UINT32 wcid:8;
+
+ /* Word 1 */
+ UINT32 phy_mode:3;
+ UINT32 i_txbf:1;
+ UINT32 e_txbf:1;
+ UINT32 stbc:1;
+ UINT32 sgi:1;
+ UINT32 bw:2;
+ UINT32 mcs:7;
+ UINT32 sn:12;
+ UINT32 tid:4;
+
+ /* Word 2 */
+ UINT8 rssi[4];
+
+ /* Word 3~6 */
+ UINT8 bbp_rxinfo[16];
+} RXWI_NMAC;
+#else
+typedef struct GNU_PACKED _RXWI_NMAC {
+ /* Word 0 */
+ UINT32 wcid:8;
+ UINT32 key_idx:2;
+ UINT32 bss_idx:3;
+ UINT32 udf:3;
+ UINT32 MPDUtotalByteCnt:14;
+ UINT32 rsv:1;
+ UINT32 eof:1;
+
+ /* Word 1 */
+ UINT32 tid:4;
+ UINT32 sn:12;
+ UINT32 mcs:7;
+ UINT32 bw:2;
+ UINT32 sgi:1;
+ UINT32 stbc:1;
+ UINT32 e_txbf:1;
+ UINT32 i_txbf:1;
+ UINT32 phy_mode:3;
+
+ /* Word 2 */
+ UINT8 rssi[4];
+
+ /* Word 3~6 */
+ UINT8 bbp_rxinfo[16];
+} RXWI_NMAC;
+#endif /* RT_BIG_ENDIAN */
+
+
+#define RxWIMPDUByteCnt RXWI_N.MPDUtotalByteCnt
+#define RxWIWirelessCliID RXWI_N.wcid
+#define RxWIKeyIndex RXWI_N.key_idx
+#define RxWIMCS RXWI_N.mcs
+#define RxWIBW RXWI_N.bw
+#define RxWIBSSID RXWI_N.bss_idx
+#define RxWISGI RXWI_N.sgi
+#define RxWIPhyMode RXWI_N.phy_mode
+#define RxWISTBC RXWI_N.stbc
+#define RxWITID RXWI_N.tid
+#define RxWIRSSI0 RXWI_N.rssi[0]
+#define RxWIRSSI1 RXWI_N.rssi[1]
+#define RxWIRSSI2 RXWI_N.rssi[2]
+#define RxWISNR0 RXWI_N.bbp_rxinfo[0]
+#define RxWISNR1 RXWI_N.bbp_rxinfo[1]
+#define RxWISNR2 RXWI_N.bbp_rxinfo[2]
+#define RxWIFOFFSET RXWI_N.bbp_rxinfo[3]
+
+
+
+#endif /* __RAL_NMAC_RXWI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_txwi.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_txwi.h
new file mode 100644
index 0000000000..cb07fdf280
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_txwi.h
@@ -0,0 +1,249 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_nmac_txwi.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_NMAC_TXWI_H__
+#define __RAL_NMAC_TXWI_H__
+
+#include "rtmp_type.h"
+
+
+
+#ifdef RT65xx
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _TXWI_NMAC {
+ /* Word 0 */
+ UINT32 PHYMODE:3;
+ UINT32 iTxBF:1;
+ UINT32 eTxBF:1;
+ UINT32 STBC:1;
+ UINT32 ShortGI:1;
+ UINT32 BW:2; /* channel bandwidth 20/40/80 MHz */
+ UINT32 MCS:7;
+
+ UINT32 rsv0:2;
+ UINT32 Sounding:1;
+ UINT32 NDPSndBW:1; /* NDP sounding BW */
+ UINT32 NDPSndRate:2; /* 0 : MCS0, 1: MCS8, 2: MCS16, 3: reserved */
+ UINT32 txop:2;
+
+ UINT32 MpduDensity:3;
+ UINT32 AMPDU:1;
+ UINT32 TS:1;
+ UINT32 CFACK:1;
+ UINT32 MIMOps:1; /* the remote peer is in dynamic MIMO-PS mode */
+ UINT32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
+
+ /* Word 1 */
+ UINT32 Rsv1:2;
+ UINT32 MPDUtotalByteCnt:14;
+ UINT32 wcid:8;
+ UINT32 BAWinSize:6;
+ UINT32 NSEQ:1;
+ UINT32 ACK:1;
+
+ /* Word 2 */
+ UINT32 IV;
+ /* Word 3 */
+ UINT32 EIV;
+
+ /* Word 4 */
+ UINT32 TxPktId:8;
+ UINT32 Rsv4:4;
+ UINT32 TxPwrAdj:4;
+ UINT32 TxStreamMode:8;
+ UINT32 TxEAPId:8;
+} TXWI_NMAC, *PTXWI_NMAC;
+#else
+typedef struct GNU_PACKED _TXWI_NMAC {
+ /* Word 0 */
+ /* ex: 00 03 00 40 means txop = 3, PHYMODE = 1 */
+ UINT32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
+ UINT32 MIMOps:1; /* the remote peer is in dynamic MIMO-PS mode */
+ UINT32 CFACK:1;
+ UINT32 TS:1;
+ UINT32 AMPDU:1;
+ UINT32 MpduDensity:3;
+
+ UINT32 txop:2;
+ UINT32 NDPSndRate:2; /* 0 : MCS0, 1: MCS8, 2: MCS16, 3: reserved */
+ UINT32 NDPSndBW:1; /* NDP sounding BW */
+ UINT32 Sounding:1;
+ UINT32 rsv0:2;
+
+ UINT32 MCS:7;
+ UINT32 BW:2; /*channel bandwidth 20/40/80 MHz */
+ UINT32 ShortGI:1;
+ UINT32 STBC:1;
+ UINT32 eTxBF:1;
+ UINT32 iTxBF:1;
+ UINT32 PHYMODE:3;
+
+ /* Word1 */
+ /* ex: 1c ff 38 00 means ACK=0, BAWinSize=7, MPDUtotalByteCnt = 0x38 */
+ UINT32 ACK:1;
+ UINT32 NSEQ:1;
+ UINT32 BAWinSize:6;
+ UINT32 wcid:8;
+ UINT32 MPDUtotalByteCnt:14;
+ UINT32 Rsv1:2;
+
+ /*Word2 */
+ UINT32 IV;
+
+ /*Word3 */
+ UINT32 EIV;
+
+ /* Word 4 */
+ UINT32 TxEAPId:8;
+ UINT32 TxStreamMode:8;
+ UINT32 TxPwrAdj:4;
+ UINT32 Rsv4:4;
+ UINT32 TxPktId:8;
+} TXWI_NMAC, *PTXWI_NMAC;
+#endif /* RT_BIG_ENDIAN */
+#else
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _TXWI_NMAC {
+ /* Word 0 */
+ UINT32 PHYMODE:2;
+ UINT32 Rsv1:3;
+ UINT32 STBC:2;
+ UINT32 ShortGI:1;
+ UINT32 BW:1;
+ UINT32 MCS:7;
+
+ UINT32 TXLUT:1;
+ UINT32 TXRPT:1;
+ UINT32 Autofallback:1; /* TX rate auto fallback disable */
+ UINT32 CWMIN:3;
+ UINT32 txop:2;
+
+ UINT32 MpduDensity:3;
+ UINT32 AMPDU:1;
+ UINT32 TS:1;
+ UINT32 CFACK:1;
+ UINT32 MIMOps:1; /* the remote peer is in dynamic MIMO-PS mode */
+ UINT32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
+
+ /* Word 1 */
+ UINT32 TxPktId:4;
+ UINT32 MPDUtotalByteCnt:12;
+ UINT32 wcid:8;
+ UINT32 BAWinSize:6;
+ UINT32 NSEQ:1;
+ UINT32 ACK:1;
+
+ /* Word 2 */
+ UINT32 IV;
+ /* Word 3 */
+ UINT32 EIV;
+
+ /* Word 4 */
+ UINT32 Rsv3:9;
+ UINT32 PIFS_REV:1;
+ UINT32 Rsv2:1;
+ UINT32 CCP:1; /* Channel Check Packet */
+ UINT32 TxPwrAdj:4;
+ UINT32 TxStreamMode:8;
+ UINT32 TxEAPId:8;
+} TXWI_NMAC, *PTXWI_NMAC;
+#else
+typedef struct GNU_PACKED _TXWI_NMAC {
+ /* Word 0 */
+ /* ex: 00 03 00 40 means txop = 3, PHYMODE = 1 */
+ UINT32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
+ UINT32 MIMOps:1; /* the remote peer is in dynamic MIMO-PS mode */
+ UINT32 CFACK:1;
+ UINT32 TS:1;
+ UINT32 AMPDU:1;
+ UINT32 MpduDensity:3;
+
+ UINT32 txop:2;
+ UINT32 CWMIN:3;
+ UINT32 Autofallback:1; /* TX rate auto fallback disable */
+ UINT32 TXRPT:1;
+ UINT32 TXLUT:1;
+
+ UINT32 MCS:7;
+ UINT32 BW:1;
+ UINT32 ShortGI:1;
+ UINT32 STBC:2;
+ UINT32 Rsv1:3;
+ UINT32 PHYMODE:2;
+
+ /* Word1 */
+ /* ex: 1c ff 38 00 means ACK=0, BAWinSize=7, MPDUtotalByteCnt = 0x38 */
+ UINT32 ACK:1;
+ UINT32 NSEQ:1;
+ UINT32 BAWinSize:6;
+ UINT32 wcid:8;
+ UINT32 MPDUtotalByteCnt:12;
+ UINT32 TxPktId:4;
+
+ /*Word2 */
+ UINT32 IV;
+
+ /*Word3 */
+ UINT32 EIV;
+
+ /* Word 4 */
+ UINT32 TxEAPId:8;
+ UINT32 TxStreamMode:8;
+ UINT32 TxPwrAdj:4;
+ UINT32 CCP:1; /* Channel Check Packet */
+ UINT32 Rsv2:1;
+ UINT32 PIFS_REV:1;
+ UINT32 Rsv3:9;
+} TXWI_NMAC, *PTXWI_NMAC;
+#endif /* RT_BIG_ENDIAN */
+#endif /* RT65xx */
+
+#define TxWIMPDUByteCnt TXWI_N.MPDUtotalByteCnt
+#define TxWIWirelessCliID TXWI_N.wcid
+#define TxWIFRAG TXWI_N.FRAG
+#define TxWICFACK TXWI_N.CFACK
+#define TxWITS TXWI_N.TS
+#define TxWIAMPDU TXWI_N.AMPDU
+#define TxWIACK TXWI_N.ACK
+#define TxWITXOP TXWI_N.txop
+#define TxWINSEQ TXWI_N.NSEQ
+#define TxWIBAWinSize TXWI_N.BAWinSize
+#define TxWIShortGI TXWI_N.ShortGI
+#define TxWISTBC TXWI_N.STBC
+#define TxWIPacketId TXWI_N.TxPktId
+#define TxWIBW TXWI_N.BW
+#define TxWIMCS TXWI_N.MCS
+#define TxWIPHYMODE TXWI_N.PHYMODE
+#define TxWIMIMOps TXWI_N.MIMOps
+#define TxWIMpduDensity TXWI_N.MpduDensity
+#define TxWITXRPT TXWI_N.TXRPT
+#define TxWITXLUT TXWI_N.TXLUT
+
+
+#endif /* __RAL_NMAC_TXWI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_usb.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_usb.h
new file mode 100644
index 0000000000..cdaeef5241
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/nmac/ral_nmac_usb.h
@@ -0,0 +1,144 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ ral_omac_usb.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RAL_OMAC_USB_H__
+#define __RAL_OMAC_USB_H__
+#define CMB_CTRL 0x20
+#ifdef RT_BIG_ENDIAN
+typedef union _CMB_CTRL_STRUC{
+ struct{
+ UINT32 LDO0_EN:1;
+ UINT32 LDO3_EN:1;
+ UINT32 LDO_BGSEL:2;
+ UINT32 LDO_CORE_LEVEL:4;
+ UINT32 PLL_LD:1;
+ UINT32 XTAL_RDY:1;
+ UINT32 Rsv:2;
+ UINT32 LDO25_FRC_ON:1;//4
+ UINT32 LDO25_LARGEA:1;
+ UINT32 LDO25_LEVEL:2;
+ UINT32 AUX_OPT_Bit15_Two_AntennaMode:1;
+ UINT32 AUX_OPT_Bit14_TRSW1_as_GPIO:1;
+ UINT32 AUX_OPT_Bit13_GPIO7_as_GPIO:1;
+ UINT32 AUX_OPT_Bit12_TRSW0_as_WLAN_ANT_SEL:1;
+ UINT32 AUX_OPT_Bit11_Rsv:1;
+ UINT32 AUX_OPT_Bit10_NotSwap_WL_LED_ACT_RDY:1;
+ UINT32 AUX_OPT_Bit9_GPIO3_as_GPIO:1;
+ UINT32 AUX_OPT_Bit8_AuxPower_Exists:1;
+ UINT32 AUX_OPT_Bit7_KeepInterfaceClk:1;
+ UINT32 AUX_OPT_Bit6_KeepXtal_On:1;
+ UINT32 AUX_OPT_Bit5_RemovePCIePhyClk_BTOff:1;
+ UINT32 AUX_OPT_Bit4_RemovePCIePhyClk_WLANOff:1;
+ UINT32 AUX_OPT_Bit3_PLLOn_L1:1;
+ UINT32 AUX_OPT_Bit2_PCIeCoreClkOn_L1:1;
+ UINT32 AUX_OPT_Bit1_PCIePhyClkOn_L1:1;
+ UINT32 AUX_OPT_Bit0_InterfaceClk_40Mhz:1;
+ }field;
+ UINT32 word;
+}CMB_CTRL_STRUC, *PCMB_CTRL_STRUC;
+#else
+typedef union _CMB_CTRL_STRUC{
+ struct{
+ UINT32 AUX_OPT_Bit0_InterfaceClk_40Mhz:1;
+ UINT32 AUX_OPT_Bit1_PCIePhyClkOn_L1:1;
+ UINT32 AUX_OPT_Bit2_PCIeCoreClkOn_L1:1;
+ UINT32 AUX_OPT_Bit3_PLLOn_L1:1;
+ UINT32 AUX_OPT_Bit4_RemovePCIePhyClk_WLANOff:1;
+ UINT32 AUX_OPT_Bit5_RemovePCIePhyClk_BTOff:1;
+ UINT32 AUX_OPT_Bit6_KeepXtal_On:1;
+ UINT32 AUX_OPT_Bit7_KeepInterfaceClk:1;
+ UINT32 AUX_OPT_Bit8_AuxPower_Exists:1;
+ UINT32 AUX_OPT_Bit9_GPIO3_as_GPIO:1;
+ UINT32 AUX_OPT_Bit10_NotSwap_WL_LED_ACT_RDY:1;
+ UINT32 AUX_OPT_Bit11_Rsv:1;
+ UINT32 AUX_OPT_Bit12_TRSW0_as_WLAN_ANT_SEL:1;
+ UINT32 AUX_OPT_Bit13_GPIO7_as_GPIO:1;
+ UINT32 AUX_OPT_Bit14_TRSW1_as_GPIO:1;
+ UINT32 AUX_OPT_Bit15_Two_AntennaMode:1;
+ UINT32 LDO25_LEVEL:2;
+ UINT32 LDO25_LARGEA:1;
+ UINT32 LDO25_FRC_ON:1;//4
+ UINT32 Rsv:2;
+ UINT32 XTAL_RDY:1;
+ UINT32 PLL_LD:1;
+ UINT32 LDO_CORE_LEVEL:4;
+ UINT32 LDO_BGSEL:2;
+ UINT32 LDO3_EN:1;
+ UINT32 LDO0_EN:1;
+ }field;
+ UINT32 word;
+}CMB_CTRL_STRUC, *PCMB_CTRL_STRUC;
+#endif
+
+
+
+
+#define USB_DMA_CFG 0x0238
+#ifdef RT_BIG_ENDIAN
+typedef union _USB_DMA_CFG_STRUC {
+ struct {
+ UINT32 TxBusy:1; /*USB DMA TX FSM busy. debug only */
+ UINT32 RxBusy:1; /*USB DMA RX FSM busy. debug only */
+ UINT32 EpoutValid:3; /*OUT endpoint data valid. debug only */
+ UINT32 rsv3:1;
+ UINT32 UDMA_RX_WL_DROP:1; /* Drop current WL RX packets in UDMA */
+ UINT32 rsv2:1;
+ UINT32 TxBulkEn:1; /*Enable USB DMA Tx */
+ UINT32 RxBulkEn:1; /*Enable USB DMA Rx */
+ UINT32 RxBulkAggEn:1; /*Enable Rx Bulk Aggregation */
+ UINT32 TxopHalt:1; /*Halt TXOP count down when TX buffer is full. */
+ UINT32 TxClear:1; /*Clear USB DMA TX path */
+ UINT32 rsv1:2;
+ UINT32 phyclear:1; /*phy watch dog enable. write 1 */
+ UINT32 RxBulkAggLmt:8; /*Rx Bulk Aggregation Limit in unit of 1024 bytes */
+ UINT32 RxBulkAggTOut:8; /*Rx Bulk Aggregation TimeOut in unit of 33ns */
+ } field;
+ UINT32 word;
+} USB_DMA_CFG_STRUC, *PUSB_DMA_CFG_STRUC;
+#else
+typedef union _USB_DMA_CFG_STRUC {
+ struct {
+ UINT32 RxBulkAggTOut:8; /*Rx Bulk Aggregation TimeOut in unit of 33ns */
+ UINT32 RxBulkAggLmt:8; /*Rx Bulk Aggregation Limit in unit of 256 bytes */
+ UINT32 phyclear:1; /*phy watch dog enable. write 1 */
+ UINT32 rsv1:2;
+ UINT32 TxClear:1; /*Clear USB DMA TX path */
+ UINT32 TxopHalt:1; /*Halt TXOP count down when TX buffer is full. */
+ UINT32 RxBulkAggEn:1; /*Enable Rx Bulk Aggregation */
+ UINT32 RxBulkEn:1; /*Enable USB DMA Rx */
+ UINT32 TxBulkEn:1; /*Enable USB DMA Tx */
+ UINT32 rsv2:1;
+ UINT32 UDMA_RX_WL_DROP:1; /* Drop current WL RX packets in UDMA */
+ UINT32 rsv3:1;
+ UINT32 EpoutValid:3; /*OUT endpoint data valid */
+ UINT32 RxBusy:1; /*USB DMA RX FSM busy */
+ UINT32 TxBusy:1; /*USB DMA TX FSM busy */
+ } field;
+ UINT32 word;
+} USB_DMA_CFG_STRUC, *PUSB_DMA_CFG_STRUC;
+#endif
+
+#endif /*__RAL_OMAC_USB_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac.h
new file mode 100644
index 0000000000..ef54a7fdc5
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac.h
@@ -0,0 +1,168 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_omac.h
+
+ Abstract:
+ Ralink Wireless Chip RAL MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_OMAC_H__
+#define __RAL_OMAC_H__
+
+#include "rtmp_type.h"
+
+#include "mac_ral/omac/ral_omac_txwi.h"
+#include "mac_ral/omac/ral_omac_rxwi.h"
+
+/*
+ TXINFO
+*/
+
+/*
+ TXINFO fields defintion:
+
+ USBDMATxPktLen[b0~b14]:
+ Total bytes of all sub-frame. ONLY for USB bulk Aggregation
+ IPOffset[b15~b18]:
+ Start byte of IP packet. The base address is from TXINFO.
+ 0: header will be parsed by hardware.
+ This field is like backdoor.
+ For AMSDU, this field is useless
+
+ TCPOffset[b19~b23]:
+ Start byte of TCP packet from IP packet The base address is IP header.
+ 0: header will be parsed by hardware.
+ This field is like backdoor.
+ For AMSDU, this field is useless
+
+ WIV[b24]:
+ Wireless Info Valid.
+ 1: if Driver already fill WI
+ 0: if DMA needs to copy WI to correctposition
+
+ QSEL[b25~b26]:
+ Select on-chip FIFO ID for 2nd-stage output scheduler.
+ 0:MGMT, 1:HCCA 2:EDCA
+
+ SwUseLastRound[b27]:
+ Software used for USB-based chipset, reserved for other interfaces.
+
+ uso[b28]:
+ UDP checksum enable.
+ 1: indicate this packet needs to do UDP checksum
+
+ cso[b29]:
+ Checksum offload.
+ 1: indicate this packet needs to do checksum
+
+ USBDMANextVLD[b30]:
+ Used for USB-based chipset, reserved for other interfaces.
+ Used ONLY in USB bulk Aggregation, host driver info DMA current
+ frame is not he last frame in current Tx queue
+
+ USBDMATxburst[b31]:
+ force DMA transmit frame from current selected endpoint
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct _TXINFO_OMAC {
+ UINT32 USBDMATxburst:1;
+ UINT32 USBDMANextVLD:1;
+ UINT32 cso:1;
+ UINT32 uso:1;
+#ifdef USB_BULK_BUF_ALIGMENT
+ UINT32 bFragLasAlignmentsectiontRound:1;
+#else
+ UINT32 SwUseLastRound:1;
+#endif /* USB_BULK_BUF_ALIGMENT */
+ UINT32 QSEL:2;
+ UINT32 WIV:1;
+ UINT32 TCPOffset:5;
+ UINT32 IPOffset:4;
+ UINT32 USBDMATxPktLen:15;
+}TXINFO_OMAC;
+#else
+typedef struct _TXINFO_OMAC {
+ UINT32 USBDMATxPktLen:15;
+ UINT32 IPOffset:4;
+ UINT32 TCPOffset:5;
+ UINT32 WIV:1;
+ UINT32 QSEL:2;
+#ifdef USB_BULK_BUF_ALIGMENT
+ UINT32 bFragLasAlignmentsectiontRound:1;
+#else
+ UINT32 SwUseLastRound:1;
+#endif /* USB_BULK_BUF_ALIGMENT */
+ UINT32 uso:1;
+ UINT32 cso:1;
+ UINT32 USBDMANextVLD:1;
+ UINT32 USBDMATxburst:1;
+}TXINFO_OMAC;
+#endif /* RT_BIG_ENDIAN */
+
+
+#define TxInfoWIV txinfo_omac.WIV
+#define TxInfoQSEL txinfo_omac.QSEL
+#define TxInfoPktLen txinfo_omac.USBDMATxPktLen
+#define TxInfoSwLstRnd txinfo_omac.SwUseLastRound
+#define TxInfoUDMATxburst txinfo_omac.USBDMATxburst
+#define TxInfoUDMANextVld txinfo_omac.USBDMANextVLD
+#define TxInfoIPOffset txinfo_omac.IPOffset
+#define TxInfoTCPOffset txinfo_omac.TCPOffset
+#define TxInfoCSO txinfo_omac.cso
+#define TxInfoUSO txinfo_omac.uso
+
+
+
+
+/* ================================================================================= */
+/* Register format */
+/* ================================================================================= */
+
+#define GPIO_CTRL_CFG 0x0228
+#define MCU_CMD_CFG 0x022c
+
+
+#define PAIRWISE_KEY_TABLE_BASE 0x4000 /* 32-byte * 256-entry = -byte */
+#define HW_KEY_ENTRY_SIZE 0x20
+
+#define PAIRWISE_IVEIV_TABLE_BASE 0x6000 /* 8-byte * 256-entry = -byte */
+#define MAC_IVEIV_TABLE_BASE 0x6000 /* 8-byte * 256-entry = -byte */
+#define HW_IVEIV_ENTRY_SIZE 8
+
+#define MAC_WCID_ATTRIBUTE_BASE 0x6800 /* 4-byte * 256-entry = -byte */
+#define HW_WCID_ATTRI_SIZE 4
+
+#define SHARED_KEY_TABLE_BASE 0x6c00 /* 32-byte * 16-entry = 512-byte */
+#define SHARED_KEY_MODE_BASE 0x7000 /* 32-byte * 16-entry = 512-byte */
+
+#define HW_SHARED_KEY_MODE_SIZE 4
+#define SHAREDKEYTABLE 0
+#define PAIRWISEKEYTABLE 1
+
+/* This resgiser is ONLY be supported for RT3883 or later.
+ It conflicted with BCN#0 offset of previous chipset. */
+#define WAPI_PN_TABLE_BASE 0x7800
+#define WAPI_PN_ENTRY_SIZE 8
+
+#endif /* __RAL_OMAC_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pbf.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pbf.h
new file mode 100644
index 0000000000..46da17caa3
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pbf.h
@@ -0,0 +1,104 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_omac_pbf.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_OMAC_PBF_H__
+#define __RAL_OMAC_PBF_H__
+
+
+#include "rtmp_type.h"
+
+/* ================================================================================= */
+/* Register format for PBF */
+/* ================================================================================= */
+
+
+/* Most are for debug. Driver doesn't touch PBF register. */
+#define PBF_SYS_CTRL 0x0400
+
+#ifdef RT_BIG_ENDIAN
+typedef union _PBF_SYS_CTRL_STRUC {
+ struct {
+ UINT32 Reserved5:12; /* Reserved */
+ UINT32 SHR_MSEL:1; /* Shared memory access selection */
+ UINT32 PBF_MSEL:2; /* Packet buffer memory access selection */
+ UINT32 HST_PM_SEL:1; /* The write selection of the host program RAM */
+ UINT32 Reserved4:1; /* Reserved */
+ UINT32 CAP_MODE:1; /* Packet buffer capture mode */
+ UINT32 Reserved3:1; /* Reserved */
+ UINT32 CLK_SEL:1; /* MAC/PBF clock source selection */
+ UINT32 PBF_CLK_EN:1; /* PBF clock enable */
+ UINT32 MAC_CLK_EN:1; /* MAC clock enable */
+ UINT32 DMA_CLK_EN:1; /* DMA clock enable */
+ UINT32 Reserved2:1; /* Reserved */
+ UINT32 MCU_READY:1; /* MCU ready */
+ UINT32 Reserved1:2; /* Reserved */
+ UINT32 ASY_RESET:1; /* ASYNC interface reset */
+ UINT32 PBF_RESET:1; /* PBF hardware reset */
+ UINT32 MAC_RESET:1; /* MAC hardware reset */
+ UINT32 DMA_RESET:1; /* DMA hardware reset */
+ UINT32 MCU_RESET:1; /* MCU hardware reset */
+ } field;
+ UINT32 word;
+} PBF_SYS_CTRL_STRUC;
+#else
+typedef union _PBF_SYS_CTRL_STRUC {
+ struct {
+ UINT32 MCU_RESET:1;
+ UINT32 DMA_RESET:1;
+ UINT32 MAC_RESET:1;
+ UINT32 PBF_RESET:1;
+ UINT32 ASY_RESET:1;
+ UINT32 Reserved1:2;
+ UINT32 MCU_READY:1;
+ UINT32 Reserved2:1;
+ UINT32 DMA_CLK_EN:1;
+ UINT32 MAC_CLK_EN:1;
+ UINT32 PBF_CLK_EN:1;
+ UINT32 CLK_SEL:1;
+ UINT32 Reserved3:1;
+ UINT32 CAP_MODE:1;
+ UINT32 Reserved4:1;
+ UINT32 HST_PM_SEL:1;
+ UINT32 PBF_MSEL:2;
+ UINT32 SHR_MSEL:1;
+ UINT32 Reserved5:12;
+ }field;
+ UINT32 word;
+} PBF_SYS_CTRL_STRUC;
+#endif
+
+
+#define PBF_CFG 0x0408
+#define PBF_MAX_PCNT 0x040C
+#define PBF_CAP_CTRL 0x0440
+
+#define BCN_OFFSET0 0x042C
+#define BCN_OFFSET1 0x0430
+
+#endif /* __RAL_OMAC_PBF_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pci.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pci.h
new file mode 100644
index 0000000000..bf8d9e4a3a
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_pci.h
@@ -0,0 +1,270 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ ral_omac_pci.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RAL_OMAC_PCI_H__
+#define __RAL_OMAC_PCI_H__
+
+
+/* INT_SOURCE_CSR: Interrupt source register. Write one to clear corresponding bit */
+#define INT_SOURCE_CSR 0x200
+
+#define RxINT 0x00000005 /* Delayed Rx or indivi rx */
+#define TxDataInt 0x000000fa /* Delayed Tx or indivi tx */
+#define TxMgmtInt 0x00000102 /* Delayed Tx or indivi tx */
+#define TxCoherent 0x00020000 /* tx coherent */
+#define RxCoherent 0x00010000 /* rx coherent */
+#define TxRxCoherent 0x00000400 /* tx rx coherent */
+#define McuCommand 0x00000200 /* mcu */
+#define PreTBTTInt 0x00001000 /* Pre-TBTT interrupt */
+#define TBTTInt 0x00000800 /* TBTT interrupt */
+#define GPTimeOutInt 0x00008000 /* GPtimeout interrupt */
+#define AutoWakeupInt 0x00004000 /* AutoWakeupInt interrupt */
+#define FifoStaFullInt 0x00002000 /* fifo statistics full interrupt */
+
+
+
+#define RT2860_INT_RX_DLY (1<<0) /* bit 0 */
+#define RT2860_INT_TX_DLY (1<<1) /* bit 1 */
+#define RT2860_INT_RX_DONE (1<<2) /* bit 2 */
+#define RT2860_INT_AC0_DMA_DONE (1<<3) /* bit 3 */
+#define RT2860_INT_AC1_DMA_DONE (1<<4) /* bit 4 */
+#define RT2860_INT_AC2_DMA_DONE (1<<5) /* bit 5 */
+#define RT2860_INT_AC3_DMA_DONE (1<<6) /* bit 6 */
+#define RT2860_INT_HCCA_DMA_DONE (1<<7) /* bit 7 */
+#define RT2860_INT_MGMT_DONE (1<<8) /* bit 8 */
+#ifdef CARRIER_DETECTION_SUPPORT
+#define RT2860_INT_TONE_RADAR (1<<20) /* bit 20 */
+#endif /* CARRIER_DETECTION_SUPPORT*/
+
+#define INT_RX RT2860_INT_RX_DONE
+
+#define INT_AC0_DLY (RT2860_INT_AC0_DMA_DONE) /*| RT2860_INT_TX_DLY) */
+#define INT_AC1_DLY (RT2860_INT_AC1_DMA_DONE) /*| RT2860_INT_TX_DLY) */
+#define INT_AC2_DLY (RT2860_INT_AC2_DMA_DONE) /*| RT2860_INT_TX_DLY) */
+#define INT_AC3_DLY (RT2860_INT_AC3_DMA_DONE) /*| RT2860_INT_TX_DLY) */
+#define INT_HCCA_DLY (RT2860_INT_HCCA_DMA_DONE) /*| RT2860_INT_TX_DLY) */
+#define INT_MGMT_DLY RT2860_INT_MGMT_DONE
+#ifdef CARRIER_DETECTION_SUPPORT
+#define INT_TONE_RADAR (RT2860_INT_TONE_RADAR)
+#endif /* CARRIER_DETECTION_SUPPORT*/
+
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#define DELAYINTMASK 0x0013fffb
+#define INTMASK 0x0013fffb
+#define IndMask 0x0013fffc
+#define RadarInt 0x00100000
+#else
+#define DELAYINTMASK 0x0003fffb
+#define INTMASK 0x0003fffb
+#define IndMask 0x0003fffc
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _INT_SOURCE_CSR_STRUC {
+ struct {
+#ifdef CARRIER_DETECTION_SUPPORT
+ UINT32 :11;
+ UINT32 RadarINT:1;
+ UINT32 rsv:2;
+#else /* original source code */
+ UINT32 :14;
+#endif /* CARRIER_DETECTION_SUPPORT */
+ UINT32 TxCoherent:1;
+ UINT32 RxCoherent:1;
+ UINT32 GPTimer:1;
+ UINT32 AutoWakeup:1;/*bit14 */
+ UINT32 TXFifoStatusInt:1;/*FIFO Statistics is full, sw should read 0x171c */
+ UINT32 PreTBTT:1;
+ UINT32 TBTTInt:1;
+ UINT32 RxTxCoherent:1;
+ UINT32 MCUCommandINT:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac0DmaDone:1;
+ UINT32 RxDone:1;
+ UINT32 TxDelayINT:1; /*delayed interrupt, not interrupt until several int or time limit hit */
+ UINT32 RxDelayINT:1; /*dealyed interrupt */
+ }field;
+ UINT32 word;
+} INT_SOURCE_CSR_STRUC;
+#else
+typedef union _INT_SOURCE_CSR_STRUC {
+ struct {
+ UINT32 RxDelayINT:1;
+ UINT32 TxDelayINT:1;
+ UINT32 RxDone:1;
+ UINT32 Ac0DmaDone:1;/*4 */
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 HccaDmaDone:1; /* bit7 */
+ UINT32 MgmtDmaDone:1;
+ UINT32 MCUCommandINT:1;/*bit 9 */
+ UINT32 RxTxCoherent:1;
+ UINT32 TBTTInt:1;
+ UINT32 PreTBTT:1;
+ UINT32 TXFifoStatusInt:1;/*FIFO Statistics is full, sw should read 0x171c */
+ UINT32 AutoWakeup:1;/*bit14 */
+ UINT32 GPTimer:1;
+ UINT32 RxCoherent:1;/*bit16 */
+ UINT32 TxCoherent:1;
+#ifdef CARRIER_DETECTION_SUPPORT
+ UINT32 rsv:2;
+ UINT32 RadarINT:1;
+ UINT32 :11;
+#else
+ UINT32 :14;
+#endif /* CARRIER_DETECTION_SUPPORT */
+ } field;
+ UINT32 word;
+} INT_SOURCE_CSR_STRUC;
+#endif
+
+
+/* INT_MASK_CSR: Interrupt MASK register. 1: the interrupt is mask OFF */
+#define INT_MASK_CSR 0x204
+#ifdef RT_BIG_ENDIAN
+typedef union _INT_MASK_CSR_STRUC {
+ struct {
+ UINT32 TxCoherent:1;
+ UINT32 RxCoherent:1;
+#ifdef CARRIER_DETECTION_SUPPORT
+ UINT32 :9;
+ UINT32 RadarINT:1;
+ UINT32 rsv:10;
+#else
+ UINT32 :20;
+#endif /* CARRIER_DETECTION_SUPPORT */
+ UINT32 MCUCommandINT:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac0DmaDone:1;
+ UINT32 RxDone:1;
+ UINT32 TxDelay:1;
+ UINT32 RXDelay_INT_MSK:1;
+ } field;
+ UINT32 word;
+}INT_MASK_CSR_STRUC, *PINT_MASK_CSR_STRUC;
+#else
+typedef union _INT_MASK_CSR_STRUC {
+ struct {
+ UINT32 RXDelay_INT_MSK:1;
+ UINT32 TxDelay:1;
+ UINT32 RxDone:1;
+ UINT32 Ac0DmaDone:1;
+ UINT32 Ac1DmaDone:1;
+ UINT32 Ac2DmaDone:1;
+ UINT32 Ac3DmaDone:1;
+ UINT32 HccaDmaDone:1;
+ UINT32 MgmtDmaDone:1;
+ UINT32 MCUCommandINT:1;
+#ifdef CARRIER_DETECTION_SUPPORT
+ UINT32 rsv:10;
+ UINT32 RadarINT:1;
+ UINT32 :9;
+#else
+ UINT32 :20;
+#endif /* CARRIER_DETECTION_SUPPORT */
+ UINT32 RxCoherent:1;
+ UINT32 TxCoherent:1;
+ } field;
+ UINT32 word;
+} INT_MASK_CSR_STRUC, *PINT_MASK_CSR_STRUC;
+#endif
+
+
+#define RINGREG_DIFF 0x10
+#define TX_BASE_PTR0 0x0230 /*AC_BK base address */
+#define TX_MAX_CNT0 0x0234
+#define TX_CTX_IDX0 0x0238
+#define TX_DTX_IDX0 0x023c
+#define TX_BASE_PTR1 0x0240 /*AC_BE base address */
+#define TX_MAX_CNT1 0x0244
+#define TX_CTX_IDX1 0x0248
+#define TX_DTX_IDX1 0x024c
+#define TX_BASE_PTR2 0x0250 /*AC_VI base address */
+#define TX_MAX_CNT2 0x0254
+#define TX_CTX_IDX2 0x0258
+#define TX_DTX_IDX2 0x025c
+#define TX_BASE_PTR3 0x0260 /*AC_VO base address */
+#define TX_MAX_CNT3 0x0264
+#define TX_CTX_IDX3 0x0268
+#define TX_DTX_IDX3 0x026c
+#define TX_BASE_PTR4 0x0270 /*HCCA base address */
+#define TX_MAX_CNT4 0x0274
+#define TX_CTX_IDX4 0x0278
+#define TX_DTX_IDX4 0x027c
+#define TX_BASE_PTR5 0x0280 /*MGMT base address */
+#define TX_MAX_CNT5 0x0284
+#define TX_CTX_IDX5 0x0288
+#define TX_DTX_IDX5 0x028c
+#define TX_MGMTMAX_CNT TX_MAX_CNT5
+#define TX_MGMTCTX_IDX TX_CTX_IDX5
+#define TX_MGMTDTX_IDX TX_DTX_IDX5
+#define RX_BASE_PTR 0x0290 /*RX base address */
+#define RX_MAX_CNT 0x0294
+#define RX_CRX_IDX 0x0298
+#define RX_DRX_IDX 0x029c
+
+
+#define US_CYC_CNT 0x02a4
+#ifdef BIG_ENDIAN
+typedef union _US_CYC_CNT_STRUC {
+ struct {
+ UINT32 rsv2:7;
+ UINT32 TestEn:1;
+ UINT32 TestSel:8;
+ UINT32 rsv1:7;
+ UINT32 MiscModeEn:1;
+ UINT32 UsCycCnt:8;
+ } field;
+ UINT32 word;
+} US_CYC_CNT_STRUC;
+#else
+typedef union _US_CYC_CNT_STRUC {
+ struct {
+ UINT32 UsCycCnt:8;
+ UINT32 MiscModeEn:1;
+ UINT32 rsv1:7;
+ UINT32 TestSel:8;
+ UINT32 TestEn:1;
+ UINT32 rsv2:7;
+ } field;
+ UINT32 word;
+} US_CYC_CNT_STRUC;
+#endif
+
+
+#endif /*__RAL_OMAC_PCI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rf_ctrl.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rf_ctrl.h
new file mode 100644
index 0000000000..f41740eaed
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rf_ctrl.h
@@ -0,0 +1,92 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_omac_rf_ctrl.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_OMAC_RF_CTRL_H__
+#define __RAL_OMAC_RF_CTRL_H__
+
+
+
+/* ================================================================================= */
+/* Register format for RFCTRL */
+/* ================================================================================= */
+
+#define OSC_CTRL 0x5a4
+#define PCIE_PHY_TX_ATTENUATION_CTRL 0x05C8
+#define INTERNAL_1 0x05C8
+
+#ifdef RT_BIG_ENDIAN
+typedef union _INTERNAL_1_STRUCT
+{
+ struct
+ {
+ UINT32 Reserve1:10;
+ UINT32 CSO_RX_IPV6_CHKSUM_EN:1;
+ UINT32 CSO_TX_IPV6_CHKSUM_EN:1;
+ UINT32 CSO_HW_PARSE_TCP:1;
+ UINT32 CSO_HW_PARSE_IP:1;
+ UINT32 CSO_RX_CHKSUM_EN:1;
+ UINT32 CSO_TX_CHKSUM_EN:1;
+ UINT32 CSO_TIMEOUT_VALUE:4;
+ UINT32 PCIE_PHY_TX_ATTEN_EN:1;
+ UINT32 PCIE_PHY_TX_ATTEN_VALUE:3;
+ UINT32 Reserve2:7;
+ UINT32 RF_ISOLATION_ENABLE:1;
+ } field;
+
+ UINT32 word;
+} INTERNAL_1_STRUCT, *PINTERNAL_1_STRUCT;
+#else
+typedef union _TX_ATTENUATION_CTRL_STRUC {
+ struct
+ {
+ UINT32 RF_ISOLATION_ENABLE:1;
+ UINT32 Reserve2:7;
+ UINT32 PCIE_PHY_TX_ATTEN_VALUE:3;
+ UINT32 PCIE_PHY_TX_ATTEN_EN:1;
+ UINT32 CSO_TIMEOUT_VALUE:4;
+ UINT32 CSO_TX_CHKSUM_EN:1;
+ UINT32 CSO_RX_CHKSUM_EN:1;
+ UINT32 CSO_HW_PARSE_IP:1;
+ UINT32 CSO_HW_PARSE_TCP:1;
+ UINT32 CSO_TX_IPV6_CHKSUM_EN:1;
+ UINT32 CSO_RX_IPV6_CHKSUM_EN:1;
+ UINT32 Reserve1:10;
+ } field;
+
+ UINT32 word;
+} INTERNAL_1_STRUCT, *PINTERNAL_1_STRUCT;
+#endif
+
+#define LDO_CFG0 0x05d4
+#define GPIO_SWITCH 0x05dc
+
+#define DEBUG_INDEX 0x05e8
+
+
+#endif /* __RAL_OMAC_RF_CTRL_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rxwi.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rxwi.h
new file mode 100644
index 0000000000..e320901374
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_rxwi.h
@@ -0,0 +1,147 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_omac_rxwi.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_OMAC_RXWI_H__
+#define __RAL_OMAC_RXWI_H__
+
+#include "rtmp_type.h"
+
+/*
+ RXWI wireless information format, in PBF. invisible in driver.
+*/
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXWI_OMAC{
+ /* Word 0 */
+ UINT32 tid:4;
+ UINT32 MPDUtotalByteCnt:12;
+ UINT32 UDF:3;
+ UINT32 bss_idx:3;
+ UINT32 key_idx:2;
+ UINT32 wcid:8;
+
+ /* Word 1 */
+ UINT32 phy_mode:2; /* 1: this RX frame is unicast to me */
+ UINT32 iTxBF:1; /* iTxBF enable */
+ UINT32 Sounding:1; /* Sounding enable */
+ UINT32 eTxBF:1; /* eTxBF enable */
+ UINT32 stbc:2;
+ UINT32 sgi:1;
+ UINT32 bw:1;
+ UINT32 mcs:7;
+ UINT32 SEQUENCE:12;
+ UINT32 FRAG:4;
+
+ /* Word 2 */
+ UINT32 rsv1:8;
+ UINT32 RSSI2:8;
+ UINT32 RSSI1:8;
+ UINT32 RSSI0:8;
+
+ /* Word 3 */
+ UINT32 FOFFSET:8;
+ UINT32 SNR2:8;
+ UINT32 SNR1:8;
+ UINT32 SNR0:8;
+
+ UINT32 rsv3;
+
+#if defined(RT5592) || defined(MT7601)
+ /* Word 5 */
+ /* For Exper Antenna */
+ UINT32 rsv4:24;
+ UINT32 EANT_ID:8;
+#endif /* RT5592 */
+} RXWI_OMAC, *PRXWI_OMAC;
+#else
+typedef struct GNU_PACKED _RXWI_OMAC{
+ /* Word 0 */
+ UINT32 wcid:8;
+ UINT32 key_idx:2;
+ UINT32 bss_idx:3;
+ UINT32 UDF:3;
+ UINT32 MPDUtotalByteCnt:12;
+ UINT32 tid:4;
+
+ /* Word 1 */
+ UINT32 FRAG:4;
+ UINT32 SEQUENCE:12;
+ UINT32 mcs:7;
+ UINT32 bw:1;
+ UINT32 sgi:1;
+ UINT32 stbc:2;
+ UINT32 eTxBF:1; /* eTxBF enable */
+ UINT32 Sounding:1; /* Sounding enable */
+ UINT32 iTxBF:1; /* iTxBF enable */
+ UINT32 phy_mode:2; /* 1: this RX frame is unicast to me */
+
+ /*Word2 */
+ UINT32 RSSI0:8;
+ UINT32 RSSI1:8;
+ UINT32 RSSI2:8;
+ UINT32 rsv1:8;
+
+ /*Word3 */
+ UINT32 SNR0:8;
+ UINT32 SNR1:8;
+ UINT32 SNR2:8;
+ UINT32 FOFFSET:8;
+
+ UINT32 rsv3;
+
+#if defined(RT5592) || defined(MT7601)
+ /* Word 5 */
+ /* For Exper Antenna */
+ UINT32 EANT_ID:8;
+ UINT32 rsv4:24;
+#endif /* RT5592 */
+} RXWI_OMAC, *PRXWI_OMAC;
+#endif
+
+
+#define RxWIMPDUByteCnt RXWI_O.MPDUtotalByteCnt
+#define RxWIWirelessCliID RXWI_O.wcid
+#define RxWIKeyIndex RXWI_O.key_idx
+#define RxWIMCS RXWI_O.mcs
+#define RxWIBW RXWI_O.bw
+#define RxWISGI RXWI_O.sgi
+#define RxWIBSSID RXWI_O.bss_idx
+#define RxWIPhyMode RXWI_O.phy_mode
+#define RxWISTBC RXWI_O.stbc
+#define RxWITID RXWI_O.tid
+#define RxWIRSSI0 RXWI_O.RSSI0
+#define RxWIRSSI1 RXWI_O.RSSI1
+#define RxWIRSSI2 RXWI_O.RSSI2
+#define RxWISNR0 RXWI_O.SNR0
+#define RxWISNR1 RXWI_O.SNR1
+#define RxWISNR2 RXWI_O.SNR2
+#define RxWIFOFFSET RXWI_O.FOFFSET
+
+
+
+#endif /* __RAL_OMAC_RXWI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_txwi.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_txwi.h
new file mode 100644
index 0000000000..16410348f6
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_txwi.h
@@ -0,0 +1,143 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ ral_omac_txwi.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RAL_OMAC_TXWI_H__
+#define __RAL_OMAC_TXWI_H__
+
+
+#include "rtmp_type.h"
+
+
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _TXWI_OMAC {
+ /* Word 0 */
+ UINT32 PHYMODE:2;
+ UINT32 iTxBF:1; /* iTxBF enable */
+ UINT32 Sounding:1; /* Sounding enable */
+ UINT32 eTxBF:1; /* eTxBF enable */
+ UINT32 STBC:2; /*channel bandwidth 20MHz or 40 MHz */
+ UINT32 ShortGI:1;
+ UINT32 BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ UINT32 MCS:7;
+
+ UINT32 rsv:1;
+ UINT32 TXRPT:1;
+ UINT32 Autofallback:1; /* TX rate auto fallback disable */
+ UINT32 NDPSndBW:1; /* NDP sounding BW */
+ UINT32 NDPSndRate:2; /* 0 : MCS0, 1: MCS8, 2: MCS16, 3: reserved */
+ UINT32 txop:2;
+ UINT32 MpduDensity:3;
+ UINT32 AMPDU:1;
+
+ UINT32 TS:1;
+ UINT32 CFACK:1;
+ UINT32 MIMOps:1; /* the remote peer is in dynamic MIMO-PS mode */
+ UINT32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
+ /* Word 1 */
+ UINT32 PacketId:4;
+ UINT32 MPDUtotalByteCnt:12;
+ UINT32 wcid:8;
+ UINT32 BAWinSize:6;
+ UINT32 NSEQ:1;
+ UINT32 ACK:1;
+ /* Word 2 */
+ UINT32 IV;
+ /* Word 3 */
+ UINT32 EIV;
+
+ /* Word 4 */
+ /* For Expert Antenna */
+ UINT32 Reserved:11;
+ UINT32 CCP:1;
+ UINT32 TxPwrAdj:4;
+ UINT32 TxStreamMode:8;
+ UINT32 EncodedAntID:8;
+} TXWI_OMAC, *PTXWI_OMAC;
+#else
+typedef struct GNU_PACKED _TXWI_OMAC {
+ /* Word 0 */
+ /* ex: 00 03 00 40 means txop = 3, PHYMODE = 1 */
+ UINT32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
+ UINT32 MIMOps:1; /* the remote peer is in dynamic MIMO-PS mode */
+ UINT32 CFACK:1;
+ UINT32 TS:1;
+
+ UINT32 AMPDU:1;
+ UINT32 MpduDensity:3;
+ UINT32 txop:2; /*FOR "THIS" frame. 0:HT TXOP rule , 1:PIFS TX ,2:Backoff, 3:sifs only when previous frame exchange is successful. */
+ UINT32 NDPSndRate:2; /* 0 : MCS0, 1: MCS8, 2: MCS16, 3: reserved */
+ UINT32 NDPSndBW:1; /* NDP sounding BW */
+ UINT32 Autofallback:1; /* TX rate auto fallback disable */
+ UINT32 TXRPT:1;
+ UINT32 rsv:1;
+
+ UINT32 MCS:7;
+ UINT32 BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ UINT32 ShortGI:1;
+ UINT32 STBC:2; /* 1: STBC support MCS =0-7, 2,3 : RESERVE */
+ UINT32 eTxBF:1; /* eTxBF enable */
+ UINT32 Sounding:1; /* Sounding enable */
+ UINT32 iTxBF:1; /* iTxBF enable */
+ UINT32 PHYMODE:2;
+ /* Word1 */
+ /* ex: 1c ff 38 00 means ACK=0, BAWinSize=7, MPDUtotalByteCnt = 0x38 */
+ UINT32 ACK:1;
+ UINT32 NSEQ:1;
+ UINT32 BAWinSize:6;
+ UINT32 wcid:8;
+ UINT32 MPDUtotalByteCnt:12;
+ UINT32 PacketId:4;
+ /*Word2 */
+ UINT32 IV;
+ /*Word3 */
+ UINT32 EIV;
+
+} TXWI_OMAC, *PTXWI_OMAC;
+#endif
+
+
+#define TxWIMPDUByteCnt TXWI_O.MPDUtotalByteCnt
+#define TxWIWirelessCliID TXWI_O.wcid
+#define TxWIFRAG TXWI_O.FRAG
+#define TxWICFACK TXWI_O.CFACK
+#define TxWITS TXWI_O.TS
+#define TxWIAMPDU TXWI_O.AMPDU
+#define TxWIACK TXWI_O.ACK
+#define TxWITXOP TXWI_O.txop
+#define TxWINSEQ TXWI_O.NSEQ
+#define TxWIBAWinSize TXWI_O.BAWinSize
+#define TxWIShortGI TXWI_O.ShortGI
+#define TxWISTBC TXWI_O.STBC
+#define TxWIBW TXWI_O.BW
+#define TxWIMCS TXWI_O.MCS
+#define TxWIPHYMODE TXWI_O.PHYMODE
+#define TxWIMIMOps TXWI_O.MIMOps
+#define TxWIMpduDensity TXWI_O.MpduDensity
+
+#endif /* __RAL_OMAC_TXWI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_usb.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_usb.h
new file mode 100644
index 0000000000..e9e6a157ae
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/omac/ral_omac_usb.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ ral_omac_usb.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RAL_OMAC_USB_H__
+#define __RAL_OMAC_USB_H__
+
+
+#define USB_DMA_CFG 0x02a0
+#ifdef RT_BIG_ENDIAN
+typedef union _USB_DMA_CFG_STRUC {
+ struct {
+ UINT32 TxBusy:1; /*USB DMA TX FSM busy. debug only */
+ UINT32 RxBusy:1; /*USB DMA RX FSM busy. debug only */
+ UINT32 EpoutValid:6; /*OUT endpoint data valid. debug only */
+ UINT32 TxBulkEn:1; /*Enable USB DMA Tx */
+ UINT32 RxBulkEn:1; /*Enable USB DMA Rx */
+ UINT32 RxBulkAggEn:1; /*Enable Rx Bulk Aggregation */
+ UINT32 TxopHalt:1; /*Halt TXOP count down when TX buffer is full. */
+ UINT32 TxClear:1; /*Clear USB DMA TX path */
+ UINT32 rsv:2;
+ UINT32 phyclear:1; /*phy watch dog enable. write 1 */
+ UINT32 RxBulkAggLmt:8; /*Rx Bulk Aggregation Limit in unit of 1024 bytes */
+ UINT32 RxBulkAggTOut:8; /*Rx Bulk Aggregation TimeOut in unit of 33ns */
+ } field;
+ UINT32 word;
+} USB_DMA_CFG_STRUC, *PUSB_DMA_CFG_STRUC;
+#else
+typedef union _USB_DMA_CFG_STRUC {
+ struct {
+ UINT32 RxBulkAggTOut:8; /*Rx Bulk Aggregation TimeOut in unit of 33ns */
+ UINT32 RxBulkAggLmt:8; /*Rx Bulk Aggregation Limit in unit of 256 bytes */
+ UINT32 phyclear:1; /*phy watch dog enable. write 1 */
+ UINT32 rsv:2;
+ UINT32 TxClear:1; /*Clear USB DMA TX path */
+ UINT32 TxopHalt:1; /*Halt TXOP count down when TX buffer is full. */
+ UINT32 RxBulkAggEn:1; /*Enable Rx Bulk Aggregation */
+ UINT32 RxBulkEn:1; /*Enable USB DMA Rx */
+ UINT32 TxBulkEn:1; /*Enable USB DMA Tx */
+ UINT32 EpoutValid:6; /*OUT endpoint data valid */
+ UINT32 RxBusy:1; /*USB DMA RX FSM busy */
+ UINT32 TxBusy:1; /*USB DMA TX FSM busy */
+ } field;
+ UINT32 word;
+} USB_DMA_CFG_STRUC, *PUSB_DMA_CFG_STRUC;
+#endif
+
+#endif /*__RAL_OMAC_USB_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/pbf.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/pbf.h
new file mode 100644
index 0000000000..b7efa3646c
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/pbf.h
@@ -0,0 +1,93 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ pbf.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __PBF_H__
+#define __PBF_H__
+
+
+#ifdef RLT_MAC
+#include "mac_ral/nmac/ral_nmac_pbf.h"
+#endif /* RLT_MAC */
+
+#ifdef RTMP_MAC
+#include "mac_ral/omac/ral_omac_pbf.h"
+#endif /* RTMP_MAC */
+
+
+/* ================================================================================= */
+/* Register format for PBF */
+/* ================================================================================= */
+
+
+#define WPDMA_GLO_CFG 0x208
+#ifdef RT_BIG_ENDIAN
+typedef union _WPDMA_GLO_CFG_STRUC {
+ struct {
+ UINT32 rx_2b_offset:1;
+ UINT32 clk_gate_dis:1;
+ UINT32 rsv:14;
+ UINT32 HDR_SEG_LEN:8;
+ UINT32 BigEndian:1;
+ UINT32 EnTXWriteBackDDONE:1;
+ UINT32 WPDMABurstSIZE:2;
+ UINT32 RxDMABusy:1;
+ UINT32 EnableRxDMA:1;
+ UINT32 TxDMABusy:1;
+ UINT32 EnableTxDMA:1;
+ } field;
+ UINT32 word;
+}WPDMA_GLO_CFG_STRUC, *PWPDMA_GLO_CFG_STRUC;
+#else
+typedef union _WPDMA_GLO_CFG_STRUC {
+ struct {
+ UINT32 EnableTxDMA:1;
+ UINT32 TxDMABusy:1;
+ UINT32 EnableRxDMA:1;
+ UINT32 RxDMABusy:1;
+ UINT32 WPDMABurstSIZE:2;
+ UINT32 EnTXWriteBackDDONE:1;
+ UINT32 BigEndian:1;
+ UINT32 HDR_SEG_LEN:8;
+ UINT32 rsv:14;
+ UINT32 clk_gate_dis:1;
+ UINT32 rx_2b_offset:1;
+ } field;
+ UINT32 word;
+} WPDMA_GLO_CFG_STRUC, *PWPDMA_GLO_CFG_STRUC;
+#endif
+
+
+#define PBF_CTRL 0x0410
+#define MCU_INT_STA 0x0414
+#define MCU_INT_ENA 0x0418
+#define TXRXQ_PCNT 0x0438
+#define PBF_DBG 0x043c
+
+
+#endif /* __PBF_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/rf_ctrl.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/rf_ctrl.h
new file mode 100644
index 0000000000..0b2e276aee
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/rf_ctrl.h
@@ -0,0 +1,146 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rf_ctrl.h
+
+ Abstract:
+ Ralink wireless chip RF related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RF_CTRL_H__
+#define __RF_CTRL_H__
+
+#ifdef RTMP_MAC
+#include "mac_ral/omac/ral_omac_rf_ctrl.h"
+#endif /* RTMP_MAC */
+
+#ifdef RLT_MAC
+
+#endif /* RLT_MAC */
+
+
+/* ================================================================================= */
+/* Register format for RFCTRL */
+/* ================================================================================= */
+
+#define RF_CSR_CFG 0x500
+
+#ifdef RLT_RF
+
+#define RF_BANK0 0
+#define RF_BANK1 1
+#define RF_BANK2 2
+#define RF_BANK3 3
+#define RF_BANK4 4
+#define RF_BANK5 5
+#define RF_BANK6 6
+#define RF_BANK7 7
+#define RF_BANK8 8
+#define RF_BANK9 9
+#define RF_BANK10 10
+#define RF_BANK11 11
+#define RF_BANK12 12
+#define RF_BANK13 13
+#define RF_BANK14 14
+#define RF_BANK15 15
+
+/* @!Release
+ RF_CSR_KICK:1
+ Write - kick RF register read/write
+ 0: do nothing
+ 1: kick read/write process
+ Read - Polling RF register read/write
+ 0: idle
+ 1: busy
+ RF_CSR_RW:1
+ 0: read 1: write
+ rsv:12
+ RF_CSR_REG_ID:10
+ RF register ID, 0 for R0, 1 for R1 and so on
+ Bits [17:15] 3 bits, indicates the bank number
+ Bits [14:08] 7 bits, indicates the register number
+
+ RF_CSR_DATA:8
+ DATA written to/read from RF
+*/
+typedef union _RLT_RF_CSR_CFG {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ UINT RF_CSR_KICK:1;
+ UINT RF_CSR_WR:1;
+ UINT rsv:12;
+#ifdef MT7601
+ UINT RF_CSR_REG_BANK:4;
+ UINT RF_CSR_REG_ID:6;
+#else
+ UINT RF_CSR_REG_BANK:3;
+ UINT RF_CSR_REG_ID:7;
+#endif /* MT7601 */
+ UINT RF_CSR_DATA:8;
+ } field;
+#else
+ struct {
+ UINT RF_CSR_DATA:8;
+#ifdef MT7601
+ UINT RF_CSR_REG_ID:6;
+ UINT RF_CSR_REG_BANK:4;
+#else
+ UINT RF_CSR_REG_ID:7;
+ UINT RF_CSR_REG_BANK:3;
+#endif /* MT7601 */
+ UINT rsv:12;
+ UINT RF_CSR_WR:1;
+ UINT RF_CSR_KICK:1;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+ UINT word;
+}RLT_RF_CSR_CFG;
+#endif /* RLT_RF */
+
+
+typedef union _RF_CSR_CFG_STRUC {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ UINT32 Rsvd1:14; /* Reserved */
+ UINT32 RF_CSR_KICK:1; /* kick RF register read/write */
+ UINT32 RF_CSR_WR:1; /* 0: read 1: write */
+ UINT32 TESTCSR_RFACC_REGNUM:8; /* RF register ID */
+ UINT32 RF_CSR_DATA:8; /* DATA */
+ } field;
+#else
+ struct {
+ UINT32 RF_CSR_DATA:8;
+ UINT32 TESTCSR_RFACC_REGNUM:8;
+ UINT32 RF_CSR_WR:1;
+ UINT32 RF_CSR_KICK:1;
+ UINT32 Rsvd1:14;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+ UINT32 word;
+}RF_CSR_CFG_STRUC;
+
+#define RF_BYPASS_0 0x0504
+
+#define RF_SETTING_0 0x050C
+
+#endif /* __RF_CTRL_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mac_ral/rtmp_mac.h b/cleopatre/devkit/mt7601udrv/include/mac_ral/rtmp_mac.h
new file mode 100644
index 0000000000..a4f699dc50
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mac_ral/rtmp_mac.h
@@ -0,0 +1,2379 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_mac.h
+
+ Abstract:
+ Ralink Wireless Chip MAC related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_MAC_H__
+#define __RTMP_MAC_H__
+
+
+#ifdef RLT_MAC
+#include "mac_ral/nmac/ral_nmac.h"
+#endif /* RLT_MAC */
+
+#ifdef RTMP_MAC
+#include "mac_ral/omac/ral_omac.h"
+#endif /* RTMP_MAC */
+
+
+/*
+ TX / RX ring descriptor format
+
+ TX:
+ PCI/RBUS_Descriptor + TXINFO + TXWI + 802.11
+
+ Rx:
+ PCI/RBUS/USB_Descripotr + (PCI/RBUS RXFCE_INFO) + (PCI/RBUS RXINFO) + RXWI + 802.11 + (USB RXINFO)
+
+*/
+
+/* the first 24-byte in TXD is called TXINFO and will be DMAed to MAC block through TXFIFO. */
+/* MAC block use this TXINFO to control the transmission behavior of this frame. */
+#define FIFO_MGMT 0
+#define FIFO_HCCA 1
+#define FIFO_EDCA 2
+#define FIFO_EDCA2 3
+
+typedef union GNU_PACKED _TXWI_STRUC {
+#ifdef RLT_MAC
+ struct _TXWI_NMAC TXWI_N;
+#endif /* RLT_MAC */
+#ifdef RTMP_MAC
+ struct _TXWI_OMAC TXWI_O;
+#endif /* RTMP_MAC */
+ UINT32 word;
+}TXWI_STRUC;
+
+
+#define TXINFO_SIZE 4
+typedef union GNU_PACKED _TXINFO_STRUC{
+#ifdef RTMP_MAC
+ struct _TXINFO_OMAC txinfo_omac;
+#endif /* RTMP_MAC */
+#ifdef RLT_MAC
+ struct _TXINFO_NMAC_PKT txinfo_nmac_pkt;
+ struct _TXINFO_NMAC_CMD txinfo_nmac_cmd;
+#endif /* RLT_MAC */
+ UINT32 word;
+}TXINFO_STRUC;
+
+
+/*
+ RXWI wireless information format, in PBF. invisible in driver.
+*/
+typedef union GNU_PACKED _RXWI_STRUC {
+#ifdef RLT_MAC
+#ifdef MT7601
+ struct _RXWI_OMAC RXWI_O;
+#else
+ struct _RXWI_NMAC RXWI_N;
+#endif /* MT7601 */
+#endif /* RLT_MAC */
+#ifdef RTMP_MAC
+ struct _RXWI_OMAC RXWI_O;
+#endif /* RTMP_MAC */
+}RXWI_STRUC;
+
+
+#define RXINFO_SIZE 4
+#ifdef RT_BIG_ENDIAN
+typedef struct GNU_PACKED _RXINFO_STRUC {
+ UINT32 ip_sum_err:1; /* IP checksum error */
+ UINT32 tcp_sum_err:1; /* TCP checksum error */
+ UINT32 ip_sum_bypass:1; /* IP checksum bypass(hw does not do checksum) */
+ UINT32 tcp_sum_bypass:1; /* TCP/UDP checksum bypass(hw does not do checksum) */
+#ifdef HDR_TRANS_SUPPORT
+ UINT32 rsv:5;
+ UINT32 pkt_80211:1;
+#else
+ UINT32 rsv:6;
+#endif /* HDR_TRANS_SUPPORT */
+ UINT32 pn_len:3;
+ UINT32 wapi_kidx:1;
+ UINT32 BssIdx3:1;
+ UINT32 Decrypted:1;
+ UINT32 AMPDU:1;
+ UINT32 L2PAD:1;
+ UINT32 RSSI:1;
+ UINT32 HTC:1;
+ UINT32 AMSDU:1; /* rx with 802.3 header, not 802.11 header. obsolete. */
+ UINT32 CipherErr:2; /* 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid */
+ UINT32 Crc:1; /* 1: CRC error */
+ UINT32 MyBss:1; /* 1: this frame belongs to the same BSSID */
+ UINT32 Bcast:1; /* 1: this is a broadcast frame */
+ UINT32 Mcast:1; /* 1: this is a multicast frame */
+ UINT32 U2M:1; /* 1: this RX frame is unicast to me */
+ UINT32 FRAG:1;
+ UINT32 NULLDATA:1;
+ UINT32 DATA:1;
+ UINT32 BA:1;
+} RXINFO_STRUC, *PRXINFO_STRUC;
+#else
+typedef struct GNU_PACKED _RXINFO_STRUC {
+ UINT32 BA:1;
+ UINT32 DATA:1;
+ UINT32 NULLDATA:1;
+ UINT32 FRAG:1;
+ UINT32 U2M:1;
+ UINT32 Mcast:1;
+ UINT32 Bcast:1;
+ UINT32 MyBss:1;
+ UINT32 Crc:1;
+ UINT32 CipherErr:2;
+ UINT32 AMSDU:1;
+ UINT32 HTC:1;
+ UINT32 RSSI:1;
+ UINT32 L2PAD:1;
+ UINT32 AMPDU:1;
+ UINT32 Decrypted:1;
+ UINT32 BssIdx3:1;
+ UINT32 wapi_kidx:1;
+ UINT32 pn_len:3;
+#ifdef HDR_TRANS_SUPPORT
+ UINT32 pkt_80211:1;
+ UINT32 rsv:5;
+#else
+ UINT32 rsv:6;
+#endif /* HDR_TRANS_SUPPORT */
+ UINT32 tcp_sum_bypass:1;
+ UINT32 ip_sum_bypass:1;
+ UINT32 tcp_sum_err:1;
+ UINT32 ip_sum_err:1;
+}RXINFO_STRUC, *PRXINFO_STRUC;
+#endif
+
+#define TSO_SIZE 0
+
+
+/* ================================================================================= */
+/* Register format */
+/* ================================================================================= */
+
+
+/*
+ SCH/DMA registers - base address 0x0200
+*/
+#define WMM_AIFSN_CFG 0x0214
+#ifdef RT_BIG_ENDIAN
+typedef union _AIFSN_CSR_STRUC{
+ struct {
+ UINT32 Aifsn7:4; /* for AC_VO */
+ UINT32 Aifsn6:4; /* for AC_VI */
+ UINT32 Aifsn5:4; /* for AC_BK */
+ UINT32 Aifsn4:4; /* for AC_BE */
+ UINT32 Aifsn3:4; /* for AC_VO */
+ UINT32 Aifsn2:4; /* for AC_VI */
+ UINT32 Aifsn1:4; /* for AC_BK */
+ UINT32 Aifsn0:4; /* for AC_BE */
+ }field;
+ UINT32 word;
+} AIFSN_CSR_STRUC;
+#else
+typedef union _AIFSN_CSR_STRUC {
+ struct {
+ UINT32 Aifsn0:4;
+ UINT32 Aifsn1:4;
+ UINT32 Aifsn2:4;
+ UINT32 Aifsn3:4;
+ UINT32 Aifsn4:4;
+ UINT32 Aifsn5:4;
+ UINT32 Aifsn6:4;
+ UINT32 Aifsn7:4;
+ } field;
+ UINT32 word;
+} AIFSN_CSR_STRUC;
+#endif
+
+/* CWMIN_CSR: CWmin for each EDCA AC */
+#define WMM_CWMIN_CFG 0x0218
+#ifdef RT_BIG_ENDIAN
+typedef union _CWMIN_CSR_STRUC {
+ struct {
+ UINT32 Cwmin7:4; /* for AC_VO */
+ UINT32 Cwmin6:4; /* for AC_VI */
+ UINT32 Cwmin5:4; /* for AC_BK */
+ UINT32 Cwmin4:4; /* for AC_BE */
+ UINT32 Cwmin3:4; /* for AC_VO */
+ UINT32 Cwmin2:4; /* for AC_VI */
+ UINT32 Cwmin1:4; /* for AC_BK */
+ UINT32 Cwmin0:4; /* for AC_BE */
+ } field;
+ UINT32 word;
+} CWMIN_CSR_STRUC;
+#else
+typedef union _CWMIN_CSR_STRUC {
+ struct {
+ UINT32 Cwmin0:4;
+ UINT32 Cwmin1:4;
+ UINT32 Cwmin2:4;
+ UINT32 Cwmin3:4;
+ UINT32 Cwmin4:4;
+ UINT32 Cwmin5:4;
+ UINT32 Cwmin6:4;
+ UINT32 Cwmin7:4;
+ } field;
+ UINT32 word;
+} CWMIN_CSR_STRUC;
+#endif
+
+
+/* CWMAX_CSR: CWmin for each EDCA AC */
+#define WMM_CWMAX_CFG 0x021c
+#ifdef RT_BIG_ENDIAN
+typedef union _CWMAX_CSR_STRUC {
+ struct {
+ UINT32 Cwmax7:4; /* for AC_VO */
+ UINT32 Cwmax6:4; /* for AC_VI */
+ UINT32 Cwmax5:4; /* for AC_BK */
+ UINT32 Cwmax4:4; /* for AC_BE */
+ UINT32 Cwmax3:4; /* for AC_VO */
+ UINT32 Cwmax2:4; /* for AC_VI */
+ UINT32 Cwmax1:4; /* for AC_BK */
+ UINT32 Cwmax0:4; /* for AC_BE */
+ } field;
+ UINT32 word;
+} CWMAX_CSR_STRUC;
+#else
+typedef union _CWMAX_CSR_STRUC {
+ struct {
+ UINT32 Cwmax0:4;
+ UINT32 Cwmax1:4;
+ UINT32 Cwmax2:4;
+ UINT32 Cwmax3:4;
+ UINT32 Cwmax4:4;
+ UINT32 Cwmax5:4;
+ UINT32 Cwmax6:4;
+ UINT32 Cwmax7:4;
+ } field;
+ UINT32 word;
+} CWMAX_CSR_STRUC;
+#endif
+
+
+/* AC_TXOP_CSR0: AC_BK/AC_BE TXOP register */
+#define WMM_TXOP0_CFG 0x0220
+#ifdef RT_BIG_ENDIAN
+typedef union _AC_TXOP_CSR0_STRUC {
+ struct {
+ UINT16 Ac1Txop; /* for AC_BE, in unit of 32us */
+ UINT16 Ac0Txop; /* for AC_BK, in unit of 32us */
+ } field;
+ UINT32 word;
+} AC_TXOP_CSR0_STRUC;
+#else
+typedef union _AC_TXOP_CSR0_STRUC {
+ struct {
+ UINT16 Ac0Txop;
+ UINT16 Ac1Txop;
+ } field;
+ UINT32 word;
+} AC_TXOP_CSR0_STRUC;
+#endif
+
+
+/* AC_TXOP_CSR1: AC_VO/AC_VI TXOP register */
+#define WMM_TXOP1_CFG 0x0224
+#ifdef RT_BIG_ENDIAN
+typedef union _AC_TXOP_CSR1_STRUC {
+ struct {
+ UINT16 Ac3Txop; /* for AC_VO, in unit of 32us */
+ UINT16 Ac2Txop; /* for AC_VI, in unit of 32us */
+ } field;
+ UINT32 word;
+} AC_TXOP_CSR1_STRUC;
+#else
+typedef union _AC_TXOP_CSR1_STRUC {
+ struct {
+ UINT16 Ac2Txop;
+ UINT16 Ac3Txop;
+ } field;
+ UINT32 word;
+} AC_TXOP_CSR1_STRUC;
+#endif
+
+
+#define WMM_TXOP2_CFG 0x0228
+#define WMM_TXOP3_CFG 0x022c
+
+#define WMM_CTRL 0x0230
+
+
+
+/*================================================================================= */
+/* MAC registers */
+/*================================================================================= */
+/* 4.1 MAC SYSTEM configuration registers (offset:0x1000) */
+#define MAC_CSR0 0x1000
+#ifdef RT_BIG_ENDIAN
+typedef union _ASIC_VER_ID_STRUC {
+ struct {
+ UINT16 ASICVer; /* version */
+ UINT16 ASICRev; /* reversion */
+ } field;
+ UINT32 word;
+} ASIC_VER_ID_STRUC;
+#else
+typedef union _ASIC_VER_ID_STRUC {
+ struct {
+ UINT16 ASICRev;
+ UINT16 ASICVer;
+ } field;
+ UINT32 word;
+} ASIC_VER_ID_STRUC;
+#endif
+
+#define MAC_SYS_CTRL 0x1004
+#define MAC_ADDR_DW0 0x1008
+#define MAC_ADDR_DW1 0x100c
+
+/* MAC_CSR2: STA MAC register 0 */
+#ifdef RT_BIG_ENDIAN
+typedef union _MAC_DW0_STRUC {
+ struct {
+ UINT8 Byte3; /* MAC address byte 3 */
+ UINT8 Byte2; /* MAC address byte 2 */
+ UINT8 Byte1; /* MAC address byte 1 */
+ UINT8 Byte0; /* MAC address byte 0 */
+ } field;
+ UINT32 word;
+} MAC_DW0_STRUC;
+#else
+typedef union _MAC_DW0_STRUC {
+ struct {
+ UINT8 Byte0;
+ UINT8 Byte1;
+ UINT8 Byte2;
+ UINT8 Byte3;
+ } field;
+ UINT32 word;
+} MAC_DW0_STRUC;
+#endif
+
+
+/* MAC_CSR3: STA MAC register 1 */
+#ifdef RT_BIG_ENDIAN
+typedef union _MAC_DW1_STRUC {
+ struct {
+ UINT8 Rsvd1;
+ UINT8 U2MeMask;
+ UINT8 Byte5; /* MAC address byte 5 */
+ UINT8 Byte4; /* MAC address byte 4 */
+ } field;
+ UINT32 word;
+} MAC_DW1_STRUC;
+#else
+typedef union _MAC_DW1_STRUC {
+ struct {
+ UINT8 Byte4;
+ UINT8 Byte5;
+ UINT8 U2MeMask;
+ UINT8 Rsvd1;
+ } field;
+ UINT32 word;
+} MAC_DW1_STRUC;
+#endif
+
+#define MAC_BSSID_DW0 0x1010
+#define MAC_BSSID_DW1 0x1014
+/* MAC_CSR5: BSSID register 1 */
+#ifdef RT_BIG_ENDIAN
+typedef union _MAC_BSSID_DW1_STRUC {
+ struct {
+ UINT32 NMBssMode3:1;
+ UINT32 NMBssMode2:1;
+ UINT32 NMBssMode:1;
+ UINT32 MBssBcnNum:3;
+ UINT32 MBssMode:2; /* 0: one BSSID, 10: 4 BSSID, 01: 2 BSSID , 11: 8BSSID */
+ UINT32 Byte5:8; /* BSSID byte 5 */
+ UINT32 Byte4:8; /* BSSID byte 4 */
+ } field;
+ UINT32 word;
+} MAC_BSSID_DW1_STRUC;
+#else
+typedef union _MAC_BSSID_DW1_STRUC {
+ struct {
+ UINT32 Byte4:8;
+ UINT32 Byte5:8;
+ UINT32 MBssMode:2;
+ UINT32 MBssBcnNum:3;
+ UINT32 NMBssMode:1;
+ UINT32 NMBssMode2:1;
+ UINT32 NMBssMode3:1;
+ } field;
+ UINT32 word;
+} MAC_BSSID_DW1_STRUC;
+#endif
+
+/* rt2860b max 16k bytes. bit12:13 Maximum PSDU length (power factor) 0:2^13, 1:2^14, 2:2^15, 3:2^16 */
+#define MAX_LEN_CFG 0x1018
+
+
+/* BBP_CSR_CFG: BBP serial control register */
+#define BBP_CSR_CFG 0x101c
+#ifdef RT_BIG_ENDIAN
+typedef union _BBP_CSR_CFG_STRUC {
+ struct {
+ UINT32 :12;
+ UINT32 BBP_RW_MODE:1; /* 0: use serial mode 1:parallel */
+ UINT32 BBP_PAR_DUR:1; /* 0: 4 MAC clock cycles 1: 8 MAC clock cycles */
+ UINT32 Busy:1; /* 1: ASIC is busy execute BBP programming. */
+ UINT32 fRead:1; /* 0: Write BBP, 1: Read BBP */
+ UINT32 RegNum:8; /* Selected BBP register */
+ UINT32 Value:8; /* Register value to program into BBP */
+ } field;
+ UINT32 word;
+} BBP_CSR_CFG_STRUC;
+#else
+typedef union _BBP_CSR_CFG_STRUC {
+ struct {
+ UINT32 Value:8;
+ UINT32 RegNum:8;
+ UINT32 fRead:1;
+ UINT32 Busy:1;
+ UINT32 BBP_PAR_DUR:1;
+ UINT32 BBP_RW_MODE:1;
+ UINT32 :12;
+ } field;
+ UINT32 word;
+} BBP_CSR_CFG_STRUC;
+#endif
+
+
+/* RF_CSR_CFG: RF control register */
+#define RF_CSR_CFG0 0x1020
+#ifdef RT_BIG_ENDIAN
+typedef union _RF_CSR_CFG0_STRUC {
+ struct {
+ UINT32 Busy:1; /* 0: idle 1: 8busy */
+ UINT32 Sel:1; /* 0:RF_LE0 activate 1:RF_LE1 activate */
+ UINT32 StandbyMode:1; /* 0: high when stand by 1: low when standby */
+ UINT32 bitwidth:5; /* Selected BBP register */
+ UINT32 RegIdAndContent:24; /* Register value to program into BBP */
+ } field;
+ UINT32 word;
+} RF_CSR_CFG0_STRUC;
+#else
+typedef union _RF_CSR_CFG0_STRUC {
+ struct {
+ UINT32 RegIdAndContent:24;
+ UINT32 bitwidth:5;
+ UINT32 StandbyMode:1;
+ UINT32 Sel:1;
+ UINT32 Busy:1;
+ } field;
+ UINT32 word;
+} RF_CSR_CFG0_STRUC;
+#endif
+
+
+#define RF_CSR_CFG1 0x1024
+#ifdef RT_BIG_ENDIAN
+typedef union _RF_CSR_CFG1_STRUC {
+ struct {
+ UINT32 rsv:7; /* 0: idle 1: 8busy */
+ UINT32 RFGap:5; /* Gap between BB_CONTROL_RF and RF_LE. 0: 3 system clock cycle (37.5usec) 1: 5 system clock cycle (62.5usec) */
+ UINT32 RegIdAndContent:24; /* Register value to program into BBP */
+ } field;
+ UINT32 word;
+} RF_CSR_CFG1_STRUC;
+#else
+typedef union _RF_CSR_CFG1_STRUC {
+ struct {
+ UINT32 RegIdAndContent:24;
+ UINT32 RFGap:5;
+ UINT32 rsv:7;
+ } field;
+ UINT32 word;
+} RF_CSR_CFG1_STRUC;
+#endif
+
+
+#define RF_CSR_CFG2 0x1028
+#ifdef RT_BIG_ENDIAN
+typedef union _RF_CSR_CFG2_STRUC {
+ struct {
+ UINT32 rsv:8; /* 0: idle 1: 8busy */
+ UINT32 RegIdAndContent:24; /* Register value to program into BBP */
+ } field;
+ UINT32 word;
+} RF_CSR_CFG2_STRUC;
+#else
+typedef union _RF_CSR_CFG2_STRUC {
+ struct {
+ UINT32 RegIdAndContent:24;
+ UINT32 rsv:8;
+ } field;
+ UINT32 word;
+} RF_CSR_CFG2_STRUC;
+#endif
+
+
+#define LED_CFG 0x102c
+#ifdef RT_BIG_ENDIAN
+typedef union _LED_CFG_STRUC {
+ struct {
+ UINT32 :1;
+ UINT32 LedPolar:1; /* Led Polarity. 0: active low1: active high */
+ UINT32 YLedMode:2; /* yellow Led Mode */
+ UINT32 GLedMode:2; /* green Led Mode */
+ UINT32 RLedMode:2; /* red Led Mode 0: off1: blinking upon TX2: periodic slow blinking3: always on */
+ UINT32 rsv:2;
+ UINT32 SlowBlinkPeriod:6; /* slow blinking period. unit:1ms */
+ UINT32 OffPeriod:8; /* blinking off period unit 1ms */
+ UINT32 OnPeriod:8; /* blinking on period unit 1ms */
+ } field;
+ UINT32 word;
+} LED_CFG_STRUC;
+#else
+typedef union _LED_CFG_STRUC {
+ struct {
+ UINT32 OnPeriod:8;
+ UINT32 OffPeriod:8;
+ UINT32 SlowBlinkPeriod:6;
+ UINT32 rsv:2;
+ UINT32 RLedMode:2;
+ UINT32 GLedMode:2;
+ UINT32 YLedMode:2;
+ UINT32 LedPolar:1;
+ UINT32 :1;
+ } field;
+ UINT32 word;
+} LED_CFG_STRUC;
+#endif
+
+
+#define AMPDU_MAX_LEN_20M1S 0x1030
+#define AMPDU_MAX_LEN_20M2S 0x1034
+#define AMPDU_MAX_LEN_40M1S 0x1038
+#define AMPDU_MAX_LEN_40M2S 0x103c
+#define AMPDU_MAX_LEN 0x1040
+
+
+/* The number of the Tx chains */
+#define NUM_OF_TX_CHAIN 4
+
+#define TX_CHAIN_ADDR0_L 0x1044 /* Stream mode MAC address registers */
+#define TX_CHAIN_ADDR0_H 0x1048
+#define TX_CHAIN_ADDR1_L 0x104C
+#define TX_CHAIN_ADDR1_H 0x1050
+#define TX_CHAIN_ADDR2_L 0x1054
+#define TX_CHAIN_ADDR2_H 0x1058
+#define TX_CHAIN_ADDR3_L 0x105C
+#define TX_CHAIN_ADDR3_H 0x1060
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR0_L_STRUC {
+ struct {
+ UINT8 TxChainAddr0L_Byte3; /* Destination MAC address of Tx chain0 (byte 3) */
+ UINT8 TxChainAddr0L_Byte2; /* Destination MAC address of Tx chain0 (byte 2) */
+ UINT8 TxChainAddr0L_Byte1; /* Destination MAC address of Tx chain0 (byte 1) */
+ UINT8 TxChainAddr0L_Byte0; /* Destination MAC address of Tx chain0 (byte 0) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR0_L_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR0_L_STRUC {
+ struct {
+ UINT8 TxChainAddr0L_Byte0;
+ UINT8 TxChainAddr0L_Byte1;
+ UINT8 TxChainAddr0L_Byte2;
+ UINT8 TxChainAddr0L_Byte3;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR0_L_STRUC;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR0_H_STRUC {
+ struct {
+ UINT16 Reserved:12; /* Reserved */
+ UINT16 TxChainSel0:4; /* Selection value of Tx chain0 */
+ UINT8 TxChainAddr0H_Byte5; /* Destination MAC address of Tx chain0 (byte 5) */
+ UINT8 TxChainAddr0H_Byte4; /* Destination MAC address of Tx chain0 (byte 4) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR0_H_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR0_H_STRUC {
+ struct {
+ UINT8 TxChainAddr0H_Byte4; /* Destination MAC address of Tx chain0 (byte 4) */
+ UINT8 TxChainAddr0H_Byte5; /* Destination MAC address of Tx chain0 (byte 5) */
+ UINT16 TxChainSel0:4; /* Selection value of Tx chain0 */
+ UINT16 Reserved:12; /* Reserved */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR0_H_STRUC;
+#endif
+
+
+#ifdef BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR1_L_STRUC {
+ struct {
+ UINT8 TxChainAddr1L_Byte3; /* Destination MAC address of Tx chain1 (byte 3) */
+ UINT8 TxChainAddr1L_Byte2; /* Destination MAC address of Tx chain1 (byte 2) */
+ UINT8 TxChainAddr1L_Byte1; /* Destination MAC address of Tx chain1 (byte 1) */
+ UINT8 TxChainAddr1L_Byte0; /* Destination MAC address of Tx chain1 (byte 0) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR1_L_STRUC, *PTX_CHAIN_ADDR1_L_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR1_L_STRUC {
+ struct {
+ UINT8 TxChainAddr1L_Byte0;
+ UINT8 TxChainAddr1L_Byte1;
+ UINT8 TxChainAddr1L_Byte2;
+ UINT8 TxChainAddr1L_Byte3;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR1_L_STRUC, *PTX_CHAIN_ADDR1_L_STRUC;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR1_H_STRUC {
+ struct {
+ UINT16 Reserved:12; /* Reserved */
+ UINT16 TxChainSel0:4; /* Selection value of Tx chain0 */
+ UINT8 TxChainAddr1H_Byte5; /* Destination MAC address of Tx chain1 (byte 5) */
+ UINT8 TxChainAddr1H_Byte4; /* Destination MAC address of Tx chain1 (byte 4) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR1_H_STRUC ;
+#else
+typedef union _TX_CHAIN_ADDR1_H_STRUC {
+ struct {
+ UINT8 TxChainAddr1H_Byte4;
+ UINT8 TxChainAddr1H_Byte5;
+ UINT16 TxChainSel0:4;
+ UINT16 Reserved:12;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR1_H_STRUC ;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR2_L_STRUC {
+ struct {
+ UINT8 TxChainAddr2L_Byte3; /* Destination MAC address of Tx chain2 (byte 3) */
+ UINT8 TxChainAddr2L_Byte2; /* Destination MAC address of Tx chain2 (byte 2) */
+ UINT8 TxChainAddr2L_Byte1; /* Destination MAC address of Tx chain2 (byte 1) */
+ UINT8 TxChainAddr2L_Byte0; /* Destination MAC address of Tx chain2 (byte 0) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR2_L_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR2_L_STRUC {
+ struct {
+ UINT8 TxChainAddr2L_Byte0;
+ UINT8 TxChainAddr2L_Byte1;
+ UINT8 TxChainAddr2L_Byte2;
+ UINT8 TxChainAddr2L_Byte3;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR2_L_STRUC;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR2_H_STRUC {
+ struct {
+ UINT16 Reserved:12; /* Reserved */
+ UINT16 TxChainSel0:4; /* Selection value of Tx chain0 */
+ UINT8 TxChainAddr2H_Byte5; /* Destination MAC address of Tx chain2 (byte 5) */
+ UINT8 TxChainAddr2H_Byte4; /* Destination MAC address of Tx chain2 (byte 4) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR2_H_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR2_H_STRUC {
+ struct {
+ UINT8 TxChainAddr2H_Byte4;
+ UINT8 TxChainAddr2H_Byte5;
+ UINT16 TxChainSel0:4;
+ UINT16 Reserved:12;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR2_H_STRUC;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR3_L_STRUC {
+ struct {
+ UINT8 TxChainAddr3L_Byte3; /* Destination MAC address of Tx chain3 (byte 3) */
+ UINT8 TxChainAddr3L_Byte2; /* Destination MAC address of Tx chain3 (byte 2) */
+ UINT8 TxChainAddr3L_Byte1; /* Destination MAC address of Tx chain3 (byte 1) */
+ UINT8 TxChainAddr3L_Byte0; /* Destination MAC address of Tx chain3 (byte 0) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR3_L_STRUC, *PTX_CHAIN_ADDR3_L_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR3_L_STRUC {
+ struct {
+ UINT8 TxChainAddr3L_Byte0;
+ UINT8 TxChainAddr3L_Byte1;
+ UINT8 TxChainAddr3L_Byte2;
+ UINT8 TxChainAddr3L_Byte3;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR3_L_STRUC, *PTX_CHAIN_ADDR3_L_STRUC;
+#endif
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_CHAIN_ADDR3_H_STRUC {
+ struct {
+ UINT16 Reserved:12; /* Reserved */
+ UINT16 TxChainSel0:4; /* Selection value of Tx chain0 */
+ UINT8 TxChainAddr3H_Byte5; /* Destination MAC address of Tx chain3 (byte 5) */
+ UINT8 TxChainAddr3H_Byte4; /* Destination MAC address of Tx chain3 (byte 4) */
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR3_H_STRUC, *PTX_CHAIN_ADDR3_H_STRUC;
+#else
+typedef union _TX_CHAIN_ADDR3_H_STRUC {
+ struct {
+ UINT8 TxChainAddr3H_Byte4;
+ UINT8 TxChainAddr3H_Byte5;
+ UINT16 TxChainSel0:4;
+ UINT16 Reserved:12;
+ } field;
+ UINT32 word;
+} TX_CHAIN_ADDR3_H_STRUC;
+#endif
+
+
+
+/* 4.2 MAC TIMING configuration registers (offset:0x1100) */
+#define XIFS_TIME_CFG 0x1100
+#ifdef RT_BIG_ENDIAN
+typedef union _IFS_SLOT_CFG_STRUC {
+ struct {
+ UINT32 rsv:2;
+ UINT32 BBRxendEnable:1; /* reference RXEND signal to begin XIFS defer */
+ UINT32 EIFS:9; /* unit 1us */
+ UINT32 OfdmXifsTime:4; /*OFDM SIFS. unit 1us. Applied after OFDM RX when MAC doesn't reference BBP signal BBRXEND */
+ UINT32 OfdmSifsTime:8; /* unit 1us. Applied after OFDM RX/TX */
+ UINT32 CckmSifsTime:8; /* unit 1us. Applied after CCK RX/TX */
+ } field;
+ UINT32 word;
+} IFS_SLOT_CFG_STRUC;
+#else
+typedef union _IFS_SLOT_CFG_STRUC {
+ struct {
+ UINT32 CckmSifsTime:8;
+ UINT32 OfdmSifsTime:8;
+ UINT32 OfdmXifsTime:4;
+ UINT32 EIFS:9;
+ UINT32 BBRxendEnable:1;
+ UINT32 rsv:2;
+ } field;
+ UINT32 word;
+} IFS_SLOT_CFG_STRUC;
+#endif
+
+#define BKOFF_SLOT_CFG 0x1104
+#define NAV_TIME_CFG 0x1108
+#define CH_TIME_CFG 0x110C
+#define PBF_LIFE_TIMER 0x1110 /*TX/RX MPDU timestamp timer (free run)Unit: 1us */
+
+
+/* BCN_TIME_CFG : Synchronization control register */
+#define BCN_TIME_CFG 0x1114
+#ifdef RT_BIG_ENDIAN
+typedef union _BCN_TIME_CFG_STRUC {
+ struct {
+ UINT32 TxTimestampCompensate:8;
+ UINT32 :3;
+ UINT32 bBeaconGen:1; /* Enable beacon generator */
+ UINT32 bTBTTEnable:1;
+ UINT32 TsfSyncMode:2; /* Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode */
+ UINT32 bTsfTicking:1; /* Enable TSF auto counting */
+ UINT32 BeaconInterval:16; /* in unit of 1/16 TU */
+ } field;
+ UINT32 word;
+} BCN_TIME_CFG_STRUC;
+#else
+typedef union _BCN_TIME_CFG_STRUC {
+ struct {
+ UINT32 BeaconInterval:16;
+ UINT32 bTsfTicking:1;
+ UINT32 TsfSyncMode:2;
+ UINT32 bTBTTEnable:1;
+ UINT32 bBeaconGen:1;
+ UINT32 :3;
+ UINT32 TxTimestampCompensate:8;
+ } field;
+ UINT32 word;
+} BCN_TIME_CFG_STRUC;
+#endif
+
+
+#define TBTT_SYNC_CFG 0x1118
+#define TSF_TIMER_DW0 0x111c /* Local TSF timer lsb 32 bits. Read-only */
+#define TSF_TIMER_DW1 0x1120 /* msb 32 bits. Read-only. */
+#define TBTT_TIMER 0x1124 /* TImer remains till next TBTT. Read-only */
+#define INT_TIMER_CFG 0x1128
+#define INT_TIMER_EN 0x112c /* GP-timer and pre-tbtt Int enable */
+#define CH_IDLE_STA 0x1130 /* channel idle time */
+#define CH_BUSY_STA 0x1134 /* channle busy time */
+#define CH_BUSY_STA_SEC 0x1138 /* channel busy time for secondary channel */
+
+
+/* 4.2 MAC POWER configuration registers (offset:0x1200) */
+#define MAC_STATUS_CFG 0x1200
+#define PWR_PIN_CFG 0x1204
+
+
+/* AUTO_WAKEUP_CFG: Manual power control / status register */
+#define AUTO_WAKEUP_CFG 0x1208
+#ifdef RT_BIG_ENDIAN
+typedef union _AUTO_WAKEUP_STRUC {
+ struct {
+ UINT32 :16;
+ UINT32 EnableAutoWakeup:1; /* 0:sleep, 1:awake */
+ UINT32 NumofSleepingTbtt:7; /* ForceWake has high privilege than PutToSleep when both set */
+ UINT32 AutoLeadTime:8;
+ } field;
+ UINT32 word;
+} AUTO_WAKEUP_STRUC;
+#else
+typedef union _AUTO_WAKEUP_STRUC {
+ struct {
+ UINT32 AutoLeadTime:8;
+ UINT32 NumofSleepingTbtt:7;
+ UINT32 EnableAutoWakeup:1;
+ UINT32 :16;
+ } field;
+ UINT32 word;
+} AUTO_WAKEUP_STRUC;
+#endif
+
+
+/* 4.3 MAC TX configuration registers (offset:0x1300) */
+#define EDCA_AC0_CFG 0x1300
+#define EDCA_AC1_CFG 0x1304
+#define EDCA_AC2_CFG 0x1308
+#define EDCA_AC3_CFG 0x130c
+#ifdef RT_BIG_ENDIAN
+typedef union _EDCA_AC_CFG_STRUC {
+ struct {
+ UINT32 :12;
+ UINT32 Cwmax:4; /* unit power of 2 */
+ UINT32 Cwmin:4;
+ UINT32 Aifsn:4; /* # of slot time */
+ UINT32 AcTxop:8; /* in unit of 32us */
+ } field;
+ UINT32 word;
+} EDCA_AC_CFG_STRUC;
+#else
+typedef union _EDCA_AC_CFG_STRUC {
+ struct {
+ UINT32 AcTxop:8;
+ UINT32 Aifsn:4;
+ UINT32 Cwmin:4;
+ UINT32 Cwmax:4;
+ UINT32 :12;
+ } field;
+ UINT32 word;
+} EDCA_AC_CFG_STRUC;
+#endif
+
+#define EDCA_TID_AC_MAP 0x1310
+
+
+/* Default Tx power */
+#define DEFAULT_TX_POWER 0x6
+
+#define TX_PWR_CFG_0 0x1314
+#define TX_PWR_CFG_0_EXT 0x1390
+#define TX_PWR_CFG_1 0x1318
+#define TX_PWR_CFG_1_EXT 0x1394
+#define TX_PWR_CFG_2 0x131C
+#define TX_PWR_CFG_2_EXT 0x1398
+#define TX_PWR_CFG_3 0x1320
+#define TX_PWR_CFG_3_EXT 0x139C
+#define TX_PWR_CFG_4 0x1324
+#define TX_PWR_CFG_4_EXT 0x13A0
+#define TX_PWR_CFG_5 0x1384
+#define TX_PWR_CFG_6 0x1388
+#define TX_PWR_CFG_7 0x13D4
+#define TX_PWR_CFG_8 0x13D8
+#define TX_PWR_CFG_9 0x13DC
+
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_PWR_CFG_STRUC {
+ struct {
+ UINT32 Byte3:8;
+ UINT32 Byte2:8;
+ UINT32 Byte1:8;
+ UINT32 Byte0:8;
+ } field;
+ UINT32 word;
+} TX_PWR_CFG_STRUC;
+#else
+typedef union _TX_PWR_CFG_STRUC {
+ struct {
+ UINT32 Byte0:8;
+ UINT32 Byte1:8;
+ UINT32 Byte2:8;
+ UINT32 Byte3:8;
+ } field;
+ UINT32 word;
+} TX_PWR_CFG_STRUC;
+#endif
+
+
+#define TX_PIN_CFG 0x1328
+#define TX_BAND_CFG 0x132c /* 0x1 use upper 20MHz. 0 juse lower 20MHz */
+#define TX_SW_CFG0 0x1330
+#define TX_SW_CFG1 0x1334
+#define TX_SW_CFG2 0x1338
+
+
+#define TXOP_THRES_CFG 0x133c
+#ifdef RT_BIG_ENDIAN
+typedef union _TXOP_THRESHOLD_CFG_STRUC {
+ struct {
+ UINT32 TXOP_REM_THRES:8; /* Remaining TXOP threshold (unit: 32us) */
+ UINT32 CF_END_THRES:8; /* CF-END threshold (unit: 32us) */
+ UINT32 RDG_IN_THRES:8; /* Rx RDG threshold (unit: 32us) */
+ UINT32 RDG_OUT_THRES:8; /* Tx RDG threshold (unit: 32us) */
+ } field;
+ UINT32 word;
+} TXOP_THRESHOLD_CFG_STRUC;
+#else
+typedef union _TXOP_THRESHOLD_CFG_STRUC {
+ struct {
+ UINT32 RDG_OUT_THRES:8;
+ UINT32 RDG_IN_THRES:8;
+ UINT32 CF_END_THRES:8;
+ UINT32 TXOP_REM_THRES:8;
+ } field;
+ UINT32 word;
+} TXOP_THRESHOLD_CFG_STRUC;
+#endif
+
+#define TXOP_CTRL_CFG 0x1340
+
+
+#define TX_RTS_CFG 0x1344
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_RTS_CFG_STRUC {
+ struct {
+ UINT32 rsv:7;
+ UINT32 RtsFbkEn:1; /* enable rts rate fallback */
+ UINT32 RtsThres:16; /* unit:byte */
+ UINT32 AutoRtsRetryLimit:8;
+ } field;
+ UINT32 word;
+} TX_RTS_CFG_STRUC;
+#else
+typedef union _TX_RTS_CFG_STRUC {
+ struct {
+ UINT32 AutoRtsRetryLimit:8;
+ UINT32 RtsThres:16;
+ UINT32 RtsFbkEn:1;
+ UINT32 rsv:7;
+ } field;
+ UINT32 word;
+} TX_RTS_CFG_STRUC;
+#endif
+
+
+#define TX_TXBF_CFG_0 0x138c
+#define TX_TXBF_CFG_1 0x13A4
+#define TX_TXBF_CFG_2 0x13A8
+#define TX_TXBF_CFG_3 0x13AC
+typedef union _TX_TXBF_CFG_0_STRUC {
+ struct {
+#ifdef RT_BIG_ENDIAN
+ UINT32 EtxbfFbkRate:16;
+ UINT32 EtxbfFbkEn:1;
+ UINT32 EtxbfFbkSeqEn:1;
+ UINT32 EtxbfFbkCoef:2;
+ UINT32 EtxbfFbkCode:2;
+ UINT32 EtxbfFbkNg:2;
+ UINT32 CsdBypass:1;
+ UINT32 EtxbfForce:1;
+ UINT32 EtxbfEnable:1;
+ UINT32 AutoTxbfEn:3;
+ UINT32 ItxbfForce:1;
+ UINT32 ItxbfEn:1;
+#else
+ UINT32 ItxbfEn:1;
+ UINT32 ItxbfForce:1;
+ UINT32 AutoTxbfEn:3;
+ UINT32 EtxbfEnable:1;
+ UINT32 EtxbfForce:1;
+ UINT32 CsdBypass:1;
+ UINT32 EtxbfFbkNg:2;
+ UINT32 EtxbfFbkCode:2;
+ UINT32 EtxbfFbkCoef:2;
+ UINT32 EtxbfFbkSeqEn:1;
+ UINT32 EtxbfFbkEn:1;
+ UINT32 EtxbfFbkRate:16;
+#endif
+ } field;
+ UINT32 word;
+} TX_TXBF_CFG_0_STRUC;
+
+
+#define TX_TIMEOUT_CFG 0x1348
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_TIMEOUT_CFG_STRUC {
+ struct {
+ UINT32 rsv2:8;
+ UINT32 TxopTimeout:8; /*TXOP timeout value for TXOP truncation. It is recommended that (SLOT_TIME) > (TX_OP_TIMEOUT) > (RX_ACK_TIMEOUT) */
+ UINT32 RxAckTimeout:8; /* unit:slot. Used for TX precedure */
+ UINT32 MpduLifeTime:4; /* expiration time = 2^(9+MPDU LIFE TIME) us */
+ UINT32 rsv:4;
+ } field;
+ UINT32 word;
+} TX_TIMEOUT_CFG_STRUC;
+#else
+typedef union _TX_TIMEOUT_CFG_STRUC {
+ struct {
+ UINT32 rsv:4;
+ UINT32 MpduLifeTime:4;
+ UINT32 RxAckTimeout:8;
+ UINT32 TxopTimeout:8;
+ UINT32 rsv2:8;
+ } field;
+ UINT32 word;
+} TX_TIMEOUT_CFG_STRUC;
+#endif
+
+
+#define TX_RTY_CFG 0x134c
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_RTY_CFG_STRUC {
+ struct {
+ UINT32 rsv:1;
+ UINT32 TxautoFBEnable:1; /* Tx retry PHY rate auto fallback enable */
+ UINT32 AggRtyMode:1; /* Aggregate MPDU retry mode. 0:expired by retry limit, 1: expired by mpdu life timer */
+ UINT32 NonAggRtyMode:1; /* Non-Aggregate MPDU retry mode. 0:expired by retry limit, 1: expired by mpdu life timer */
+ UINT32 LongRtyThre:12; /* Long retry threshoold */
+ UINT32 LongRtyLimit:8; /*long retry limit */
+ UINT32 ShortRtyLimit:8; /* short retry limit */
+ } field;
+ UINT32 word;
+} TX_RTY_CFG_STRUC;
+#else
+typedef union _TX_RTY_CFG_STRUC {
+ struct {
+ UINT32 ShortRtyLimit:8;
+ UINT32 LongRtyLimit:8;
+ UINT32 LongRtyThre:12;
+ UINT32 NonAggRtyMode:1;
+ UINT32 AggRtyMode:1;
+ UINT32 TxautoFBEnable:1;
+ UINT32 rsv:1;
+ } field;
+ UINT32 word;
+} TX_RTY_CFG_STRUC;
+#endif
+
+
+#define TX_LINK_CFG 0x1350
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_LINK_CFG_STRUC {
+ struct {
+ UINT32 RemotMFS:8; /*remote MCS feedback sequence number */
+ UINT32 RemotMFB:8; /* remote MCS feedback */
+ UINT32 rsv:3; /* */
+ UINT32 TxCFAckEn:1; /* Piggyback CF-ACK enable */
+ UINT32 TxRDGEn:1; /* RDG TX enable */
+ UINT32 TxMRQEn:1; /* MCS request TX enable */
+ UINT32 RemoteUMFSEnable:1; /* remote unsolicit MFB enable. 0: not apply remote remote unsolicit (MFS=7) */
+ UINT32 MFBEnable:1; /* TX apply remote MFB 1:enable */
+ UINT32 RemoteMFBLifeTime:8; /*remote MFB life time. unit : 32us */
+ } field;
+ UINT32 word;
+} TX_LINK_CFG_STRUC;
+#else
+typedef union _TX_LINK_CFG_STRUC {
+ struct {
+ UINT32 RemoteMFBLifeTime:8;
+ UINT32 MFBEnable:1;
+ UINT32 RemoteUMFSEnable:1;
+ UINT32 TxMRQEn:1;
+ UINT32 TxRDGEn:1;
+ UINT32 TxCFAckEn:1;
+ UINT32 rsv:3;
+ UINT32 RemotMFB:8;
+ UINT32 RemotMFS:8;
+ } field;
+ UINT32 word;
+} TX_LINK_CFG_STRUC;
+#endif
+
+
+#define HT_FBK_CFG0 0x1354
+#ifdef RT_BIG_ENDIAN
+typedef union _HT_FBK_CFG0_STRUC {
+ struct {
+ UINT32 HTMCS7FBK:4;
+ UINT32 HTMCS6FBK:4;
+ UINT32 HTMCS5FBK:4;
+ UINT32 HTMCS4FBK:4;
+ UINT32 HTMCS3FBK:4;
+ UINT32 HTMCS2FBK:4;
+ UINT32 HTMCS1FBK:4;
+ UINT32 HTMCS0FBK:4;
+ } field;
+ UINT32 word;
+} HT_FBK_CFG0_STRUC;
+#else
+typedef union _HT_FBK_CFG0_STRUC {
+ struct {
+ UINT32 HTMCS0FBK:4;
+ UINT32 HTMCS1FBK:4;
+ UINT32 HTMCS2FBK:4;
+ UINT32 HTMCS3FBK:4;
+ UINT32 HTMCS4FBK:4;
+ UINT32 HTMCS5FBK:4;
+ UINT32 HTMCS6FBK:4;
+ UINT32 HTMCS7FBK:4;
+ } field;
+ UINT32 word;
+} HT_FBK_CFG0_STRUC;
+#endif
+
+
+#define HT_FBK_CFG1 0x1358
+#ifdef RT_BIG_ENDIAN
+typedef union _HT_FBK_CFG1_STRUC {
+ struct {
+ UINT32 HTMCS15FBK:4;
+ UINT32 HTMCS14FBK:4;
+ UINT32 HTMCS13FBK:4;
+ UINT32 HTMCS12FBK:4;
+ UINT32 HTMCS11FBK:4;
+ UINT32 HTMCS10FBK:4;
+ UINT32 HTMCS9FBK:4;
+ UINT32 HTMCS8FBK:4;
+ } field;
+ UINT32 word;
+} HT_FBK_CFG1_STRUC;
+#else
+typedef union _HT_FBK_CFG1_STRUC {
+ struct {
+ UINT32 HTMCS8FBK:4;
+ UINT32 HTMCS9FBK:4;
+ UINT32 HTMCS10FBK:4;
+ UINT32 HTMCS11FBK:4;
+ UINT32 HTMCS12FBK:4;
+ UINT32 HTMCS13FBK:4;
+ UINT32 HTMCS14FBK:4;
+ UINT32 HTMCS15FBK:4;
+ } field;
+ UINT32 word;
+} HT_FBK_CFG1_STRUC;
+#endif
+
+
+#define LG_FBK_CFG0 0x135c
+#ifdef RT_BIG_ENDIAN
+typedef union _LG_FBK_CFG0_STRUC {
+ struct {
+ UINT32 OFDMMCS7FBK:4;
+ UINT32 OFDMMCS6FBK:4;
+ UINT32 OFDMMCS5FBK:4
+ UINT32 OFDMMCS4FBK:4;
+ UINT32 OFDMMCS3FBK:4;
+ UINT32 OFDMMCS2FBK:4;
+ UINT32 OFDMMCS1FBK:4;
+ UINT32 OFDMMCS0FBK:4;
+ } field;
+ UINT32 word;
+} LG_FBK_CFG0_STRUC;
+#else
+typedef union _LG_FBK_CFG0_STRUC {
+ struct {
+ UINT32 OFDMMCS0FBK:4;
+ UINT32 OFDMMCS1FBK:4;
+ UINT32 OFDMMCS2FBK:4;
+ UINT32 OFDMMCS3FBK:4;
+ UINT32 OFDMMCS4FBK:4;
+ UINT32 OFDMMCS5FBK:4;
+ UINT32 OFDMMCS6FBK:4;
+ UINT32 OFDMMCS7FBK:4;
+ } field;
+ UINT32 word;
+} LG_FBK_CFG0_STRUC;
+#endif
+
+
+#define LG_FBK_CFG1 0x1360
+#ifdef RT_BIG_ENDIAN
+typedef union _LG_FBK_CFG1_STRUC {
+ struct {
+ UINT32 rsv:16;
+ UINT32 CCKMCS3FBK:4;
+ UINT32 CCKMCS2FBK:4;
+ UINT32 CCKMCS1FBK:4;
+ UINT32 CCKMCS0FBK:4;
+ } field;
+ UINT32 word;
+} LG_FBK_CFG1_STRUC;
+#else
+typedef union _LG_FBK_CFG1_STRUC {
+ struct {
+ UINT32 CCKMCS0FBK:4;
+ UINT32 CCKMCS1FBK:4;
+ UINT32 CCKMCS2FBK:4;
+ UINT32 CCKMCS3FBK:4;
+ UINT32 rsv:16;
+ } field;
+ UINT32 word;
+} LG_FBK_CFG1_STRUC;
+#endif
+
+
+/*======================================================= */
+/* Protection Paramater */
+/*======================================================= */
+#define ASIC_SHORTNAV 1
+#define ASIC_LONGNAV 2
+#define ASIC_RTS 1
+#define ASIC_CTS 2
+
+#define CCK_PROT_CFG 0x1364 /* CCK Protection */
+#define OFDM_PROT_CFG 0x1368 /* OFDM Protection */
+#define MM20_PROT_CFG 0x136C /* MM20 Protection */
+#define MM40_PROT_CFG 0x1370 /* MM40 Protection */
+#define GF20_PROT_CFG 0x1374 /* GF20 Protection */
+#define GF40_PROT_CFG 0x1378 /* GR40 Protection */
+#ifdef RT_BIG_ENDIAN
+typedef union _PROT_CFG_STRUC {
+ struct {
+ UINT32 rsv:5;
+ UINT32 RTSThEn:1; /*RTS threshold enable on CCK TX */
+ UINT32 TxopAllowGF40:1; /*CCK TXOP allowance.0:disallow. */
+ UINT32 TxopAllowGF20:1; /*CCK TXOP allowance.0:disallow. */
+ UINT32 TxopAllowMM40:1; /*CCK TXOP allowance.0:disallow. */
+ UINT32 TxopAllowMM20:1; /*CCK TXOP allowance. 0:disallow. */
+ UINT32 TxopAllowOfdm:1; /*CCK TXOP allowance.0:disallow. */
+ UINT32 TxopAllowCck:1; /*CCK TXOP allowance.0:disallow. */
+ UINT32 ProtectNav:2; /*TXOP protection type for CCK TX. 0:None, 1:ShortNAVprotect, 2:LongNAVProtect, 3:rsv */
+ UINT32 ProtectCtrl:2; /*Protection control frame type for CCK TX. 1:RTS/CTS, 2:CTS-to-self, 0:None, 3:rsv */
+ UINT32 ProtectRate:16; /*Protection control frame rate for CCK TX(RTS/CTS/CFEnd). */
+ } field;
+ UINT32 word;
+} PROT_CFG_STRUC;
+#else
+typedef union _PROT_CFG_STRUC {
+ struct {
+ UINT32 ProtectRate:16;
+ UINT32 ProtectCtrl:2;
+ UINT32 ProtectNav:2;
+ UINT32 TxopAllowCck:1;
+ UINT32 TxopAllowOfdm:1;
+ UINT32 TxopAllowMM20:1;
+ UINT32 TxopAllowMM40:1;
+ UINT32 TxopAllowGF20:1;
+ UINT32 TxopAllowGF40:1;
+ UINT32 RTSThEn:1;
+ UINT32 rsv:5;
+ } field;
+ UINT32 word;
+} PROT_CFG_STRUC;
+#endif
+
+
+#define EXP_CTS_TIME 0x137C
+#define EXP_ACK_TIME 0x1380
+
+
+#define HT_FBK_TO_LEGACY 0x1384
+
+
+#ifdef DOT11N_SS3_SUPPORT
+#define TX_FBK_CFG_3S_0 0x13c4
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_FBK_CFG_3S_0_STRUC {
+ struct {
+ UINT32 rsv0:3;
+ UINT32 HTMCS19FBK:5;
+ UINT32 rsv1:3;
+ UINT32 HTMCS18FBK:5;
+ UINT32 rsv2:3;
+ UINT32 HTMCS17FBK:5;
+ UINT32 rsv3:3;
+ UINT32 HTMCS16FBK:5;
+ } field;
+ UINT32 word;
+} TX_FBK_CFG_3S_0_STRUC;
+#else
+typedef union _TX_FBK_CFG_3S_0_STRUC {
+ struct {
+ UINT32 HTMCS16FBK:5;
+ UINT32 rsv3:3;
+ UINT32 HTMCS17FBK:5;
+ UINT32 rsv2:3;
+ UINT32 HTMCS18FBK:5;
+ UINT32 rsv1:3;
+ UINT32 HTMCS19FBK:5;
+ UINT32 rsv0:4;
+ } field;
+ UINT32 word;
+} TX_FBK_CFG_3S_0_STRUC;
+#endif
+
+#define TX_FBK_CFG_3S_1 0x13c8
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_FBK_CFG_3S_1_STRUC {
+ struct {
+ UINT32 rsv0:3;
+ UINT32 HTMCS23FBK:5;
+ UINT32 rsv1:3;
+ UINT32 HTMCS22FBK:5;
+ UINT32 rsv2:3;
+ UINT32 HTMCS21FBK:5;
+ UINT32 rsv3:3;
+ UINT32 HTMCS20FBK:5;
+ } field;
+ UINT32 word;
+} TX_FBK_CFG_3S_1_STRUC;
+#else
+typedef union _TX_FBK_CFG_3S_1_STRUC {
+ struct {
+ UINT32 HTMCS20FBK:5;
+ UINT32 rsv3:3;
+ UINT32 HTMCS21FBK:5;
+ UINT32 rsv2:3;
+ UINT32 HTMCS22FBK:5;
+ UINT32 rsv1:3;
+ UINT32 HTMCS23FBK:5;
+ UINT32 rsv0:3;
+ } field;
+ UINT32 word;
+} TX_FBK_CFG_3S_1_STRUC;
+#endif
+#endif /* DOT11N_SS3_SUPPORT */
+
+#define TX_AC_RTY_LIMIT 0x13cc
+#define TX_AC_FBK_SPEED 0x13d0
+
+
+
+/* 4.4 MAC RX configuration registers (offset:0x1400) */
+
+/* RX_FILTR_CFG: /RX configuration register */
+#define RX_FILTR_CFG 0x1400
+#ifdef RT_BIG_ENDIAN
+typedef union _RX_FILTR_CFG_STRUC {
+ struct {
+ UINT32 rsv:15;
+ UINT32 DropRsvCntlType:1;
+ UINT32 DropBAR:1;
+ UINT32 DropBA:1;
+ UINT32 DropPsPoll:1; /* Drop Ps-Poll */
+ UINT32 DropRts:1; /* Drop Ps-Poll */
+ UINT32 DropCts:1; /* Drop Ps-Poll */
+ UINT32 DropAck:1; /* Drop Ps-Poll */
+ UINT32 DropCFEnd:1; /* Drop Ps-Poll */
+ UINT32 DropCFEndAck:1; /* Drop Ps-Poll */
+ UINT32 DropDuplicate:1; /* Drop duplicate frame */
+ UINT32 DropBcast:1; /* Drop broadcast frames */
+ UINT32 DropMcast:1; /* Drop multicast frames */
+ UINT32 DropVerErr:1; /* Drop version error frame */
+ UINT32 DropNotMyBSSID:1; /* Drop fram ToDs bit is true */
+ UINT32 DropNotToMe:1; /* Drop not to me unicast frame */
+ UINT32 DropPhyErr:1; /* Drop physical error */
+ UINT32 DropCRCErr:1; /* Drop CRC error */
+ } field;
+ UINT32 word;
+} RX_FILTR_CFG_STRUC;
+#else
+typedef union _RX_FILTR_CFG_STRUC {
+ struct {
+ UINT32 DropCRCErr:1;
+ UINT32 DropPhyErr:1;
+ UINT32 DropNotToMe:1;
+ UINT32 DropNotMyBSSID:1;
+ UINT32 DropVerErr:1;
+ UINT32 DropMcast:1;
+ UINT32 DropBcast:1;
+ UINT32 DropDuplicate:1;
+ UINT32 DropCFEndAck:1;
+ UINT32 DropCFEnd:1;
+ UINT32 DropAck:1;
+ UINT32 DropCts:1;
+ UINT32 DropRts:1;
+ UINT32 DropPsPoll:1;
+ UINT32 DropBA:1;
+ UINT32 DropBAR:1;
+ UINT32 DropRsvCntlType:1;
+ UINT32 rsv:15;
+ } field;
+ UINT32 word;
+} RX_FILTR_CFG_STRUC;
+#endif
+
+
+/* AUTO_RSP_CFG: Auto-Responder */
+#define AUTO_RSP_CFG 0x1404
+#ifdef RT_BIG_ENDIAN
+typedef union _AUTO_RSP_CFG_STRUC {
+ struct {
+ UINT32 :24;
+ UINT32 AckCtsPsmBit:1; /* Power bit value in conrtrol frame */
+ UINT32 DualCTSEn:1; /* Power bit value in conrtrol frame */
+ UINT32 rsv:1; /* Power bit value in conrtrol frame */
+ UINT32 AutoResponderPreamble:1; /* 0:long, 1:short preamble */
+ UINT32 CTS40MRef:1; /* Response CTS 40MHz duplicate mode */
+ UINT32 CTS40MMode:1; /* Response CTS 40MHz duplicate mode */
+ UINT32 BACAckPolicyEnable:1; /* 0:long, 1:short preamble */
+ UINT32 AutoResponderEnable:1;
+ } field;
+ UINT32 word;
+} AUTO_RSP_CFG_STRUC;
+#else
+typedef union _AUTO_RSP_CFG_STRUC {
+ struct {
+ UINT32 AutoResponderEnable:1;
+ UINT32 BACAckPolicyEnable:1;
+ UINT32 CTS40MMode:1;
+ UINT32 CTS40MRef:1;
+ UINT32 AutoResponderPreamble:1;
+ UINT32 rsv:1;
+ UINT32 DualCTSEn:1;
+ UINT32 AckCtsPsmBit:1;
+ UINT32 :24;
+ } field;
+ UINT32 word;
+} AUTO_RSP_CFG_STRUC;
+#endif
+
+
+#define LEGACY_BASIC_RATE 0x1408
+#define HT_BASIC_RATE 0x140c
+#define HT_CTRL_CFG 0x1410
+#define SIFS_COST_CFG 0x1414
+#define RX_PARSER_CFG 0x1418 /*Set NAV for all received frames */
+
+
+/* 4.5 MAC Security configuration (offset:0x1500) */
+#define TX_SEC_CNT0 0x1500
+#define RX_SEC_CNT0 0x1504
+#define CCMP_FC_MUTE 0x1508
+
+
+/* 4.6 HCCA/PSMP (offset:0x1600) */
+#define TXOP_HLDR_ADDR0 0x1600
+#define TXOP_HLDR_ADDR1 0x1604
+#define TXOP_HLDR_ET 0x1608
+#define QOS_CFPOLL_RA_DW0 0x160c
+#define QOS_CFPOLL_A1_DW1 0x1610
+#define QOS_CFPOLL_QC 0x1614
+
+
+/* 4.7 MAC Statistis registers (offset:0x1700) */
+/* RX_STA_CNT0_STRUC: RX PLCP error count & RX CRC error count */
+#define RX_STA_CNT0 0x1700
+#ifdef RT_BIG_ENDIAN
+typedef union _RX_STA_CNT0_STRUC {
+ struct {
+ UINT16 PhyErr;
+ UINT16 CrcErr;
+ } field;
+ UINT32 word;
+} RX_STA_CNT0_STRUC;
+#else
+typedef union _RX_STA_CNT0_STRUC {
+ struct {
+ UINT16 CrcErr;
+ UINT16 PhyErr;
+ } field;
+ UINT32 word;
+} RX_STA_CNT0_STRUC;
+#endif
+
+
+/* RX_STA_CNT1_STRUC: RX False CCA count & RX LONG frame count */
+#define RX_STA_CNT1 0x1704
+#ifdef RT_BIG_ENDIAN
+typedef union _RX_STA_CNT1_STRUC {
+ struct {
+ UINT16 PlcpErr;
+ UINT16 FalseCca;
+ } field;
+ UINT32 word;
+} RX_STA_CNT1_STRUC;
+#else
+typedef union _RX_STA_CNT1_STRUC {
+ struct {
+ UINT16 FalseCca;
+ UINT16 PlcpErr;
+ } field;
+ UINT32 word;
+} RX_STA_CNT1_STRUC;
+#endif
+
+
+/* RX_STA_CNT2_STRUC: */
+#define RX_STA_CNT2 0x1708
+#ifdef RT_BIG_ENDIAN
+typedef union _RX_STA_CNT2_STRUC {
+ struct {
+ UINT16 RxFifoOverflowCount;
+ UINT16 RxDupliCount;
+ } field;
+ UINT32 word;
+} RX_STA_CNT2_STRUC;
+#else
+typedef union _RX_STA_CNT2_STRUC {
+ struct {
+ UINT16 RxDupliCount;
+ UINT16 RxFifoOverflowCount;
+ } field;
+ UINT32 word;
+} RX_STA_CNT2_STRUC;
+#endif
+
+
+/* STA_CSR3: TX Beacon count */
+#define TX_STA_CNT0 0x170C
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_STA_CNT0_STRUC {
+ struct {
+ UINT16 TxBeaconCount;
+ UINT16 TxFailCount;
+ } field;
+ UINT32 word;
+} TX_STA_CNT0_STRUC;
+#else
+typedef union _TX_STA_CNT0_STRUC {
+ struct {
+ UINT16 TxFailCount;
+ UINT16 TxBeaconCount;
+ } field;
+ UINT32 word;
+} TX_STA_CNT0_STRUC;
+#endif
+
+
+
+/* TX_STA_CNT1: TX tx count */
+#define TX_STA_CNT1 0x1710
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_STA_CNT1_STRUC {
+ struct {
+ UINT16 TxRetransmit;
+ UINT16 TxSuccess;
+ } field;
+ UINT32 word;
+} TX_STA_CNT1_STRUC;
+#else
+typedef union _TX_STA_CNT1_STRUC {
+ struct {
+ UINT16 TxSuccess;
+ UINT16 TxRetransmit;
+ } field;
+ UINT32 word;
+} TX_STA_CNT1_STRUC;
+#endif
+
+
+/* TX_STA_CNT2: TX tx count */
+#define TX_STA_CNT2 0x1714
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_STA_CNT2_STRUC {
+ struct {
+ UINT16 TxUnderFlowCount;
+ UINT16 TxZeroLenCount;
+ } field;
+ UINT32 word;
+} TX_STA_CNT2_STRUC;
+#else
+typedef union _TX_STA_CNT2_STRUC {
+ struct {
+ UINT16 TxZeroLenCount;
+ UINT16 TxUnderFlowCount;
+ } field;
+ UINT32 word;
+} TX_STA_CNT2_STRUC;
+#endif
+
+
+/* TX_STA_FIFO_STRUC: TX Result for specific PID status fifo register */
+#define TX_STA_FIFO 0x1718
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_STA_FIFO_STRUC {
+ struct {
+ UINT32 Reserve:2;
+ UINT32 iTxBF:1; /* iTxBF enable */
+ UINT32 Sounding:1; /* Sounding enable */
+ UINT32 eTxBF:1; /* eTxBF enable */
+ UINT32 SuccessRate:11; /*include MCS, mode ,shortGI, BW settingSame format as TXWI Word 0 Bit 31-16. */
+ UINT32 wcid:8; /*wireless client index */
+ UINT32 TxAckRequired:1; /* ack required */
+ UINT32 TxAggre:1; /* Tx is aggregated */
+ UINT32 TxSuccess:1; /* Tx success. whether success or not */
+ UINT32 PidType:4;
+ UINT32 bValid:1; /* 1:This register contains a valid TX result */
+ } field;
+ UINT32 word;
+} TX_STA_FIFO_STRUC;
+#else
+typedef union _TX_STA_FIFO_STRUC {
+ struct {
+ UINT32 bValid:1;
+ UINT32 PidType:4;
+ UINT32 TxSuccess:1;
+ UINT32 TxAggre:1;
+ UINT32 TxAckRequired:1;
+ UINT32 wcid:8;
+ UINT32 SuccessRate:11;
+ UINT32 eTxBF:1;
+ UINT32 Sounding:1;
+ UINT32 iTxBF:1;
+ UINT32 Reserve:2;
+ } field;
+ UINT32 word;
+} TX_STA_FIFO_STRUC;
+#endif
+
+
+/*
+ Debug counters
+*/
+#define TX_AGG_CNT 0x171c
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_NAG_AGG_CNT_STRUC {
+ struct {
+ UINT16 AggTxCount;
+ UINT16 NonAggTxCount;
+ } field;
+ UINT32 word;
+} TX_NAG_AGG_CNT_STRUC;
+#else
+typedef union _TX_NAG_AGG_CNT_STRUC {
+ struct {
+ UINT16 NonAggTxCount;
+ UINT16 AggTxCount;
+ } field;
+ UINT32 word;
+} TX_NAG_AGG_CNT_STRUC;
+#endif
+
+
+#define TX_AGG_CNT0 0x1720
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT0_STRUC {
+ struct {
+ UINT16 AggSize2Count;
+ UINT16 AggSize1Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT0_STRUC;
+#else
+typedef union _TX_AGG_CNT0_STRUC {
+ struct {
+ UINT16 AggSize1Count;
+ UINT16 AggSize2Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT0_STRUC;
+#endif
+
+
+#define TX_AGG_CNT1 0x1724
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT1_STRUC {
+ struct {
+ UINT16 AggSize4Count;
+ UINT16 AggSize3Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT1_STRUC;
+#else
+typedef union _TX_AGG_CNT1_STRUC {
+ struct {
+ UINT16 AggSize3Count;
+ UINT16 AggSize4Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT1_STRUC;
+#endif
+
+
+#define TX_AGG_CNT2 0x1728
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT2_STRUC {
+ struct {
+ UINT16 AggSize6Count;
+ UINT16 AggSize5Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT2_STRUC;
+#else
+typedef union _TX_AGG_CNT2_STRUC {
+ struct {
+ UINT16 AggSize5Count;
+ UINT16 AggSize6Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT2_STRUC;
+#endif
+
+
+#define TX_AGG_CNT3 0x172c
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT3_STRUC {
+ struct {
+ UINT16 AggSize8Count;
+ UINT16 AggSize7Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT3_STRUC;
+#else
+typedef union _TX_AGG_CNT3_STRUC {
+ struct {
+ UINT16 AggSize7Count;
+ UINT16 AggSize8Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT3_STRUC;
+#endif
+
+
+#define TX_AGG_CNT4 0x1730
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT4_STRUC {
+ struct {
+ UINT16 AggSize10Count;
+ UINT16 AggSize9Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT4_STRUC;
+#else
+typedef union _TX_AGG_CNT4_STRUC {
+ struct {
+ UINT16 AggSize9Count;
+ UINT16 AggSize10Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT4_STRUC;
+#endif
+
+
+#define TX_AGG_CNT5 0x1734
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT5_STRUC {
+ struct {
+ UINT16 AggSize12Count;
+ UINT16 AggSize11Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT5_STRUC;
+#else
+typedef union _TX_AGG_CNT5_STRUC {
+ struct {
+ UINT16 AggSize11Count;
+ UINT16 AggSize12Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT5_STRUC;
+#endif
+
+
+#define TX_AGG_CNT6 0x1738
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT6_STRUC {
+ struct {
+ UINT16 AggSize14Count;
+ UINT16 AggSize13Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT6_STRUC;
+#else
+typedef union _TX_AGG_CNT6_STRUC {
+ struct {
+ UINT16 AggSize13Count;
+ UINT16 AggSize14Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT6_STRUC;
+#endif
+
+
+#define TX_AGG_CNT7 0x173c
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT7_STRUC {
+ struct {
+ UINT16 AggSize16Count;
+ UINT16 AggSize15Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT7_STRUC;
+#else
+typedef union _TX_AGG_CNT7_STRUC {
+ struct {
+ UINT16 AggSize15Count;
+ UINT16 AggSize16Count;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT7_STRUC;
+#endif
+
+
+#define TX_AGG_CNT8 0x174c /* AGG_SIZE = 17,18 */
+#define TX_AGG_CNT9 0x1750 /* AGG_SIZE = 19,20 */
+#define TX_AGG_CNT10 0x1754 /* AGG_SIZE = 21,22 */
+#define TX_AGG_CNT11 0x1758 /* AGG_SIZE = 23,24 */
+#define TX_AGG_CNT12 0x175c /* AGG_SIZE = 25,26 */
+#define TX_AGG_CNT13 0x1760 /* AGG_SIZE = 27,28 */
+#define TX_AGG_CNT14 0x1764 /* AGG_SIZE = 29,30 */
+#define TX_AGG_CNT15 0x1768 /* AGG_SIZE = 31,32 */
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_AGG_CNT_STRUC {
+ struct {
+ UINT16 AggCnt_y; /* the count of aggregation size = x + 1 */
+ UINT16 AggCnt_x; /* the count of aggregation size = x */
+ } field;
+ UINT32 word;
+} TX_AGG_CNT_STRUC;
+#else
+typedef union _TX_AGG_CNT_STRUC {
+ struct {
+ UINT16 AggCnt_x;
+ UINT16 AggCnt_y;
+ } field;
+ UINT32 word;
+} TX_AGG_CNT_STRUC;
+#endif
+
+typedef union _TX_AGG_CNTN_STRUC {
+ struct {
+#ifdef RT_BIG_ENDIAN
+ UINT16 AggSizeHighCount;
+ UINT16 AggSizeLowCount;
+#else
+ UINT16 AggSizeLowCount;
+ UINT16 AggSizeHighCount;
+#endif
+ } field;
+ UINT32 word;
+} TX_AGG_CNTN_STRUC;
+
+
+#define MPDU_DENSITY_CNT 0x1740
+#ifdef RT_BIG_ENDIAN
+typedef union _MPDU_DEN_CNT_STRUC {
+ struct {
+ UINT16 RXZeroDelCount; /*RX zero length delimiter count */
+ UINT16 TXZeroDelCount; /*TX zero length delimiter count */
+ } field;
+ UINT32 word;
+} MPDU_DEN_CNT_STRUC;
+#else
+typedef union _MPDU_DEN_CNT_STRUC {
+ struct {
+ UINT16 TXZeroDelCount;
+ UINT16 RXZeroDelCount;
+ } field;
+ UINT32 word;
+} MPDU_DEN_CNT_STRUC;
+#endif
+
+
+#ifdef FIFO_EXT_SUPPORT
+/* TX_STA_FIFO_EXT_STRUC: TX retry cnt for specific frame */
+#define TX_STA_FIFO_EXT 0x1798 /* Only work after RT53xx */
+#ifdef RT_BIG_ENDIAN
+typedef union _TX_STA_FIFO_EXT_STRUC {
+ struct {
+ UINT32 Reserve:24;
+ UINT32 txRtyCnt:8; /* frame Tx retry cnt */
+ } field;
+ UINT32 word;
+} TX_STA_FIFO_EXT_STRUC;
+#else
+typedef union _TX_STA_FIFO_EXT_STRUC {
+ struct {
+ UINT32 txRtyCnt:8;
+ UINT32 Reserve:24;
+ } field;
+ UINT32 word;
+} TX_STA_FIFO_EXT_STRUC;
+#endif
+
+
+
+#define WCID_TX_CNT_0 0x176c
+#define WCID_TX_CNT_1 0x1770
+#define WCID_TX_CNT_2 0x1774
+#define WCID_TX_CNT_3 0x1778
+#define WCID_TX_CNT_4 0x177c
+#define WCID_TX_CNT_5 0x1780
+#define WCID_TX_CNT_6 0x1784
+#define WCID_TX_CNT_7 0x1788
+#ifdef RT_BIG_ENDIAN
+typedef union _WCID_TX_CNT_STRUC {
+ struct {
+ UINT32 reTryCnt:16;
+ UINT32 succCnt:16;
+ } field;
+ UINT32 word;
+} WCID_TX_CNT_STRUC;
+#else
+typedef union _WCID_TX_CNT_STRUC {
+ struct {
+ UINT32 succCnt:16;
+ UINT32 reTryCnt:16;
+ } field;
+ UINT32 word;
+} WCID_TX_CNT_STRUC;
+#endif
+
+
+#define WCID_MAPPING_0 0x178c
+#define WCID_MAPPING_1 0x1790
+#ifdef RT_BIG_ENDIAN
+typedef union _WCID_MAPPING_STRUC {
+ struct {
+ UINT32 wcid3:8;
+ UINT32 wcid2:8;
+ UINT32 wcid1:8;
+ UINT32 wcid0:8;
+ } field;
+ UINT32 word;
+} WCID_MAPPING_STRUC;
+#else
+typedef union _WCID_MAPPING_STRUC {
+ struct {
+ UINT32 wcid0:8;
+ UINT32 wcid1:8;
+ UINT32 wcid2:8;
+ UINT32 wcid3:8;
+ } field;
+ UINT32 word;
+} WCID_MAPPINGT_STRUC;
+#endif
+#endif /* FIFO_EXT_SUPPORT */
+
+
+
+/* Security key table memory, base address = 0x1000 */
+#define MAC_WCID_BASE 0x1800 /*8-bytes(use only 6-bytes) * 256 entry = */
+#define HW_WCID_ENTRY_SIZE 8
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _SHAREDKEY_MODE_STRUC {
+ struct {
+ UINT32 Bss1Key3CipherAlg:4;
+ UINT32 Bss1Key2CipherAlg:4;
+ UINT32 Bss1Key1CipherAlg:4;
+ UINT32 Bss1Key0CipherAlg:4;
+ UINT32 Bss0Key3CipherAlg:4;
+ UINT32 Bss0Key2CipherAlg:4;
+ UINT32 Bss0Key1CipherAlg:4;
+ UINT32 Bss0Key0CipherAlg:4;
+ } field;
+ UINT32 word;
+} SHAREDKEY_MODE_STRUC;
+#else
+typedef union _SHAREDKEY_MODE_STRUC {
+ struct {
+ UINT32 Bss0Key0CipherAlg:4;
+ UINT32 Bss0Key1CipherAlg:4;
+ UINT32 Bss0Key2CipherAlg:4;
+ UINT32 Bss0Key3CipherAlg:4;
+ UINT32 Bss1Key0CipherAlg:4;
+ UINT32 Bss1Key1CipherAlg:4;
+ UINT32 Bss1Key2CipherAlg:4;
+ UINT32 Bss1Key3CipherAlg:4;
+ } field;
+ UINT32 word;
+} SHAREDKEY_MODE_STRUC;
+#endif
+
+
+/* 64-entry for pairwise key table, 8-byte per entry */
+typedef struct _HW_WCID_ENTRY {
+ UINT8 Address[6];
+ UINT8 Rsv[2];
+} HW_WCID_ENTRY;
+
+
+/* ================================================================================= */
+/* WCID format */
+/* ================================================================================= */
+/*7.1 WCID ENTRY format : 8bytes */
+typedef struct _WCID_ENTRY_STRUC {
+ UINT8 RXBABitmap7; /* bit0 for TID8, bit7 for TID 15 */
+ UINT8 RXBABitmap0; /* bit0 for TID0, bit7 for TID 7 */
+ UINT8 MAC[6]; /* 0 for shared key table. 1 for pairwise key table */
+} WCID_ENTRY_STRUC;
+
+
+/*8.1.1 SECURITY KEY format : 8DW */
+/* 32-byte per entry, total 16-entry for shared key table, 64-entry for pairwise key table */
+typedef struct _HW_KEY_ENTRY {
+ UINT8 Key[16];
+ UINT8 TxMic[8];
+ UINT8 RxMic[8];
+} HW_KEY_ENTRY;
+
+
+/*8.1.2 IV/EIV format : 2DW */
+
+/* RX attribute entry format : 1DW */
+#ifdef RT_BIG_ENDIAN
+typedef union _WCID_ATTRIBUTE_STRUC {
+ struct {
+ UINT32 WAPIKeyIdx:8;
+ UINT32 WAPI_rsv:8;
+ UINT32 WAPI_MCBC:1;
+ UINT32 rsv:3;
+ UINT32 BSSIdxExt:1;
+ UINT32 PairKeyModeExt:1;
+ UINT32 RXWIUDF:3;
+ UINT32 BSSIdx:3; /*multipleBSS index for the WCID */
+ UINT32 PairKeyMode:3;
+ UINT32 KeyTab:1; /* 0 for shared key table. 1 for pairwise key table */
+ } field;
+ UINT32 word;
+} WCID_ATTRIBUTE_STRUC;
+#else
+typedef union _WCID_ATTRIBUTE_STRUC {
+ struct {
+ UINT32 KeyTab:1; /* 0 for shared key table. 1 for pairwise key table */
+ UINT32 PairKeyMode:3;
+ UINT32 BSSIdx:3; /*multipleBSS index for the WCID */
+ UINT32 RXWIUDF:3;
+ UINT32 PairKeyModeExt:1;
+ UINT32 BSSIdxExt:1;
+ UINT32 rsv:3;
+ UINT32 WAPI_MCBC:1;
+ UINT32 WAPI_rsv:8;
+ UINT32 WAPIKeyIdx:8;
+ } field;
+ UINT32 word;
+} WCID_ATTRIBUTE_STRUC;
+#endif
+
+
+/* ================================================================================= */
+/* HOST-MCU communication data structure */
+/* ================================================================================= */
+
+/* H2M_MAILBOX_CSR: Host-to-MCU Mailbox */
+#ifdef RT_BIG_ENDIAN
+typedef union _H2M_MAILBOX_STRUC {
+ struct {
+ UINT32 Owner:8;
+ UINT32 CmdToken:8; /* 0xff tells MCU not to report CmdDoneInt after excuting the command */
+ UINT32 HighByte:8;
+ UINT32 LowByte:8;
+ } field;
+ UINT32 word;
+} H2M_MAILBOX_STRUC;
+#else
+typedef union _H2M_MAILBOX_STRUC {
+ struct {
+ UINT32 LowByte:8;
+ UINT32 HighByte:8;
+ UINT32 CmdToken:8;
+ UINT32 Owner:8;
+ } field;
+ UINT32 word;
+} H2M_MAILBOX_STRUC;
+#endif
+
+
+/* M2H_CMD_DONE_CSR: MCU-to-Host command complete indication */
+#ifdef RT_BIG_ENDIAN
+typedef union _M2H_CMD_DONE_STRUC {
+ struct {
+ UINT32 CmdToken3;
+ UINT32 CmdToken2;
+ UINT32 CmdToken1;
+ UINT32 CmdToken0;
+ } field;
+ UINT32 word;
+} M2H_CMD_DONE_STRUC;
+#else
+typedef union _M2H_CMD_DONE_STRUC {
+ struct {
+ UINT32 CmdToken0;
+ UINT32 CmdToken1;
+ UINT32 CmdToken2;
+ UINT32 CmdToken3;
+ } field;
+ UINT32 word;
+} M2H_CMD_DONE_STRUC;
+#endif
+
+
+/* HOST_CMD_CSR: For HOST to interrupt embedded processor */
+#ifdef RT_BIG_ENDIAN
+typedef union _HOST_CMD_CSR_STRUC {
+ struct {
+ UINT32 Rsv:24;
+ UINT32 HostCommand:8;
+ } field;
+ UINT32 word;
+} HOST_CMD_CSR_STRUC;
+#else
+typedef union _HOST_CMD_CSR_STRUC {
+ struct {
+ UINT32 HostCommand:8;
+ UINT32 Rsv:24;
+ } field;
+ UINT32 word;
+} HOST_CMD_CSR_STRUC;
+#endif
+
+
+// TODO: shiang-6590, Need to check following definitions are useful or not!!!
+/* AIFSN_CSR: AIFSN for each EDCA AC */
+
+
+/* E2PROM_CSR: EEPROM control register */
+#ifdef RT_BIG_ENDIAN
+typedef union _E2PROM_CSR_STRUC {
+ struct {
+ UINT32 Rsvd:25;
+ UINT32 LoadStatus:1; /* 1:loading, 0:done */
+ UINT32 Type:1; /* 1: 93C46, 0:93C66 */
+ UINT32 EepromDO:1;
+ UINT32 EepromDI:1;
+ UINT32 EepromCS:1;
+ UINT32 EepromSK:1;
+ UINT32 Reload:1; /* Reload EEPROM content, write one to reload, self-cleared. */
+ } field;
+ UINT32 word;
+} E2PROM_CSR_STRUC;
+#else
+typedef union _E2PROM_CSR_STRUC {
+ struct {
+ UINT32 Reload:1;
+ UINT32 EepromSK:1;
+ UINT32 EepromCS:1;
+ UINT32 EepromDI:1;
+ UINT32 EepromDO:1;
+ UINT32 Type:1;
+ UINT32 LoadStatus:1;
+ UINT32 Rsvd:25;
+ } field;
+ UINT32 word;
+} E2PROM_CSR_STRUC;
+#endif
+
+
+/* QOS_CSR0: TXOP holder address0 register */
+#ifdef RT_BIG_ENDIAN
+typedef union _QOS_CSR0_STRUC {
+ struct {
+ UINT8 Byte3; /* MAC address byte 3 */
+ UINT8 Byte2; /* MAC address byte 2 */
+ UINT8 Byte1; /* MAC address byte 1 */
+ UINT8 Byte0; /* MAC address byte 0 */
+ } field;
+ UINT32 word;
+} QOS_CSR0_STRUC;
+#else
+typedef union _QOS_CSR0_STRUC {
+ struct {
+ UINT8 Byte0;
+ UINT8 Byte1;
+ UINT8 Byte2;
+ UINT8 Byte3;
+ } field;
+ UINT32 word;
+} QOS_CSR0_STRUC;
+#endif
+
+
+/* QOS_CSR1: TXOP holder address1 register */
+#ifdef RT_BIG_ENDIAN
+typedef union _QOS_CSR1_STRUC {
+ struct {
+ UINT8 Rsvd1;
+ UINT8 Rsvd0;
+ UINT8 Byte5; /* MAC address byte 5 */
+ UINT8 Byte4; /* MAC address byte 4 */
+ } field;
+ UINT32 word;
+} QOS_CSR1_STRUC;
+#else
+typedef union _QOS_CSR1_STRUC {
+ struct {
+ UINT8 Byte4; /* MAC address byte 4 */
+ UINT8 Byte5; /* MAC address byte 5 */
+ UINT8 Rsvd0;
+ UINT8 Rsvd1;
+ } field;
+ UINT32 word;
+} QOS_CSR1_STRUC;
+#endif
+
+// TODO: shiang-6590, check upper definitions are useful or not!
+
+
+
+/* Other on-chip shared memory space, base = 0x2000 */
+
+/* CIS space - base address = 0x2000 */
+#define HW_CIS_BASE 0x2000
+
+/* Carrier-sense CTS frame base address. It's where mac stores carrier-sense frame for carrier-sense function. */
+#define HW_CS_CTS_BASE 0x7700
+/* DFS CTS frame base address. It's where mac stores CTS frame for DFS. */
+#define HW_DFS_CTS_BASE 0x7780
+#define HW_CTS_FRAME_SIZE 0x80
+
+/* 2004-11-08 john - since NULL frame won't be that long (256 byte). We steal 16 tail bytes */
+/* to save debugging settings */
+#define HW_DEBUG_SETTING_BASE 0x77f0 /* 0x77f0~0x77ff total 16 bytes */
+#define HW_DEBUG_SETTING_BASE2 0x7770 /* 0x77f0~0x77ff total 16 bytes */
+
+#ifdef WOW_SUPPORT
+/* WOW - NullFrame buffer */
+#define HW_NULL2_BASE 0x7780
+#define GPIO_HOLDTIME_OFFSET 0x7020 /* Target is 0x7023 */
+#endif /* WOW_SUPPORT */
+
+/*
+ On-chip BEACON frame space -
+ 1. HW_BEACON_OFFSET/64B must be 0;
+ 2. BCN_OFFSETx(0~) must also be changed in MACRegTable(common/rtmp_init.c)
+ */
+#define HW_BEACON_OFFSET 0x0200
+
+
+/* In order to support maximum 8 MBSS and its maximum length is 512 for each beacon
+ Three section discontinue memory segments will be used.
+ 1. The original region for BCN 0~3
+ 2. Extract memory from FCE table for BCN 4~5
+ 3. Extract memory from Pair-wise key table for BCN 6~7
+ It occupied those memory of wcid 238~253 for BCN 6
+ and wcid 222~237 for BCN 7 */
+/*#define HW_BEACON_MAX_COUNT 8 */
+#define HW_BEACON_MAX_SIZE(__pAd) ((__pAd)->chipCap.BcnMaxHwSize)
+#define HW_BEACON_BASE0(__pAd) ((__pAd)->chipCap.BcnBase[0])
+/*#define HW_BEACON_BASE1 0x7A00 */
+/*#define HW_BEACON_BASE2 0x7C00 */
+/*#define HW_BEACON_BASE3 0x7E00 */
+/*#define HW_BEACON_BASE4 0x7200 */
+/*#define HW_BEACON_BASE5 0x7400 */
+/*#define HW_BEACON_BASE6 0x5DC0 */
+/*#define HW_BEACON_BASE7 0x5BC0 */
+
+
+/* Higher 8KB shared memory */
+#define HW_BEACON_BASE0_REDIRECTION 0x4000
+#define HW_BEACON_BASE1_REDIRECTION 0x4200
+#define HW_BEACON_BASE2_REDIRECTION 0x4400
+#define HW_BEACON_BASE3_REDIRECTION 0x4600
+#define HW_BEACON_BASE4_REDIRECTION 0x4800
+#define HW_BEACON_BASE5_REDIRECTION 0x4A00
+#define HW_BEACON_BASE6_REDIRECTION 0x4C00
+#define HW_BEACON_BASE7_REDIRECTION 0x4E00
+
+
+/* HOST-MCU shared memory - base address = 0x2100 */
+#define HOST_CMD_CSR 0x404
+#define H2M_MAILBOX_CSR 0x7010
+#define H2M_MAILBOX_CID 0x7014
+#define H2M_MAILBOX_STATUS 0x701c
+#define H2M_INT_SRC 0x7024
+#define H2M_BBP_AGENT 0x7028
+#define M2H_CMD_DONE_CSR 0x000c
+#define MCU_TXOP_ARRAY_BASE 0x000c /* TODO: to be provided by Albert */
+#define MCU_TXOP_ENTRY_SIZE 32 /* TODO: to be provided by Albert */
+#define MAX_NUM_OF_TXOP_ENTRY 16 /* TODO: must be same with 8051 firmware */
+#define MCU_MBOX_VERSION 0x01 /* TODO: to be confirmed by Albert */
+#define MCU_MBOX_VERSION_OFFSET 5 /* TODO: to be provided by Albert */
+
+
+/* Host DMA registers - base address 0x200 . TX0-3=EDCAQid0-3, TX4=HCCA, TX5=MGMT, */
+/* DMA RING DESCRIPTOR */
+#define E2PROM_CSR 0x0004
+#define IO_CNTL_CSR 0x77d0
+
+
+
+/* ================================================================ */
+/* Tx / Rx / Mgmt ring descriptor definition */
+/* ================================================================ */
+
+/* the following PID values are used to mark outgoing frame type in TXD->PID so that */
+/* proper TX statistics can be collected based on these categories */
+/* b3-2 of PID field - */
+#define PID_MGMT 0x05
+#define PID_BEACON 0x0c
+#define PID_DATA_NORMALUCAST 0x02
+#define PID_DATA_AMPDU 0x04
+#define PID_DATA_NO_ACK 0x08
+#define PID_DATA_NOT_NORM_ACK 0x03
+/* value domain of pTxD->HostQId (4-bit: 0~15) */
+#define QID_AC_BK 1 /* meet ACI definition in 802.11e */
+#define QID_AC_BE 0 /* meet ACI definition in 802.11e */
+#define QID_AC_VI 2
+#define QID_AC_VO 3
+#define QID_HCCA 4
+#define NUM_OF_TX_RING 5
+#define QID_CTRL 9
+#define QID_MGMT 13
+#define QID_RX 14
+#define QID_OTHER 15
+
+
+
+
+
+#define RTMP_MAC_SHR_MSEL_PROTECT_LOCK(__pAd, __IrqFlags) __IrqFlags = __IrqFlags;
+#define RTMP_MAC_SHR_MSEL_PROTECT_UNLOCK(__pAd, __IrqFlags) __IrqFlags = __IrqFlags;
+
+
+#ifdef RTMP_MAC_USB
+#ifdef DFS_SUPPORT
+#define BBPR127TABLE_OWNERID 0x4CA0
+#define BBPR127TABLE_OFFSET 0x4D00
+#endif /* DFS_SUPPORT */
+#endif /* RTMP_MAC_USB */
+
+
+struct _RTMP_ADAPTER;
+
+INT get_pkt_phymode_by_rxwi(RXWI_STRUC *rxwi);
+INT get_pkt_rssi_by_rxwi(struct _RTMP_ADAPTER *pAd, RXWI_STRUC *rxwi, INT size, CHAR *rssi);
+INT get_pkt_snr_by_rxwi(struct _RTMP_ADAPTER *pAd, RXWI_STRUC *rxwi, INT size, UCHAR *snr);
+
+INT rtmp_mac_set_band(struct _RTMP_ADAPTER *pAd, int band);
+INT rtmp_mac_set_ctrlch(struct _RTMP_ADAPTER *pAd, INT extch);
+INT rtmp_mac_set_mmps(struct _RTMP_ADAPTER *pAd, INT ReduceCorePower);
+
+#endif /* __RTMP_MAC_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mat.h b/cleopatre/devkit/mt7601udrv/include/mat.h
new file mode 100644
index 0000000000..f299d8c088
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mat.h
@@ -0,0 +1,208 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ mat.h
+
+ Abstract:
+ Support AP-Client function.
+
+ Revision History:
+ Who When What
+ -------------- ---------- ----------------------------------------------
+ Shiang 02-26-2007 created
+*/
+
+#ifndef _MAT_H_
+#define _MAT_H_
+
+
+
+
+/*#if defined(LINUX) || defined (VXWORKS) */
+
+/*#else */
+/*Currently support upper layer protocols */
+#ifndef ETH_P_IP
+#define ETH_P_IP 0x0800 /* Internet Protocol packet */
+#endif
+#ifndef ETH_P_ARP
+#define ETH_P_ARP 0x0806 /* Address Resolution packet */
+#endif
+#ifndef ETH_P_PPP_DISC
+#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
+#endif
+#ifndef ETH_P_PPP_SES
+#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
+#endif
+
+/* ARP protocol HARDWARE identifiers. */
+#ifndef ARPHRD_ETHER
+#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */
+#endif
+
+/* ARP protocol opcodes. */
+#ifndef ARPOP_REQUEST
+#define ARPOP_REQUEST 1 /* ARP request */
+#endif
+#ifndef ARPOP_REPLY
+#define ARPOP_REPLY 2 /* ARP reply */
+#endif
+
+typedef struct _NET_PRO_ARP_HDR{
+ unsigned short ar_hrd; /* format of hardware address */
+ unsigned short ar_pro; /* format of protocol address */
+ unsigned char ar_hln; /* length of hardware address */
+ unsigned char ar_pln; /* length of protocol address */
+ unsigned short ar_op; /* ARP opcode (command) */
+} NET_PRO_ARP_HDR;
+
+typedef struct _NET_PRO_IP_HDR{
+#ifndef RT_BIG_ENDIAN
+ UCHAR ihl:4,
+ version:4;
+#else
+ UCHAR version:4,
+ ihl:4;
+#endif
+ UCHAR tos;
+ UINT16 tot_len;
+ UINT16 id;
+ UINT16 frag_off;
+ UCHAR ttl;
+ UCHAR protocol;
+ UINT16 check;
+ UINT16 saddr;
+ UINT32 daddr;
+} NET_PRO_IP_HDR;
+/*#endif //endif of __LINUX__ */
+
+#ifndef MAT_SUPPORT
+#error "You should define MAT_SUPPORT if you want to compile MAT related functions!"
+#endif
+
+
+/* MAT relate definition */
+#define MAT_MAX_HASH_ENTRY_SUPPORT 64
+#define MAT_TB_ENTRY_AGEOUT_TIME (5 * 60 * OS_HZ) /* 30000, 5min. MAT convert table entry age-out time interval. now set it as 5min. */
+
+
+/* 802.3 Ethernet related definition */
+#define MAT_ETHER_HDR_LEN 14 /* dstMac(6) + srcMac(6) + protoType(2) */
+#define MAT_VLAN_ETH_HDR_LEN (MAT_ETHER_HDR_LEN + 4) /* 4 for h_vlan_TCI and h_vlan_encapsulated_proto */
+
+#define MAT_MAC_ADDR_HASH(Addr) (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
+#define MAT_MAC_ADDR_HASH_INDEX(Addr) (MAT_MAC_ADDR_HASH(Addr) % MAT_MAX_HASH_ENTRY_SUPPORT)
+
+#define isMcastEtherAddr(addr) (addr[0] & 0x1)
+#define isBcastEtherAddr(addr) ((addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5])== 0xff)
+#define isZeroEtherAddr(addr) (!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
+
+#define IS_GROUP_MAC(Addr) ((Addr[0]) & 0x01)
+#define IS_UCAST_MAC(addr) (!(isMcastEtherAddr(addr) || isZeroEtherAddr(addr))) /* isUcastMac = !(00:00:00:00:00:00 || mcastMac); */
+#define IS_EQUAL_MAC(a, b) (((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2]) | (a[3] ^ b[3]) | (a[4] ^ b[4]) | (a[5] ^ b[5])) == 0)
+
+#define IS_VLAN_PACKET(pkt) ((((pkt)[12] << 8) | (pkt)[13]) == 0x8100)
+
+/* IPv4 related definition */
+#define IPMAC_TB_HASH_ENTRY_NUM (MAT_MAX_HASH_ENTRY_SUPPORT+1) /* One entry for broadcast address */
+#define IPMAC_TB_HASH_INDEX_OF_BCAST MAT_MAX_HASH_ENTRY_SUPPORT /* cause hash index start from 0. */
+
+#define MAT_IP_ADDR_HASH(Addr) (((Addr>>24)&0xff)^((Addr>>16) & 0xff) ^((Addr>>8) & 0xff) ^ (Addr & 0xff))
+#define MAT_IP_ADDR_HASH_INDEX(Addr) (MAT_IP_ADDR_HASH(Addr) % MAT_MAX_HASH_ENTRY_SUPPORT)
+
+#define IS_GOOD_IP(IP) (IP!= 0)
+#define IS_MULTICAST_IP(IP) (((UINT32)(IP) & 0xf0000000) == 0xe0000000)
+
+/* IPv6 related definition */
+#define IPV6MAC_TB_HASH_ENTRY_NUM (MAT_MAX_HASH_ENTRY_SUPPORT+1) /* One entry for broadcast address */
+#define IPV6MAC_TB_HASH_INDEX_OF_BCAST MAT_MAX_HASH_ENTRY_SUPPORT /* cause hash index start from 0. */
+
+/*We just use byte 10,13,14,15 to calculate the IPv6 hash, because the byte 11,12 usually are 0xff, 0xfe for link-local address. */
+#define MAT_IPV6_ADDR_HASH(Addr) ((Addr[10]&0xff) ^ (Addr[13] & 0xff) ^(Addr[14] & 0xff) ^ (Addr[15] & 0xff))
+#define MAT_IPV6_ADDR_HASH_INDEX(Addr) (MAT_IPV6_ADDR_HASH(Addr) % MAT_MAX_HASH_ENTRY_SUPPORT)
+
+#define IS_UNSPECIFIED_IPV6_ADDR(_addr) \
+ (!((_addr).ipv6_addr32[0] | (_addr).ipv6_addr32[1] | (_addr).ipv6_addr32[2] | (_addr).ipv6_addr32[3]))
+
+#define IS_LOOPBACK_IPV6_ADDR(_addr) \
+ (NdisEqualMemory((UCHAR *)(&((_addr).ipv6_addr[0])), &IPV6_LOOPBACKADDR[0], IPV6_ADDR_LEN))
+#define IS_MULTICAST_IPV6_ADDR(_addr) \
+ (((_addr).ipv6_addr[0] & 0xff) == 0xff)
+
+/* The MAT_TABLE used for MacAddress <-> UpperLayer Address Translation. */
+typedef struct _MAT_TABLE_
+{
+ VOID *IPMacTable; /* IPv4 Address, Used for IP, ARP protocol */
+ VOID *IPv6MacTable; /* IPv6 Address, Used for IPv6 related protocols */
+ VOID *SesMacTable; /* PPPoE Session */
+ VOID *UidMacTable; /* PPPoE Discovery */
+}MAT_TABLE, *PMAT_TABLE;
+
+
+typedef enum _MAT_ENGINE_STATUS_
+{
+ MAT_ENGINE_STAT_UNKNOWN = 0,
+ MAT_ENGINE_STAT_INITED = 1,
+ MAT_ENGINE_STAT_EXITED = 2,
+}MAT_ENGINE_STATUS;
+
+
+typedef struct _MAT_STRUCT_
+{
+ MAT_ENGINE_STATUS status;
+ NDIS_SPIN_LOCK MATDBLock;
+ MAT_TABLE MatTableSet;
+#ifdef KMALLOC_BATCH
+ UCHAR *pMATNodeEntryPoll;
+#endif
+ UINT32 nodeCount; /* the number of nodes which connect to Internet via us. */
+ VOID *pPriv;
+}MAT_STRUCT;
+
+
+typedef struct _MATProtoOps
+{
+ NDIS_STATUS (*init)(MAT_STRUCT *pMatCfg);
+ PUCHAR (*tx)(MAT_STRUCT *pMatCfg, PNDIS_PACKET pSkb, PUCHAR pLayerHdr, PUCHAR pMacAddr);
+ PUCHAR (*rx)(MAT_STRUCT *pMatCfg, PNDIS_PACKET pSkb, PUCHAR pLayerHdr, PUCHAR pMacAddr);
+ NDIS_STATUS (*exit)(MAT_STRUCT *pMatCfg);
+}MATProtoOps, *PMATProtoOps;
+
+
+typedef struct _MATProtoTable
+{
+ USHORT protocol;
+ MATProtoOps *pHandle;
+}MATProtoTable, *PMATProtoTable;
+
+
+VOID dumpPkt(PUCHAR pHeader, int len);
+
+/*#define KMALLOC_BATCH */
+
+PUCHAR MATDBEntryAlloc(
+ IN MAT_STRUCT *pMatStruct,
+ IN UINT32 size);
+
+NDIS_STATUS MATDBEntryFree(
+ IN MAT_STRUCT *pMatStruct,
+ IN PUCHAR NodeEntry);
+
+
+#endif /* _MAT_H_ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mcu/MT7601_firmware.h b/cleopatre/devkit/mt7601udrv/include/mcu/MT7601_firmware.h
new file mode 100644
index 0000000000..cbe033924a
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mcu/MT7601_firmware.h
@@ -0,0 +1,2844 @@
+/* AUTO GEN PLEASE DO NOT MODIFY IT */
+/* AUTO GEN PLEASE DO NOT MODIFY IT */
+
+
+UCHAR MT7601_FirmwareImage[] = {
+0x44, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x76, 0x00, 0x01, 0x41, 0x76, 0x06, 0x02,
+0x32, 0x30, 0x31, 0x33, 0x30, 0x32, 0x30, 0x35, 0x32, 0x31, 0x34, 0x36, 0x5f, 0x5f, 0x5f, 0x5f,
+0x48, 0x00, 0x00, 0x52, 0x48, 0x00, 0x00, 0x1e, 0x48, 0x00, 0x00, 0x1c, 0x48, 0x00, 0x00, 0x1a,
+0x48, 0x00, 0x00, 0x18, 0x48, 0x00, 0x00, 0x16, 0x48, 0x00, 0x00, 0x14, 0x48, 0x00, 0x00, 0x12,
+0x48, 0x00, 0x00, 0x10, 0x48, 0x00, 0x00, 0x0e, 0x48, 0x00, 0x00, 0x10, 0x48, 0x00, 0x00, 0x0a,
+0x48, 0x00, 0x00, 0x08, 0x48, 0x00, 0x00, 0x06, 0x48, 0x00, 0x00, 0x04, 0x48, 0x00, 0x00, 0x02,
+0x92, 0x00, 0x48, 0x00, 0x00, 0x00, 0x92, 0x00, 0x3a, 0x0f, 0xab, 0xbc, 0x3a, 0xff, 0xbc, 0x3c,
+0x64, 0x62, 0x04, 0x02, 0x64, 0x72, 0xa4, 0x02, 0x64, 0x82, 0x00, 0x02, 0x3a, 0x6f, 0xa0, 0x3c,
+0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x01, 0x54, 0xb4, 0x00, 0x15, 0xf0, 0x00, 0x00, 0x46, 0x10,
+0x00, 0x05, 0x58, 0x10, 0x89, 0xf0, 0xdd, 0x21, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x01, 0x54,
+0xb4, 0x00, 0x05, 0xf0, 0x00, 0x00, 0x3a, 0x6f, 0xa0, 0x04, 0x64, 0x62, 0x04, 0x03, 0x64, 0x72,
+0xa4, 0x03, 0x64, 0x82, 0x00, 0x03, 0x3a, 0xff, 0xbc, 0x04, 0x3a, 0x0f, 0xab, 0x84, 0x64, 0x00,
+0x00, 0x04, 0x92, 0x00, 0x84, 0x0a, 0x64, 0x02, 0x00, 0x03, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00,
+0x02, 0x00, 0x44, 0x10, 0x04, 0x01, 0xa8, 0x41, 0x84, 0x00, 0x64, 0x02, 0x24, 0x03, 0x46, 0x0c,
+0x00, 0x00, 0x58, 0x00, 0x00, 0x02, 0x64, 0x03, 0x00, 0x03, 0x47, 0xf0, 0x00, 0x0f, 0x59, 0xff,
+0x8f, 0x00, 0x46, 0x00, 0x00, 0x0a, 0x58, 0x00, 0x06, 0xe0, 0x46, 0x10, 0x00, 0x0a, 0x58, 0x10,
+0x8e, 0xe0, 0x84, 0x40, 0xd5, 0x02, 0xaa, 0x81, 0x4c, 0x10, 0x7f, 0xff, 0x46, 0x00, 0x00, 0x0b,
+0x58, 0x00, 0x01, 0x50, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x81, 0x94, 0x84, 0x40, 0xd5, 0x02,
+0xaa, 0x81, 0x4c, 0x10, 0x7f, 0xff, 0x48, 0x00, 0x2b, 0xf3, 0x92, 0x00, 0x84, 0x80, 0xa8, 0xc5,
+0xa9, 0x01, 0xa8, 0x46, 0xa8, 0x84, 0xb6, 0x80, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0xb4, 0x20, 0xc1, 0x17, 0xa1, 0x41, 0x84, 0x80, 0xa9, 0x49, 0xb6, 0x25, 0xb6, 0x80,
+0xa9, 0x01, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x40, 0xa0, 0xc2, 0xb4, 0x20, 0x9e, 0x99,
+0xa8, 0x82, 0x4c, 0x10, 0x40, 0x08, 0xa0, 0x0b, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x90,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x27, 0x83, 0x93, 0x80, 0xe0, 0xc2, 0x11, 0x80, 0x02,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x90, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07,
+0x83, 0x93, 0x80, 0x27, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x80, 0x18, 0xdd, 0x2f, 0xec, 0x04,
+0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x8f, 0x30, 0xdd, 0x2f, 0x46, 0x17, 0xff, 0xff, 0x58, 0x10, 0x8f, 0xff,
+0x46, 0x20, 0x00, 0x0d, 0x58, 0x21, 0x0e, 0x40, 0x81, 0x00, 0x40, 0xa0, 0x04, 0x00, 0x44, 0x00,
+0xea, 0x60, 0x14, 0xa1, 0x00, 0x04, 0x80, 0xe2, 0xb4, 0xc2, 0x41, 0xc4, 0x00, 0x00, 0xd5, 0x2e,
+0xa0, 0x32, 0x40, 0x34, 0x00, 0x01, 0x4e, 0x35, 0x00, 0x21, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x81, 0x1c, 0xdd, 0x2f, 0xa4, 0x36, 0xc0, 0x10, 0x9e, 0x01, 0xac, 0x36, 0x15, 0xc3,
+0x00, 0x02, 0x05, 0xe3, 0x80, 0x01, 0xa9, 0xb9, 0xb6, 0xe6, 0x15, 0xe3, 0x00, 0x01, 0xb6, 0xde,
+0xa1, 0x7a, 0x9d, 0x29, 0xa9, 0x3a, 0xd5, 0x06, 0xa0, 0xb6, 0xc2, 0x04, 0xa0, 0x75, 0xa0, 0x34,
+0xdd, 0x22, 0x14, 0xa3, 0x80, 0x04, 0xd5, 0x09, 0xa0, 0xbc, 0x40, 0x90, 0x08, 0x01, 0x4e, 0x95,
+0x00, 0x03, 0xd5, 0x02, 0xa8, 0x3c, 0x81, 0x26, 0xb4, 0xc9, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94,
+0x8e, 0x40, 0x4c, 0x64, 0xff, 0xcf, 0xb4, 0xa6, 0xd6, 0x09, 0xa0, 0xf4, 0x40, 0x01, 0xa0, 0x01,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x5c, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x80, 0xe1, 0x44, 0x10, 0xea, 0x60,
+0x80, 0xc0, 0xe2, 0x27, 0xe8, 0x0e, 0x40, 0x03, 0x84, 0x57, 0x44, 0x2f, 0x15, 0xa0, 0x96, 0x01,
+0x42, 0x70, 0x08, 0x73, 0xac, 0x36, 0xcf, 0x07, 0x9e, 0xc1, 0xac, 0xf6, 0x80, 0xe1, 0xd5, 0x03,
+0x84, 0x20, 0xac, 0x46, 0x46, 0x80, 0x00, 0x0d, 0x58, 0x84, 0x0e, 0x40, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x8f, 0x30, 0xdd, 0x2f, 0xb4, 0x88, 0x40, 0x90, 0x1c, 0x00, 0x4c, 0x44, 0x00, 0x08,
+0x05, 0xe4, 0x00, 0x04, 0x40, 0x54, 0xf8, 0x01, 0x4e, 0x54, 0x00, 0x0c, 0x46, 0xf0, 0x00, 0x0d,
+0x14, 0x97, 0x83, 0x94, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x5c, 0xdd, 0x2f,
+0xb4, 0x06, 0x14, 0x93, 0x00, 0x02, 0xc8, 0x0f, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x47, 0x83, 0x91,
+0x14, 0x64, 0x00, 0x01, 0xb7, 0x06, 0xa9, 0x31, 0xb6, 0xc4, 0x04, 0x14, 0x00, 0x02, 0x9c, 0xc9,
+0x14, 0x34, 0x00, 0x02, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x40, 0xa0, 0x33, 0x84, 0x20, 0xa8, 0x72, 0xb6, 0xc6,
+0xa9, 0xb1, 0xc8, 0x08, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0x20, 0xdd, 0x2f, 0xa8, 0x33,
+0xd5, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x90, 0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f, 0xa0, 0x32, 0xc8, 0x02, 0xd5, 0x09,
+0x9e, 0x01, 0xa8, 0x32, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0xf8, 0xdd, 0x2f,
+0x80, 0xc0, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f, 0x80, 0x06,
+0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xf4, 0x80, 0xc0,
+0x50, 0x0f, 0x80, 0x04, 0x80, 0xe1, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f,
+0xa0, 0xb2, 0x80, 0x06, 0x9c, 0x51, 0xa8, 0x72, 0x80, 0x27, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8b, 0xec, 0xdd, 0x2f, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f,
+0xec, 0x0c, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0x00, 0x00, 0x0d,
+0x58, 0x00, 0x0e, 0x54, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0xe4, 0xdd, 0x2f, 0x46, 0x70,
+0x00, 0x0b, 0x58, 0x73, 0x81, 0x70, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0b, 0xa0, 0x46, 0x80,
+0x00, 0x00, 0x58, 0x84, 0x03, 0x68, 0xa9, 0xf2, 0x80, 0x26, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00,
+0x0e, 0x54, 0x4b, 0xe0, 0x20, 0x01, 0x50, 0x73, 0x86, 0x40, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52,
+0x86, 0xf0, 0x8c, 0xd8, 0xdf, 0xf1, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x64, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8b, 0xe4, 0xdd, 0x2f, 0x46, 0x70, 0x00, 0x0d, 0x58, 0x73, 0x86, 0xf0,
+0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0c, 0x30, 0x46, 0x80, 0x00, 0x00, 0x58, 0x84, 0x03, 0x68,
+0xa9, 0xf2, 0x80, 0x26, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x64, 0x4b, 0xe0, 0x20, 0x01,
+0x50, 0x73, 0x80, 0xc8, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8b, 0xa0, 0x8c, 0xd8, 0xdf, 0xf1,
+0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x30, 0x04, 0x00,
+0xb4, 0x43, 0x44, 0x50, 0x76, 0x10, 0x40, 0x01, 0x40, 0x09, 0xd8, 0x07, 0x83, 0xc3, 0x04, 0x5f,
+0x00, 0x41, 0x42, 0x42, 0xd0, 0x0b, 0xc4, 0x0f, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8f, 0x9c,
+0xdd, 0x2f, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x07, 0x81, 0x64, 0x46, 0xf0, 0x00, 0x0b,
+0x10, 0x07, 0x81, 0x63, 0x46, 0x60, 0x00, 0x03, 0x58, 0x63, 0x01, 0xf8, 0x44, 0x00, 0x00, 0x10,
+0x46, 0x10, 0x00, 0x03, 0x58, 0x10, 0x84, 0x38, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x11, 0x46, 0x10,
+0x00, 0x03, 0x58, 0x10, 0x84, 0x48, 0xdd, 0x26, 0x84, 0x00, 0x46, 0x10, 0x00, 0x03, 0x58, 0x10,
+0x84, 0x58, 0xdd, 0x26, 0x84, 0x01, 0x46, 0x10, 0x00, 0x03, 0x58, 0x10, 0x84, 0x68, 0xdd, 0x26,
+0x44, 0x00, 0x00, 0x19, 0x46, 0x10, 0x00, 0x03, 0x58, 0x10, 0x84, 0x78, 0xdd, 0x26, 0x46, 0x10,
+0x00, 0x03, 0x58, 0x10, 0x85, 0x74, 0x44, 0x00, 0x00, 0x18, 0xdd, 0x26, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x83, 0xa8, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x83, 0x44, 0xdd, 0x2f, 0x84, 0xc0, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x8c, 0xb0, 0xdd, 0x2f, 0x46, 0x30, 0x00, 0x0d, 0x58, 0x31, 0x8e, 0x74, 0x84, 0x80, 0x10, 0x41,
+0x82, 0xa8, 0x14, 0x61, 0x80, 0x2d, 0x50, 0x01, 0x82, 0xaa, 0x80, 0x26, 0x84, 0x48, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x46, 0x30, 0x04, 0x10, 0x58, 0x31, 0x88, 0x00,
+0xa9, 0x9c, 0x46, 0x00, 0x30, 0x00, 0xa1, 0x5b, 0x40, 0x42, 0x80, 0x04, 0xa9, 0x1b, 0x3a, 0x6f,
+0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0x3c, 0x96, 0x00, 0x96, 0x48, 0x95, 0x82, 0x99, 0x71,
+0x44, 0x32, 0x0d, 0x60, 0x99, 0x2b, 0x00, 0x31, 0x00, 0x40, 0x95, 0x25, 0x84, 0xa0, 0x38, 0x71,
+0x14, 0x00, 0x99, 0xac, 0xaf, 0xf0, 0x9d, 0x69, 0x44, 0x70, 0x00, 0x10, 0xdf, 0xf9, 0x9b, 0x94,
+0x50, 0x52, 0x00, 0x18, 0x50, 0x22, 0x00, 0x10, 0x38, 0x73, 0x08, 0x00, 0x18, 0x71, 0x00, 0x01,
+0xda, 0xfc, 0x50, 0x42, 0x00, 0x20, 0x38, 0x23, 0x14, 0x00, 0x18, 0x22, 0x80, 0x01, 0xdc, 0xfc,
+0x46, 0x40, 0x01, 0x06, 0x40, 0x20, 0x04, 0x09, 0x58, 0x42, 0x0c, 0x00, 0x99, 0x54, 0x94, 0xaa,
+0x97, 0x04, 0xb4, 0x02, 0xcc, 0x1d, 0xc9, 0x05, 0x54, 0x31, 0x80, 0x0f, 0x84, 0xd0, 0xd5, 0x39,
+0x84, 0xa1, 0xd9, 0x07, 0x54, 0x11, 0x80, 0x0f, 0x94, 0xcc, 0x44, 0x6f, 0xff, 0x0f, 0xd5, 0x31,
+0x84, 0x82, 0x54, 0x31, 0x80, 0x0f, 0x4c, 0x12, 0x40, 0x07, 0x40, 0x31, 0xa0, 0x08, 0x44, 0x6f,
+0xf0, 0xff, 0xd5, 0x27, 0x40, 0x31, 0xb0, 0x08, 0x44, 0x1f, 0x0f, 0xff, 0xd5, 0x2b, 0xc9, 0x0c,
+0x46, 0x5f, 0xff, 0x0f, 0x54, 0x31, 0x80, 0x0f, 0x58, 0x52, 0x8f, 0xff, 0x40, 0x31, 0xc0, 0x08,
+0x40, 0x00, 0x14, 0x02, 0xd5, 0x21, 0x84, 0xa1, 0xd9, 0x0a, 0x54, 0x11, 0x80, 0x0f, 0x40, 0x30,
+0xd0, 0x08, 0x46, 0x1f, 0xf0, 0xff, 0x58, 0x10, 0x8f, 0xff, 0xd5, 0x14, 0x84, 0xa2, 0xd9, 0x0c,
+0x54, 0x61, 0x80, 0x0f, 0x40, 0x33, 0x60, 0x08, 0x46, 0x6f, 0x0f, 0xff, 0x58, 0x63, 0x0f, 0xff,
+0x40, 0x00, 0x18, 0x02, 0xd5, 0x09, 0x46, 0x10, 0xff, 0xff, 0x40, 0x31, 0xf0, 0x08, 0x58, 0x10,
+0x8f, 0xff, 0x40, 0x00, 0x04, 0x02, 0x40, 0x00, 0x0c, 0x04, 0xb6, 0x02, 0x3a, 0x6f, 0x9c, 0x04,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0x02, 0x10, 0x00, 0x0a, 0xa1, 0x84,
+0x5c, 0xf0, 0x80, 0x66, 0xe9, 0x2a, 0x51, 0xc0, 0xff, 0x9a, 0x84, 0xe0, 0x46, 0xa0, 0x01, 0x02,
+0x58, 0xa5, 0x06, 0xd4, 0x80, 0x06, 0x46, 0x10, 0x00, 0x0b, 0x58, 0x10, 0x80, 0x14, 0x84, 0x46,
+0x4b, 0xe0, 0x28, 0x01, 0xc8, 0x15, 0x81, 0x20, 0x50, 0x83, 0x00, 0x06, 0x80, 0x08, 0x46, 0x10,
+0x00, 0x0e, 0x58, 0x10, 0x81, 0x28, 0x84, 0x46, 0x8d, 0x21, 0x4b, 0xe0, 0x28, 0x01, 0xc8, 0x09,
+0x44, 0x50, 0x00, 0x10, 0x8d, 0x06, 0x4c, 0x92, 0xff, 0xf3, 0x84, 0x01, 0xd5, 0x07, 0x9d, 0xb1,
+0x9d, 0xf9, 0x40, 0xfe, 0x1c, 0x06, 0xe8, 0xdf, 0x84, 0x00, 0xec, 0x04, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x44, 0x30, 0x01, 0x0c, 0x54, 0xa0,
+0x80, 0xff, 0x42, 0x65, 0x0c, 0x24, 0x54, 0x91, 0x00, 0xff, 0x44, 0x20, 0x00, 0x43, 0x42, 0x64,
+0x88, 0x73, 0x97, 0xc0, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0f, 0xa4, 0x99, 0xb0, 0x84, 0x20,
+0x97, 0x20, 0x80, 0x06, 0x81, 0x05, 0xf4, 0x81, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08,
+0xdd, 0x2f, 0x84, 0x24, 0x4c, 0x70, 0xc0, 0x04, 0x84, 0x03, 0xd5, 0x09, 0x84, 0x46, 0x4c, 0x71,
+0x40, 0x04, 0x84, 0x04, 0xd5, 0x04, 0x84, 0xab, 0xdf, 0x04, 0x84, 0x02, 0x10, 0x03, 0x00, 0x40,
+0x41, 0xe0, 0x88, 0x08, 0x11, 0xe3, 0x00, 0x41, 0x80, 0x28, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73,
+0x86, 0xa4, 0x80, 0x06, 0x80, 0x5e, 0xdd, 0x27, 0x01, 0xc3, 0x00, 0x40, 0x84, 0x23, 0x4d, 0xc0,
+0xc0, 0x1b, 0xf4, 0x01, 0x50, 0x54, 0x00, 0x18, 0x50, 0x33, 0x00, 0x10, 0x8d, 0x10, 0x51, 0xc3,
+0x00, 0x18, 0xc4, 0x09, 0xb6, 0xbf, 0x80, 0x03, 0x80, 0x28, 0x84, 0x48, 0xdd, 0x27, 0xb4, 0x3f,
+0x80, 0x1c, 0xd5, 0x07, 0x80, 0x25, 0x80, 0x03, 0x84, 0x48, 0xdd, 0x27, 0x80, 0x1c, 0x80, 0x28,
+0x84, 0x48, 0xdd, 0x27, 0x80, 0x0a, 0x80, 0x29, 0x80, 0x46, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7,
+0x85, 0x44, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc,
+0x44, 0x30, 0x01, 0x0c, 0x97, 0x00, 0x42, 0x62, 0x0c, 0x24, 0x46, 0x20, 0x00, 0x0d, 0x58, 0x21,
+0x0f, 0xa4, 0x99, 0xb2, 0x81, 0x01, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20, 0x00, 0x43, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x07, 0x80, 0xb1,
+0x84, 0xa4, 0xd8, 0x03, 0x84, 0x03, 0xd5, 0x04, 0x84, 0xa6, 0xd8, 0x24, 0x84, 0x04, 0x45, 0xe0,
+0x00, 0x10, 0x10, 0x03, 0x00, 0x40, 0x11, 0xe3, 0x00, 0x41, 0x50, 0x14, 0x00, 0x20, 0x46, 0x70,
+0x01, 0x02, 0x58, 0x73, 0x86, 0xa4, 0x80, 0x06, 0x80, 0x5e, 0x4b, 0xe0, 0x1c, 0x01, 0x00, 0x03,
+0x00, 0x40, 0x84, 0xa3, 0xd8, 0x0f, 0x50, 0x14, 0x00, 0x38, 0x84, 0x48, 0x50, 0x03, 0x00, 0x10,
+0x4b, 0xe0, 0x1c, 0x01, 0x50, 0x03, 0x00, 0x18, 0x50, 0x14, 0x00, 0x30, 0x84, 0x48, 0x4b, 0xe0,
+0x1c, 0x01, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xdc, 0x97, 0x20,
+0x55, 0xc0, 0x80, 0xff, 0x54, 0x91, 0x00, 0xff, 0x96, 0xd8, 0xc4, 0x44, 0x84, 0x23, 0x4c, 0x30,
+0x80, 0x05, 0x84, 0x45, 0x4c, 0x31, 0x40, 0x70, 0x85, 0x40, 0x80, 0xe0, 0x81, 0x2a, 0x81, 0x0a,
+0x80, 0xdf, 0xd5, 0x30, 0xa6, 0x38, 0x44, 0x30, 0x00, 0xdd, 0x4c, 0x01, 0xc0, 0x26, 0x9c, 0x3a,
+0x46, 0x10, 0x00, 0x0a, 0x58, 0x10, 0x8f, 0xf0, 0x84, 0x43, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x86, 0xd4, 0xdd, 0x2f, 0xc8, 0x19, 0xa7, 0x7d, 0x87, 0xc1, 0x4c, 0x5f, 0x40, 0x16, 0xa7, 0x39,
+0x00, 0x93, 0x80, 0x06, 0x50, 0x82, 0x7f, 0xfa, 0x54, 0x84, 0x00, 0xff, 0x50, 0x13, 0x80, 0x08,
+0x80, 0x1f, 0x80, 0x48, 0x54, 0x94, 0x80, 0x03, 0xe7, 0x10, 0xe9, 0x40, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xa6, 0xb9, 0x9c, 0x52, 0x89, 0x41, 0x99, 0xf9, 0x54, 0xa5,
+0x00, 0xff, 0xa7, 0x79, 0x9c, 0xea, 0x40, 0x01, 0xa8, 0x00, 0x40, 0xfe, 0x00, 0x07, 0xe8, 0xcb,
+0xd5, 0x0f, 0x84, 0xc5, 0x4c, 0x33, 0x40, 0x30, 0x80, 0x20, 0x80, 0x5c, 0x80, 0x1f, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xe7, 0x24, 0xe8, 0x20, 0x81, 0x1c, 0x46, 0x60,
+0x00, 0x0d, 0x58, 0x63, 0x0e, 0x74, 0x80, 0x48, 0x80, 0x3f, 0x50, 0x03, 0x01, 0x10, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x84, 0x20, 0x00, 0x03, 0x02, 0x3e, 0x10, 0x93,
+0x02, 0x3c, 0x80, 0x49, 0x50, 0x53, 0x01, 0x10, 0x80, 0x61, 0x80, 0x81, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x86, 0xb4, 0xdd, 0x2f, 0x84, 0x01, 0xd5, 0x02, 0x84, 0x00, 0xec, 0x24, 0x3a, 0x6f,
+0xaa, 0x84, 0xdd, 0x9e, 0x85, 0x20, 0x81, 0x09, 0xd5, 0xdb, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0x94, 0x85, 0x40, 0x80, 0xc2, 0x55, 0xc0, 0x00, 0xff, 0x44, 0x00, 0x02, 0x00, 0x81, 0x21,
+0x14, 0xaf, 0x80, 0x19, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8c, 0x14, 0xdd, 0x2f, 0xa7, 0x32,
+0xa6, 0x73, 0x40, 0x32, 0x20, 0x08, 0x40, 0x21, 0x84, 0x04, 0x9c, 0x94, 0x50, 0x1f, 0x80, 0x64,
+0x80, 0x66, 0x84, 0x9f, 0x50, 0x8f, 0x80, 0x54, 0x80, 0xe0, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x8a, 0xd0, 0xdd, 0x2f, 0x80, 0x2a, 0x80, 0x08, 0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x84, 0x02, 0x4d, 0xc0, 0x40, 0x1a, 0x50, 0xaf, 0x80, 0x04,
+0xf3, 0x19, 0x80, 0x09, 0x80, 0x47, 0x80, 0x8a, 0x44, 0x50, 0x00, 0x14, 0x9e, 0x6c, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x82, 0x70, 0xdd, 0x2f, 0x80, 0x08, 0x80, 0x2a, 0x44, 0x20, 0x00, 0x10,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xd5, 0x0d, 0x44, 0x10, 0x00, 0x10,
+0xf3, 0x19, 0x80, 0x09, 0x80, 0x88, 0x80, 0x47, 0x80, 0xa1, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x81, 0x2c, 0xdd, 0x2f, 0x50, 0x1f, 0x80, 0x54, 0x44, 0x20, 0x00, 0x10, 0x50, 0x03, 0x00, 0x51,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8c, 0x28, 0xdd, 0x2f, 0xec, 0x6c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x87, 0x80, 0xb3, 0xf6, 0x0c,
+0x84, 0xe3, 0x85, 0x21, 0x84, 0xa0, 0x44, 0x00, 0x00, 0x5f, 0xaf, 0xf1, 0x10, 0x93, 0x00, 0x00,
+0xaf, 0x72, 0xae, 0x33, 0x83, 0x83, 0xf4, 0x81, 0x97, 0xc8, 0x96, 0x90, 0x4e, 0x82, 0x00, 0x04,
+0x84, 0x02, 0xd5, 0x02, 0x84, 0x1e, 0xae, 0x34, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x17, 0x80, 0xb4,
+0xc1, 0x03, 0x85, 0x23, 0xd5, 0x0d, 0x46, 0xf0, 0x00, 0x0e, 0x01, 0xe7, 0x80, 0xb1, 0x84, 0x81,
+0x56, 0x3f, 0x00, 0x06, 0x85, 0x42, 0x40, 0x95, 0x0c, 0x1a, 0x40, 0x92, 0x0c, 0x1b, 0xa7, 0x76,
+0x40, 0x02, 0x8c, 0x09, 0x94, 0x03, 0x40, 0x00, 0x24, 0x04, 0xae, 0x36, 0xe6, 0xe5, 0xe9, 0x04,
+0x42, 0x00, 0x0c, 0x09, 0xd5, 0x03, 0x58, 0x00, 0x00, 0x08, 0xae, 0x36, 0x4e, 0x83, 0x00, 0x14,
+0xe6, 0xe5, 0xe9, 0x11, 0xa7, 0x76, 0x54, 0x11, 0x00, 0x03, 0x44, 0x3f, 0xff, 0xcf, 0x94, 0x0c,
+0x41, 0xe2, 0x8c, 0x02, 0x40, 0xaf, 0x00, 0x04, 0x84, 0x43, 0x10, 0xa3, 0x00, 0x06, 0x4c, 0x71,
+0x40, 0x0f, 0xd5, 0x0f, 0x84, 0x83, 0x4c, 0x72, 0x40, 0x08, 0x00, 0xa3, 0x00, 0x06, 0x58, 0x25,
+0x00, 0x40, 0xae, 0xb6, 0xd5, 0x06, 0x87, 0xc1, 0x4c, 0x7f, 0x00, 0x04, 0x84, 0xa5, 0xdf, 0x09,
+0xa7, 0x36, 0x44, 0x1f, 0xff, 0x80, 0x40, 0x32, 0x04, 0x04, 0x84, 0xa1, 0xae, 0xf6, 0xd7, 0x06,
+0x00, 0xa3, 0x00, 0x05, 0x58, 0x25, 0x00, 0x01, 0xae, 0xb5, 0x4e, 0x82, 0x00, 0x05, 0xe6, 0xe3,
+0xe8, 0x04, 0xd5, 0x0c, 0xe6, 0xe5, 0xe9, 0x17, 0xa6, 0x35, 0x59, 0xe0, 0x00, 0x02, 0x11, 0xe3,
+0x00, 0x05, 0x4e, 0x82, 0x00, 0x11, 0x84, 0xa3, 0xd7, 0x03, 0x84, 0xa5, 0xdf, 0x05, 0xa6, 0x75,
+0x58, 0x40, 0x80, 0x10, 0xaf, 0x35, 0x4e, 0x82, 0x00, 0x07, 0x84, 0x41, 0x4c, 0x71, 0x00, 0x04,
+0x84, 0xa3, 0xdf, 0x10, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x47, 0x80, 0xb1, 0x44, 0x00, 0x00, 0x10,
+0x56, 0x32, 0x00, 0x04, 0x95, 0x41, 0x41, 0xe2, 0x8c, 0x1a, 0x41, 0xe0, 0x0c, 0x1b, 0x11, 0xe3,
+0x00, 0x08, 0x50, 0x03, 0x00, 0x09, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8f, 0x3c, 0x84, 0x48,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0xe6, 0xe4, 0xe9, 0x05, 0x4e, 0x83,
+0x00, 0x26, 0x84, 0xa5, 0xdf, 0x23, 0x46, 0xa0, 0x01, 0x02, 0x58, 0xa5, 0x06, 0xa4, 0x50, 0x03,
+0x00, 0x11, 0x80, 0x3c, 0x44, 0x20, 0x00, 0x20, 0x4b, 0xe0, 0x28, 0x01, 0x4e, 0x83, 0x00, 0x12,
+0x84, 0xa5, 0xdf, 0x0f, 0x50, 0x1e, 0x00, 0x10, 0x50, 0x03, 0x00, 0x31, 0x44, 0x20, 0x00, 0x10,
+0x4b, 0xe0, 0x28, 0x01, 0x00, 0x53, 0x00, 0x40, 0x9c, 0x2a, 0x10, 0x03, 0x00, 0x40, 0xd5, 0x08,
+0x84, 0xa3, 0xdf, 0x04, 0x4e, 0x83, 0x00, 0x05, 0xd5, 0x0c, 0x84, 0xa5, 0xdf, 0x0a, 0xf1, 0x01,
+0x50, 0x03, 0x00, 0x41, 0x84, 0x46, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f,
+0x84, 0x20, 0x50, 0x03, 0x00, 0x51, 0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x87, 0x08, 0xdd, 0x2f, 0x84, 0xa1, 0xd7, 0x0c, 0x80, 0x09, 0x80, 0x46, 0x46, 0x10, 0x00, 0x0d,
+0x58, 0x10, 0x8f, 0x44, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x89, 0x0c, 0xdd, 0x2f, 0xec, 0x0c,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xee, 0x84, 0x46, 0x80,
+0x01, 0x02, 0x58, 0x84, 0x07, 0x08, 0x50, 0x60, 0x00, 0x5b, 0x84, 0x20, 0x97, 0xd0, 0x50, 0x0f,
+0x81, 0x60, 0x44, 0x20, 0x00, 0x10, 0xdd, 0x28, 0x84, 0x20, 0x44, 0x20, 0x00, 0x50, 0x50, 0x0f,
+0x81, 0x00, 0xdd, 0x28, 0x50, 0x9f, 0x81, 0x74, 0x84, 0x20, 0x44, 0x20, 0x00, 0xff, 0x80, 0x1f,
+0xdd, 0x28, 0x84, 0x20, 0x84, 0x42, 0x80, 0x09, 0xdd, 0x28, 0x50, 0x13, 0x7f, 0xaa, 0x80, 0x09,
+0x84, 0x42, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x84, 0x01, 0x46, 0xf0,
+0x00, 0x0e, 0x00, 0x87, 0x80, 0xb3, 0x4c, 0x70, 0x00, 0x08, 0x84, 0x43, 0x4c, 0x71, 0x00, 0x05,
+0x84, 0x65, 0x4c, 0x71, 0xc0, 0x26, 0x51, 0xcf, 0x81, 0x50, 0x84, 0x20, 0x84, 0x48, 0x80, 0x1c,
+0x50, 0xa3, 0x7f, 0xae, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x46, 0x90,
+0x00, 0x02, 0x58, 0x94, 0x88, 0xd8, 0x80, 0x0a, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8f, 0x3c,
+0x84, 0x48, 0x4b, 0xe0, 0x24, 0x01, 0x84, 0x81, 0x4c, 0x02, 0x00, 0x09, 0x80, 0x0a, 0x80, 0x3c,
+0x84, 0x48, 0x4b, 0xe0, 0x24, 0x01, 0x4e, 0x03, 0x00, 0xcc, 0x84, 0xa1, 0xd7, 0x6a, 0x00, 0xa3,
+0x7f, 0xa7, 0x00, 0x93, 0x7f, 0xa8, 0x41, 0xe5, 0x20, 0x08, 0x50, 0xa3, 0x7f, 0xf6, 0x41, 0xcf,
+0x24, 0x04, 0x80, 0x2a, 0x44, 0x20, 0x00, 0x10, 0x46, 0x90, 0x01, 0x02, 0x58, 0x94, 0x86, 0xa4,
+0x50, 0x0f, 0x81, 0x50, 0x4b, 0xe0, 0x24, 0x01, 0x84, 0x20, 0x80, 0x0a, 0x44, 0x20, 0x00, 0x10,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x00, 0x0f, 0x81, 0x75, 0x84, 0x21,
+0x54, 0x00, 0x00, 0x07, 0x51, 0xce, 0x00, 0x04, 0x4c, 0x00, 0xc0, 0x18, 0x46, 0x90, 0x00, 0x0d,
+0x58, 0x94, 0x8e, 0x74, 0x85, 0x44, 0x8c, 0x2f, 0x10, 0xa4, 0x82, 0x3d, 0x50, 0x04, 0x80, 0xd0,
+0x80, 0x7c, 0x50, 0x23, 0x7f, 0xa5, 0x50, 0x4f, 0x81, 0x60, 0x80, 0xa1, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x81, 0x2c, 0xdd, 0x2f, 0xd5, 0x21, 0x84, 0x42, 0x4c, 0x01, 0x40, 0x1f, 0x46, 0xa0,
+0x00, 0x0d, 0x58, 0xa5, 0x0e, 0x74, 0x80, 0x7c, 0x87, 0x86, 0x11, 0xc5, 0x02, 0x3d, 0x50, 0x05,
+0x00, 0xd0, 0x8c, 0x2f, 0x50, 0x23, 0x7f, 0xa5, 0x50, 0x4f, 0x81, 0x00, 0x9d, 0x4c, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x82, 0x70, 0xdd, 0x2f, 0x50, 0x1f, 0x81, 0x00, 0x50, 0x0f, 0x81, 0x60,
+0x44, 0x20, 0x00, 0x10, 0x4b, 0xe0, 0x24, 0x01, 0x50, 0x0f, 0x81, 0x50, 0x50, 0x1f, 0x81, 0x60,
+0x44, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xd4, 0xdd, 0x2f, 0xc8, 0x60,
+0xa7, 0x76, 0xa7, 0x37, 0x40, 0x32, 0xa0, 0x08, 0x40, 0x31, 0x90, 0x04, 0x4e, 0x36, 0x00, 0x04,
+0x84, 0x01, 0xd5, 0x57, 0x84, 0x23, 0x4c, 0x70, 0xc0, 0x05, 0x4e, 0x83, 0x00, 0x06, 0xd5, 0x42,
+0x84, 0x05, 0x4c, 0x70, 0x40, 0x40, 0x00, 0x5f, 0x81, 0x75, 0x84, 0x42, 0x55, 0xe2, 0x80, 0x07,
+0x80, 0x9f, 0x50, 0x03, 0x00, 0x08, 0x4d, 0xe1, 0x40, 0x1e, 0xa6, 0x76, 0x01, 0xe3, 0x00, 0x07,
+0x40, 0x90, 0xa0, 0x08, 0x40, 0x14, 0xf8, 0x04, 0x94, 0xd3, 0x46, 0x20, 0x00, 0x0d, 0x58, 0x21,
+0x0f, 0x54, 0x50, 0x5f, 0x81, 0x70, 0x85, 0x20, 0x14, 0x9f, 0x80, 0x5c, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x8f, 0xb4, 0xdd, 0x2f, 0xf3, 0x5c, 0x00, 0x4f, 0x81, 0x71, 0xae, 0xf7, 0xaf, 0x36,
+0xd5, 0x0d, 0x80, 0x40, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0f, 0x54, 0x50, 0x13, 0x7f, 0xd6,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x8c, 0xdd, 0x2f, 0x4e, 0x83, 0x00, 0x0c, 0x84, 0x05,
+0x4c, 0x70, 0x40, 0x09, 0x00, 0x5f, 0x81, 0x75, 0x40, 0x22, 0x90, 0x09, 0x54, 0x21, 0x00, 0x03,
+0xd5, 0x02, 0x84, 0x40, 0xa6, 0x77, 0x80, 0x67, 0x80, 0x88, 0x80, 0x1f, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x88, 0x08, 0xdd, 0x2f, 0x84, 0x60, 0x40, 0x01, 0x80, 0x06, 0xd5, 0x02, 0x84, 0x00,
+0xed, 0x7c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xd4, 0x46, 0x90,
+0x00, 0x0d, 0x58, 0x94, 0x8e, 0x74, 0x80, 0xc1, 0x00, 0x34, 0x82, 0x3d, 0x80, 0xe0, 0x80, 0x22,
+0x80, 0x06, 0x84, 0x45, 0xf3, 0x85, 0x01, 0xc4, 0x82, 0x3c, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7,
+0x8b, 0xc8, 0xdd, 0x2f, 0xc8, 0x0a, 0x46, 0x02, 0x00, 0x00, 0x80, 0x27, 0x46, 0xf0, 0x00, 0x02,
+0x58, 0xf7, 0x8e, 0xbc, 0xdd, 0x2f, 0xd5, 0x69, 0x50, 0x13, 0x00, 0x09, 0x84, 0x48, 0x46, 0x80,
+0x01, 0x02, 0x58, 0x84, 0x06, 0xa4, 0x50, 0x04, 0x80, 0xc8, 0xdd, 0x28, 0x46, 0xf0, 0x00, 0x0a,
+0x58, 0xf7, 0x84, 0x94, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x54, 0x46, 0xf0,
+0x00, 0x00, 0x58, 0xf7, 0x83, 0x24, 0xdd, 0x2f, 0x81, 0x40, 0xc0, 0x4f, 0xa1, 0xc2, 0xc7, 0x4d,
+0x84, 0xc0, 0x80, 0x26, 0x44, 0x20, 0x04, 0x00, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x87, 0x08, 0xdd, 0x2f, 0xf0, 0x05, 0x80, 0x66, 0x80, 0x86, 0x80, 0xa6, 0x80, 0x5c, 0x84, 0x26,
+0x51, 0xc3, 0x80, 0x0e, 0xb6, 0xdf, 0xf6, 0x81, 0x15, 0xcf, 0x80, 0x02, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x89, 0xe0, 0xdd, 0x2f, 0x50, 0x14, 0x82, 0x41, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x18,
+0xdd, 0x28, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x81, 0x28, 0x84, 0x46, 0x50, 0x0f, 0x80, 0x1e,
+0xdd, 0x28, 0x46, 0x10, 0x00, 0x0b, 0x58, 0x10, 0x80, 0x08, 0x84, 0x42, 0x50, 0x0f, 0x80, 0x24,
+0xdd, 0x28, 0x00, 0x2e, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x03, 0x40, 0x81, 0x20, 0x08, 0x40, 0x84,
+0x00, 0x04, 0x50, 0x1f, 0x80, 0x18, 0x84, 0x4e, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x86, 0xf0, 0xdd, 0x2f, 0x50, 0x14, 0x00, 0x12, 0x80, 0x0a, 0x96, 0x49, 0x80, 0x46, 0x46, 0xf0,
+0x00, 0x02, 0x58, 0xf7, 0x84, 0xbc, 0xdd, 0x2f, 0xec, 0x2c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x50, 0x6f, 0x80, 0x04, 0x80, 0xe1, 0x81, 0x00, 0x84, 0x20,
+0x81, 0x22, 0x80, 0x06, 0x84, 0x42, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f,
+0x80, 0x06, 0x9c, 0x7d, 0x84, 0x42, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f,
+0xa6, 0xf1, 0x54, 0x01, 0x80, 0x80, 0xc0, 0x23, 0xa7, 0x30, 0x54, 0x12, 0x00, 0x0e, 0xc9, 0x0f,
+0x54, 0x21, 0x80, 0x08, 0xc2, 0x0c, 0x97, 0x24, 0xcc, 0x1a, 0x46, 0x04, 0x00, 0x00, 0x80, 0x28,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8e, 0xbc, 0xdd, 0x2f, 0xd5, 0x11, 0x55, 0xe2, 0x00, 0x0f,
+0x84, 0xa3, 0x4d, 0xe2, 0xc0, 0x0d, 0x54, 0x31, 0x80, 0x08, 0xcb, 0x09, 0x80, 0x08, 0x80, 0x27,
+0x80, 0x49, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x8e, 0x18, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f,
+0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x9c, 0x80, 0xc0, 0x44, 0x00, 0x00, 0x10,
+0xf3, 0x83, 0xf2, 0x88, 0xf4, 0x89, 0xf5, 0x8a, 0x4c, 0x30, 0x00, 0x0d, 0x44, 0x20, 0x00, 0x18,
+0x4c, 0x31, 0x00, 0x09, 0x41, 0xe0, 0x04, 0x08, 0x4c, 0x3f, 0x00, 0x05, 0x84, 0x1f, 0x48, 0x00,
+0x00, 0xa2, 0x8e, 0x28, 0x80, 0x01, 0x84, 0xe0, 0xf1, 0x81, 0xf7, 0x97, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8c, 0x14, 0xdd, 0x2f, 0xf0, 0x82, 0xc8, 0x04, 0x84, 0x1e, 0x48, 0x00, 0x00, 0x93,
+0x50, 0x0f, 0x80, 0x54, 0x46, 0xa0, 0x01, 0x02, 0x58, 0xa5, 0x06, 0xa4, 0x80, 0x26, 0x84, 0x48,
+0x4b, 0xe0, 0x28, 0x01, 0xf2, 0x01, 0xf0, 0x02, 0x40, 0x91, 0x0c, 0x09, 0x50, 0x13, 0x00, 0x08,
+0x4b, 0xe0, 0x28, 0x01, 0x84, 0xe5, 0x54, 0x04, 0x80, 0xff, 0x80, 0x89, 0x42, 0x40, 0x1c, 0x73,
+0x40, 0x24, 0x8c, 0x08, 0x05, 0xef, 0x80, 0x02, 0x50, 0x31, 0x7f, 0xf8, 0x52, 0x50, 0x00, 0x00,
+0x54, 0x82, 0x80, 0xff, 0x55, 0xc2, 0x00, 0xff, 0x40, 0xaf, 0x0c, 0x00, 0x50, 0x64, 0xff, 0xff,
+0x14, 0x8f, 0x80, 0x07, 0x15, 0xcf, 0x80, 0x04, 0xf7, 0x85, 0x14, 0xaf, 0x80, 0x0b, 0xf6, 0x86,
+0xf6, 0x06, 0x04, 0xaf, 0x80, 0x0b, 0x05, 0xcf, 0x80, 0x04, 0x46, 0x90, 0x01, 0x02, 0x58, 0x94,
+0x86, 0xa4, 0x50, 0x8f, 0x80, 0x5c, 0x50, 0x7f, 0x80, 0x4c, 0xd5, 0x2f, 0xa7, 0x0f, 0x9f, 0xb1,
+0x40, 0x3e, 0x10, 0x03, 0xae, 0xcf, 0xdd, 0x29, 0x80, 0x2a, 0x84, 0x48, 0x50, 0x0f, 0x80, 0x3c,
+0xdd, 0x29, 0xf3, 0x03, 0x46, 0xf0, 0x00, 0x0a, 0x04, 0x17, 0x83, 0xb8, 0xf2, 0x08, 0x45, 0xe0,
+0x00, 0x10, 0x50, 0x4f, 0x80, 0x44, 0x80, 0xa8, 0x50, 0x0f, 0x80, 0x34, 0x15, 0xef, 0x80, 0x17,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x88, 0xac, 0xdd, 0x2f, 0x50, 0x1f, 0x80, 0x44, 0x84, 0x48,
+0x50, 0x0f, 0x80, 0x54, 0xdd, 0x29, 0x80, 0x0a, 0x80, 0x27, 0x84, 0x48, 0xdd, 0x29, 0x50, 0x1e,
+0x7f, 0xff, 0x55, 0xc0, 0x80, 0xff, 0x8f, 0x48, 0x84, 0x48, 0x50, 0x0f, 0x80, 0x34, 0x50, 0x1f,
+0x80, 0x54, 0x4e, 0x64, 0xff, 0xcd, 0x05, 0xef, 0x80, 0x04, 0xf4, 0x07, 0xf1, 0x05, 0x40, 0x3f,
+0x10, 0x00, 0x9e, 0x89, 0x96, 0x18, 0x84, 0xbf, 0xf2, 0x85, 0xf0, 0x84, 0xda, 0xb2, 0xf2, 0x01,
+0xf5, 0x0a, 0xb6, 0x45, 0xf2, 0x01, 0xf1, 0x02, 0xf0, 0x09, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x86, 0xa4, 0xdd, 0x2f, 0xf0, 0x02, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8c, 0x28, 0xdd, 0x2f,
+0x84, 0x00, 0xec, 0x64, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xee, 0xe4, 0xb6, 0x5f, 0xf3, 0x81, 0x80, 0xc1, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x87, 0x08,
+0x84, 0x20, 0x44, 0x20, 0x00, 0x60, 0x83, 0x80, 0x50, 0x0f, 0x80, 0x68, 0x81, 0x44, 0x81, 0x25,
+0x50, 0x8f, 0x80, 0xc8, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x20, 0x44, 0x20, 0x00, 0x60, 0x50, 0x0f,
+0x80, 0x08, 0x4b, 0xe0, 0x1c, 0x01, 0x80, 0x08, 0x84, 0x20, 0x44, 0x20, 0x00, 0x40, 0x4b, 0xe0,
+0x1c, 0x01, 0x5c, 0xf3, 0x00, 0x41, 0xe8, 0x0f, 0x80, 0x08, 0x80, 0x3c, 0x80, 0x46, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x50, 0x6f, 0x80, 0xc8, 0x51, 0xcf, 0x81, 0x08,
+0x80, 0xe6, 0xd5, 0x0a, 0x80, 0x1c, 0x80, 0x26, 0x80, 0x48, 0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7,
+0x8e, 0x98, 0xdd, 0x2f, 0xd5, 0xf2, 0xa6, 0x78, 0x56, 0x00, 0x80, 0x36, 0x18, 0x03, 0x80, 0x01,
+0x4c, 0x7e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x68, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7,
+0x8e, 0x54, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84, 0x0d, 0xc0, 0x80, 0x07, 0x50, 0x1f,
+0x80, 0xc8, 0x44, 0x20, 0x00, 0x40, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0x3f, 0xf2, 0x01, 0x80, 0x07,
+0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x50, 0x1f, 0x81, 0x08, 0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7,
+0x8d, 0x48, 0xdd, 0x2f, 0xa6, 0xf0, 0x56, 0x21, 0x80, 0x6a, 0x18, 0x23, 0x00, 0x01, 0x4c, 0x6e,
+0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x08, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x03, 0x58, 0xf7, 0x8e, 0x54,
+0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84, 0x0d, 0xc0, 0x80, 0x07, 0x50, 0x1f, 0x80, 0xc8,
+0x44, 0x20, 0x00, 0x40, 0x50, 0x6f, 0x81, 0x08, 0x4b, 0xe0, 0x20, 0x01, 0x44, 0x20, 0x00, 0x10,
+0x80, 0x07, 0x80, 0x26, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x80, 0x26, 0x46, 0xf0, 0x01, 0x03,
+0x58, 0xf7, 0x8d, 0x48, 0xdd, 0x2f, 0x46, 0x30, 0x01, 0x02, 0x58, 0x31, 0x86, 0xa4, 0xe7, 0x31,
+0xe9, 0x06, 0x80, 0x0a, 0x80, 0x26, 0x44, 0x20, 0x00, 0x10, 0xd5, 0x04, 0x80, 0x0a, 0x80, 0x26,
+0x80, 0x49, 0x4b, 0xe0, 0x0c, 0x01, 0xed, 0x1c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xee, 0xcc, 0xb6, 0x5f, 0xf3, 0x81, 0x80, 0xc1, 0x46, 0x70, 0x01, 0x02,
+0x58, 0x73, 0x87, 0x08, 0x84, 0x20, 0x44, 0x20, 0x00, 0x68, 0x83, 0x80, 0x50, 0x0f, 0x80, 0x70,
+0x81, 0x44, 0x81, 0x25, 0x50, 0x8f, 0x80, 0xdc, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x68, 0x50, 0x0f, 0x80, 0x08, 0x4b, 0xe0, 0x1c, 0x01, 0x80, 0x08, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x40, 0x4b, 0xe0, 0x1c, 0x01, 0x5c, 0xf3, 0x00, 0x41, 0xe8, 0x0f, 0x80, 0x08, 0x80, 0x3c,
+0x80, 0x46, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xa4, 0xdd, 0x2f, 0x50, 0x6f, 0x80, 0xdc,
+0x51, 0xcf, 0x81, 0x1c, 0x80, 0xe6, 0xd5, 0x0a, 0x80, 0x1c, 0x80, 0x26, 0x80, 0x48, 0x46, 0xf0,
+0x01, 0x03, 0x58, 0xf7, 0x81, 0xbc, 0xdd, 0x2f, 0xd5, 0xf2, 0xa6, 0x78, 0x56, 0x00, 0x80, 0x36,
+0x18, 0x03, 0x80, 0x01, 0x4c, 0x7e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x70, 0x80, 0x07, 0x46, 0xf0,
+0x01, 0x03, 0x58, 0xf7, 0x81, 0x78, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84, 0x00, 0xe4,
+0x80, 0x07, 0x50, 0x1f, 0x80, 0xdc, 0x44, 0x20, 0x00, 0x40, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0x3f,
+0xf2, 0x01, 0x80, 0x07, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x50, 0x1f, 0x81, 0x1c, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x8f, 0xd8, 0xdd, 0x2f, 0xa6, 0xf0, 0x56, 0x21, 0x80, 0x6a, 0x18, 0x23,
+0x00, 0x01, 0x4c, 0x6e, 0x7f, 0xfb, 0x50, 0x7f, 0x80, 0x08, 0x80, 0x07, 0x46, 0xf0, 0x01, 0x03,
+0x58, 0xf7, 0x81, 0x78, 0xdd, 0x2f, 0x46, 0x80, 0x01, 0x03, 0x58, 0x84, 0x00, 0xe4, 0x80, 0x07,
+0x50, 0x1f, 0x80, 0xdc, 0x44, 0x20, 0x00, 0x40, 0x50, 0x6f, 0x81, 0x1c, 0x4b, 0xe0, 0x20, 0x01,
+0x44, 0x20, 0x00, 0x14, 0x80, 0x07, 0x80, 0x26, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x07, 0x80, 0x26,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x8f, 0xd8, 0xdd, 0x2f, 0x46, 0x30, 0x01, 0x02, 0x58, 0x31,
+0x86, 0xa4, 0xe7, 0x35, 0xe9, 0x06, 0x80, 0x0a, 0x80, 0x26, 0x44, 0x20, 0x00, 0x14, 0xd5, 0x04,
+0x80, 0x0a, 0x80, 0x26, 0x80, 0x49, 0x4b, 0xe0, 0x0c, 0x01, 0xed, 0x34, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x20, 0x00, 0x80, 0x58, 0x21, 0x00, 0x50, 0x46, 0x50, 0x04, 0x00,
+0x98, 0xc2, 0x58, 0x52, 0x82, 0x7c, 0x94, 0x03, 0x84, 0x40, 0x99, 0x05, 0x94, 0xdb, 0xb6, 0x44,
+0xb6, 0x43, 0x50, 0x22, 0xff, 0xf4, 0x44, 0x30, 0x00, 0xff, 0x40, 0x51, 0x80, 0x0c, 0xb4, 0x82,
+0x40, 0x32, 0x94, 0x05, 0x40, 0x51, 0x90, 0x02, 0x96, 0x48, 0x84, 0x61, 0xb6, 0xa2, 0x4c, 0x11,
+0xc0, 0x06, 0xb4, 0x22, 0x44, 0x30, 0x00, 0x82, 0xd5, 0x03, 0xb4, 0x22, 0x94, 0xdf, 0x40, 0x41,
+0x80, 0x0c, 0x40, 0x02, 0x04, 0x04, 0xb6, 0x02, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x50, 0x00, 0x80,
+0x58, 0x52, 0x80, 0x50, 0x46, 0x40, 0x04, 0x00, 0x98, 0x85, 0x58, 0x42, 0x02, 0x7c, 0x94, 0x03,
+0x99, 0x44, 0x94, 0x93, 0x44, 0x31, 0x00, 0x00, 0x84, 0x80, 0xb6, 0x65, 0xb6, 0x82, 0x46, 0x20,
+0x04, 0x00, 0x58, 0x21, 0x02, 0x70, 0x44, 0x30, 0x00, 0xff, 0x40, 0x51, 0x80, 0x0c, 0xb4, 0x82,
+0x40, 0x32, 0x94, 0x05, 0x40, 0x51, 0x90, 0x02, 0x96, 0x48, 0x84, 0x61, 0xb6, 0xa2, 0x4c, 0x11,
+0xc0, 0x06, 0xb4, 0x22, 0x44, 0x30, 0x00, 0x82, 0xd5, 0x03, 0xb4, 0x22, 0x94, 0xdf, 0x40, 0x41,
+0x80, 0x0c, 0x40, 0x02, 0x04, 0x04, 0xb6, 0x02, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x40, 0x04, 0x00,
+0x46, 0x20, 0x30, 0x70, 0x80, 0xa4, 0x58, 0x21, 0x03, 0x07, 0x14, 0x22, 0x00, 0x9d, 0x14, 0x22,
+0x80, 0x9e, 0x46, 0x20, 0x04, 0x00, 0x58, 0x21, 0x02, 0x70, 0x44, 0x30, 0x00, 0xff, 0x94, 0x03,
+0x40, 0x51, 0x80, 0x0c, 0xb4, 0x82, 0x40, 0x32, 0x94, 0x05, 0x40, 0x51, 0x90, 0x02, 0x96, 0x48,
+0x84, 0x61, 0xb6, 0xa2, 0x4c, 0x11, 0xc0, 0x06, 0xb4, 0x22, 0x44, 0x30, 0x00, 0x86, 0xd5, 0x04,
+0xb4, 0x22, 0x44, 0x30, 0x00, 0x84, 0x40, 0x51, 0x80, 0x0c, 0x40, 0x02, 0x84, 0x04, 0xb6, 0x02,
+0xdd, 0x9e, 0x92, 0x00, 0x40, 0x31, 0xe0, 0x08, 0x40, 0x41, 0x90, 0x04, 0x40, 0x21, 0x40, 0x08,
+0x46, 0x50, 0x00, 0x80, 0x40, 0x22, 0x08, 0x04, 0x58, 0x52, 0x80, 0x50, 0x46, 0x40, 0x04, 0x00,
+0x98, 0xc5, 0x58, 0x42, 0x02, 0x7c, 0x94, 0x03, 0x99, 0x44, 0xb6, 0x45, 0x94, 0xdb, 0x84, 0x40,
+0xb6, 0x43, 0x50, 0x22, 0x7f, 0xf4, 0x44, 0x50, 0x00, 0xff, 0x40, 0x32, 0x80, 0x0c, 0xb4, 0x82,
+0x40, 0x51, 0x8c, 0x05, 0x40, 0x32, 0x90, 0x02, 0x96, 0x48, 0x84, 0xa1, 0xb6, 0x62, 0xd9, 0x05,
+0xb4, 0x22, 0x44, 0x30, 0x00, 0x82, 0xd5, 0x03, 0xb4, 0x22, 0x94, 0xef, 0x40, 0x41, 0x80, 0x0c,
+0x40, 0x02, 0x04, 0x04, 0xb6, 0x02, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x44, 0x20,
+0x00, 0x19, 0x96, 0x48, 0x80, 0x62, 0x84, 0x81, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x84, 0xc4,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x44, 0x20, 0x00, 0x32, 0x96, 0x48, 0x84, 0x6a, 0x84, 0x81, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x84, 0xc4, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x10, 0x04, 0x00, 0x04, 0x00, 0x80, 0x20, 0x54, 0x00,
+0x01, 0x00, 0xc0, 0x09, 0x84, 0x00, 0x80, 0x20, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x84, 0x0c,
+0xdd, 0x2f, 0xd5, 0x07, 0x80, 0x20, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x83, 0xb4, 0xdd, 0x2f,
+0x46, 0x20, 0x04, 0x00, 0x58, 0x21, 0x00, 0x20, 0xb4, 0x22, 0x59, 0xe0, 0x88, 0x00, 0x15, 0xe1,
+0x00, 0x00, 0x84, 0x01, 0xb4, 0xa2, 0x84, 0x20, 0x42, 0x32, 0xc4, 0x09, 0xb6, 0x62, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x84, 0x6c, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x84, 0x48, 0x96, 0x49, 0x4c, 0x11, 0x40, 0x04, 0x84, 0x81,
+0xd5, 0x07, 0x95, 0x51, 0xd1, 0x04, 0x84, 0x01, 0x48, 0x00, 0x00, 0xc4, 0x84, 0x82, 0x46, 0xa0,
+0x10, 0x00, 0x58, 0xa5, 0x00, 0x01, 0x85, 0x20, 0x47, 0xc1, 0x11, 0x10, 0x46, 0x70, 0x04, 0x00,
+0xb6, 0x9f, 0x14, 0xaf, 0x80, 0x01, 0x59, 0xce, 0x01, 0x90, 0x81, 0x49, 0x58, 0x73, 0x82, 0x70,
+0x46, 0x80, 0x00, 0x01, 0x58, 0x84, 0x04, 0x0c, 0x81, 0x20, 0x80, 0x29, 0xa3, 0x89, 0xb4, 0x21,
+0xe6, 0xc4, 0x4e, 0xf2, 0x00, 0xa0, 0x84, 0xa4, 0xd1, 0x34, 0xe6, 0x25, 0xe8, 0x0a, 0x84, 0xa1,
+0xd1, 0x1d, 0xc1, 0x17, 0x84, 0xa2, 0xd1, 0x21, 0x84, 0xa3, 0x4c, 0x12, 0xc0, 0x94, 0xd5, 0x25,
+0x8c, 0xac, 0xd1, 0x42, 0xe6, 0x31, 0xe8, 0x07, 0x84, 0xa5, 0xd1, 0x2a, 0x84, 0xa6, 0x4c, 0x12,
+0xc0, 0x8a, 0xd5, 0x32, 0x9d, 0x69, 0xd1, 0x59, 0x9d, 0x69, 0x4c, 0x12, 0xc0, 0x84, 0xd5, 0x64,
+0x80, 0x06, 0x84, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0xd5, 0x7d, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x83, 0xb4, 0xdd, 0x2f, 0xd5, 0x76, 0x80, 0x06, 0x84, 0x20, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x84, 0x6c, 0xdd, 0x2f, 0xd5, 0x6e, 0x84, 0x21, 0x44, 0x20, 0x00, 0x32, 0xd5, 0x0b,
+0x80, 0x06, 0x84, 0x21, 0x46, 0x20, 0x00, 0x01, 0x58, 0x21, 0x05, 0x28, 0xd5, 0x62, 0x84, 0x21,
+0x44, 0x20, 0x00, 0x11, 0x80, 0x06, 0x80, 0x62, 0x80, 0x81, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x84, 0xc4, 0xdd, 0x2f, 0xd5, 0x57, 0x80, 0x06, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x85, 0x4c, 0xdd, 0x2f, 0xd5, 0x4f, 0x46, 0x50, 0x00, 0x80, 0x58, 0x52, 0x80, 0x50, 0x46, 0x20,
+0x04, 0x00, 0x98, 0xf5, 0x58, 0x21, 0x02, 0x7c, 0x95, 0x73, 0x98, 0x6a, 0x15, 0xc0, 0x80, 0x00,
+0x41, 0xe1, 0x8c, 0x08, 0xf4, 0x01, 0xb6, 0x9e, 0x44, 0x00, 0x00, 0x82, 0xb4, 0x47, 0x40, 0x60,
+0x14, 0x0c, 0x41, 0xe1, 0x20, 0x09, 0x41, 0xef, 0x20, 0x08, 0x15, 0xe3, 0x80, 0x00, 0xb4, 0x27,
+0x40, 0x63, 0x04, 0x04, 0xb6, 0xc7, 0xd5, 0x2e, 0x80, 0x06, 0x84, 0x21, 0x4b, 0xe0, 0x20, 0x01,
+0x80, 0x46, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0c, 0xc0, 0x46, 0x10, 0x00, 0x01, 0x58, 0x10,
+0x87, 0x78, 0x84, 0x61, 0xd5, 0x0f, 0x80, 0x06, 0x84, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0x80, 0x46,
+0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0c, 0xc0, 0x46, 0x10, 0x00, 0x01, 0x58, 0x10, 0x87, 0x78,
+0x84, 0x63, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x0c, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0d,
+0x58, 0x00, 0x0c, 0xc0, 0x44, 0x10, 0x13, 0x88, 0x46, 0x20, 0x00, 0x00, 0x58, 0x21, 0x02, 0x54,
+0xdd, 0x22, 0xb4, 0x1f, 0x8d, 0x41, 0x8d, 0x28, 0xe3, 0x40, 0x4e, 0xf3, 0xff, 0x58, 0x84, 0x00,
+0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0x84, 0xa2, 0x80, 0xc0,
+0xd1, 0x25, 0x84, 0xa3, 0xd1, 0x2a, 0x84, 0xa1, 0xd9, 0x2e, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x83, 0xb4, 0xdd, 0x2f, 0x80, 0x46, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0c, 0xc0, 0x46, 0x10,
+0x00, 0x01, 0x58, 0x10, 0x87, 0x78, 0x84, 0x62, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x0c,
+0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0c, 0xc0, 0x44, 0x10, 0x0b, 0xb8, 0x46, 0xf0,
+0x00, 0x00, 0x58, 0xf7, 0x82, 0x54, 0xdd, 0x2f, 0xd5, 0x0e, 0x84, 0x20, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x84, 0x6c, 0xdd, 0x2f, 0xd5, 0x07, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x83, 0xb4, 0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0xef, 0xf8, 0x46, 0x10, 0x04, 0x00, 0x04, 0x60, 0x80, 0x97, 0x96, 0x34, 0xc0, 0x15, 0x80, 0x61,
+0x04, 0x21, 0x80, 0x20, 0x54, 0x01, 0x01, 0x00, 0xc0, 0x09, 0x84, 0x00, 0x80, 0x20, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x84, 0x0c, 0xdd, 0x2f, 0xd5, 0x07, 0x80, 0x20, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x83, 0xb4, 0xdd, 0x2f, 0x40, 0x43, 0x40, 0x08, 0x92, 0x9f, 0xc4, 0x06, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x8d, 0x20, 0xdd, 0x2f, 0x55, 0xe3, 0x10, 0x00, 0x4f, 0xe2, 0x00, 0x07,
+0x84, 0x21, 0x46, 0xf0, 0x00, 0x0d, 0x10, 0x17, 0x8e, 0x38, 0x46, 0x30, 0x04, 0x00, 0x14, 0x61,
+0x80, 0x97, 0x04, 0x21, 0x80, 0x97, 0xf2, 0x81, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e,
+0x96, 0x49, 0x54, 0x20, 0x80, 0x03, 0x40, 0x30, 0x88, 0x09, 0xca, 0x10, 0x5c, 0xf0, 0x80, 0xc8,
+0xe8, 0x0d, 0x80, 0x20, 0xb4, 0x40, 0x84, 0x01, 0xd5, 0x04, 0xb4, 0x81, 0x9c, 0x01, 0xab, 0x11,
+0x9c, 0x4c, 0xe2, 0x03, 0xe9, 0xfb, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0x3c, 0xa4, 0x88, 0x5c, 0xf1, 0x00, 0xc8, 0xe8, 0x16, 0x80, 0x60, 0xa2, 0x99,
+0xb4, 0xa3, 0x5c, 0xf2, 0x80, 0x40, 0xe8, 0x10, 0x84, 0x60, 0xd5, 0x04, 0xa3, 0x91, 0x80, 0x64,
+0xb6, 0xc0, 0x40, 0x21, 0x20, 0x08, 0x92, 0x48, 0x9c, 0x04, 0x9d, 0x19, 0xdb, 0xf8, 0x94, 0x22,
+0xac, 0x08, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0x3a, 0x6f, 0x98, 0x04, 0xdd, 0x9e, 0x92, 0x00,
+0x96, 0x49, 0xe6, 0x28, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x29, 0x80, 0x40, 0xa2, 0xd1, 0x8c, 0x08,
+0xb4, 0x22, 0xb4, 0x40, 0xc3, 0x02, 0xd5, 0x21, 0x46, 0x44, 0x00, 0x04, 0x46, 0x10, 0x04, 0x00,
+0x58, 0x10, 0x80, 0xdc, 0x40, 0x51, 0x10, 0x04, 0xb6, 0xa1, 0x80, 0x03, 0xd5, 0x09, 0x92, 0x00,
+0x84, 0x67, 0x9c, 0x49, 0x4c, 0x11, 0xff, 0xfd, 0x9c, 0x01, 0x84, 0xaa, 0xd0, 0x03, 0x84, 0x20,
+0xd5, 0xf7, 0x46, 0x1b, 0xff, 0xfb, 0x46, 0x00, 0x04, 0x00, 0x58, 0x10, 0x8f, 0xff, 0x40, 0x21,
+0x04, 0x02, 0x58, 0x00, 0x00, 0xdc, 0xb6, 0x40, 0x84, 0x00, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xf4, 0x80, 0xe4, 0x81, 0x42, 0x81, 0x03, 0x81, 0x25, 0x55, 0xc0, 0x00, 0xff, 0x97, 0x08,
+0x5c, 0xf3, 0x80, 0xc1, 0xe8, 0x4e, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x64, 0xf4, 0x81,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x83, 0x24, 0xdd, 0x2f, 0x80, 0xc0, 0xf4, 0x01, 0xc0, 0x41,
+0x46, 0xf0, 0x00, 0x0d, 0x00, 0x37, 0x8c, 0xdc, 0x54, 0x22, 0x00, 0x0f, 0x54, 0x5e, 0x00, 0x0f,
+0x41, 0xe1, 0x40, 0x08, 0x40, 0x02, 0xd0, 0x08, 0x46, 0x25, 0x80, 0x00, 0xa1, 0x72, 0x40, 0x4f,
+0x00, 0x04, 0x54, 0x11, 0x80, 0x03, 0x41, 0xe2, 0x08, 0x04, 0x14, 0x82, 0x80, 0x01, 0x40, 0x00,
+0xe4, 0x08, 0xb7, 0x45, 0x50, 0x83, 0x80, 0x08, 0x40, 0x3f, 0x00, 0x04, 0x80, 0x47, 0x54, 0x84,
+0x3f, 0xff, 0x80, 0x29, 0x50, 0x02, 0x80, 0x08, 0x40, 0x71, 0xa0, 0x04, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x86, 0xf0, 0xdd, 0x2f, 0x84, 0x21, 0x84, 0x00, 0x10, 0x13, 0x00, 0x0f, 0x10, 0x03,
+0x00, 0x14, 0x12, 0x83, 0x00, 0x06, 0xa9, 0xf4, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74,
+0x80, 0x26, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0xa0, 0xdd, 0x2f, 0x84, 0x00, 0xd5, 0x02,
+0x84, 0x01, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x97, 0x09, 0x97, 0xd8, 0xe6, 0x84, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x1f, 0xb4, 0x00,
+0x84, 0x21, 0x4c, 0x00, 0x80, 0x03, 0xd5, 0x19, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x74,
+0x04, 0x33, 0x00, 0xa9, 0xb6, 0x62, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7, 0x84, 0x3c, 0xdd, 0x2f,
+0x84, 0x40, 0x80, 0x27, 0x50, 0x53, 0x02, 0xa4, 0x84, 0x05, 0x80, 0x62, 0x84, 0x84, 0x46, 0xf0,
+0x00, 0x01, 0x58, 0xf7, 0x89, 0x2c, 0xdd, 0x2f, 0x84, 0x05, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xfc, 0x97, 0x82, 0x46, 0x00, 0x00, 0x0d,
+0x58, 0x00, 0x0e, 0x64, 0x97, 0xc8, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x83, 0x24, 0xdd, 0x2f,
+0xc8, 0x03, 0x84, 0x01, 0xd5, 0x2b, 0x46, 0xf0, 0x00, 0x0d, 0x01, 0xe7, 0x8c, 0xdc, 0x54, 0x53,
+0x80, 0x0f, 0x54, 0x4f, 0x00, 0x03, 0x40, 0x32, 0xc0, 0x08, 0x40, 0x12, 0x64, 0x08, 0x46, 0x25,
+0x88, 0x08, 0x41, 0xe1, 0x84, 0x04, 0xa1, 0x42, 0x58, 0x21, 0x00, 0x08, 0x40, 0x1f, 0x08, 0x04,
+0x84, 0x88, 0x84, 0x61, 0x84, 0x40, 0xb6, 0xc5, 0xa8, 0x44, 0xad, 0x06, 0x10, 0x30, 0x00, 0x0f,
+0x10, 0x20, 0x00, 0x14, 0x80, 0x20, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x87, 0xa0, 0xdd, 0x2f, 0x84, 0x00, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0xf0, 0x00, 0x0d, 0x20, 0x27, 0x8c, 0xde,
+0x84, 0xa1, 0xda, 0x58, 0x46, 0x60, 0x04, 0x10, 0x04, 0x53, 0x01, 0x0e, 0x40, 0x82, 0xc0, 0x09,
+0x46, 0xf0, 0x00, 0x0b, 0x00, 0x37, 0x80, 0x1d, 0x54, 0x84, 0x00, 0xff, 0xe3, 0x03, 0xe9, 0x22,
+0x46, 0x70, 0x00, 0x0d, 0x20, 0x63, 0x8c, 0xe1, 0xce, 0x1d, 0x46, 0xf0, 0x00, 0x0d, 0x10, 0x67,
+0x8c, 0xe0, 0x10, 0x23, 0x8c, 0xe1, 0x80, 0x02, 0x80, 0x26, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x8a, 0x44, 0xdd, 0x2f, 0xc0, 0x03, 0x10, 0x63, 0x8c, 0xe1, 0x84, 0x01, 0x80, 0x20, 0x46, 0x60,
+0x00, 0x01, 0x58, 0x63, 0x0a, 0x44, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x01, 0x84, 0x22, 0x4b, 0xe0,
+0x18, 0x01, 0x46, 0xf0, 0x00, 0x0d, 0x00, 0x27, 0x8c, 0xdf, 0xe2, 0x48, 0xe9, 0x23, 0x46, 0x70,
+0x00, 0x0d, 0x20, 0x63, 0x8c, 0xe0, 0xce, 0x1e, 0x84, 0x61, 0x46, 0xf0, 0x00, 0x0d, 0x10, 0x67,
+0x8c, 0xe1, 0x10, 0x33, 0x8c, 0xe0, 0x80, 0x06, 0x80, 0x26, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x8a, 0x44, 0xdd, 0x2f, 0xc0, 0x03, 0x10, 0x63, 0x8c, 0xe0, 0x84, 0x21, 0x46, 0x60, 0x00, 0x01,
+0x58, 0x63, 0x0a, 0x44, 0x84, 0x00, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x00, 0x84, 0x22, 0x4b, 0xe0,
+0x18, 0x01, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0xa2, 0x41, 0x84, 0x41,
+0xb4, 0x00, 0x4c, 0x11, 0x40, 0x07, 0x46, 0xf0, 0x00, 0x0e, 0x10, 0x07, 0x80, 0xc8, 0xd5, 0x4b,
+0x84, 0xa3, 0xd9, 0x3e, 0x96, 0x00, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x74, 0x10, 0x03,
+0x02, 0xa8, 0x46, 0x10, 0x04, 0x10, 0x04, 0x40, 0x82, 0x03, 0x42, 0x22, 0x60, 0x09, 0x42, 0x21,
+0x64, 0x09, 0xc8, 0x0f, 0x46, 0x30, 0x30, 0x00, 0x41, 0xe1, 0x0c, 0x04, 0x15, 0xe0, 0x82, 0x03,
+0x50, 0x03, 0x02, 0x68, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x1c, 0xdd, 0x2f, 0xd5, 0x2b,
+0x42, 0x01, 0x60, 0x08, 0x84, 0x40, 0x14, 0x00, 0x82, 0x03, 0x10, 0x23, 0x02, 0x64, 0x14, 0x23,
+0x00, 0xa9, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8b, 0x34, 0xdd, 0x2f, 0x84, 0x01, 0x80, 0x20,
+0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x85, 0x28, 0xdd, 0x2f, 0x50, 0x03, 0x02, 0x68, 0x44, 0x10,
+0x27, 0x10, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x54, 0xdd, 0x2f, 0xd5, 0x0c, 0x84, 0xa4,
+0xd9, 0x0a, 0x5c, 0x50, 0x00, 0x03, 0x84, 0x80, 0x40, 0x02, 0x14, 0x1a, 0x46, 0xf0, 0x00, 0x0e,
+0x10, 0x07, 0x80, 0xd9, 0x84, 0x00, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0x94, 0x80, 0xc0, 0xb4, 0x00, 0x84, 0x21, 0x4c, 0x00, 0xc0, 0x24, 0x9c, 0xb4, 0xb4, 0x22,
+0x50, 0x33, 0x00, 0x0c, 0x97, 0x0c, 0x8c, 0xc8, 0xb4, 0x46, 0xb4, 0x63, 0xc4, 0x05, 0x46, 0xf0,
+0x00, 0x0e, 0x10, 0x07, 0x80, 0xc9, 0x54, 0x00, 0x80, 0x02, 0xc0, 0x0a, 0x85, 0x01, 0x46, 0xf0,
+0x00, 0x0e, 0x10, 0x87, 0x80, 0xcb, 0x46, 0xf0, 0x00, 0x0e, 0x10, 0x87, 0x80, 0xca, 0x46, 0xf0,
+0x00, 0x0e, 0x14, 0x37, 0x80, 0x35, 0x46, 0xf0, 0x00, 0x0e, 0x14, 0x27, 0x80, 0x34, 0xd5, 0x4e,
+0x84, 0xa2, 0xd8, 0x4e, 0x01, 0xe3, 0x00, 0x50, 0x00, 0x43, 0x00, 0x51, 0x00, 0x33, 0x00, 0x53,
+0x51, 0xc3, 0x00, 0x04, 0xb5, 0x3c, 0x01, 0xc3, 0x00, 0x52, 0x15, 0xef, 0x80, 0x01, 0xf3, 0x83,
+0xf4, 0x82, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xf0, 0x50, 0x13, 0x00, 0x08, 0x94, 0xad,
+0x50, 0xaf, 0x80, 0x50, 0x50, 0x0f, 0x80, 0x10, 0x46, 0x70, 0x00, 0x0d, 0x58, 0x73, 0x8e, 0x74,
+0xdd, 0x28, 0x50, 0x13, 0x00, 0x48, 0x84, 0x48, 0x42, 0x64, 0x84, 0x0b, 0x80, 0x0a, 0x54, 0x94,
+0x80, 0x01, 0xdd, 0x28, 0x10, 0x93, 0x82, 0x3f, 0x10, 0x63, 0x82, 0x40, 0x50, 0x1f, 0x80, 0x10,
+0xf5, 0x01, 0x44, 0x20, 0x00, 0x40, 0x10, 0x53, 0x82, 0x3c, 0x50, 0x03, 0x80, 0xd0, 0xf3, 0x02,
+0x10, 0x33, 0x82, 0x3d, 0xf4, 0x03, 0x13, 0xc3, 0x81, 0x26, 0x10, 0x43, 0x82, 0x3e, 0xdd, 0x28,
+0x80, 0x2a, 0x84, 0x48, 0x50, 0x03, 0x80, 0xc8, 0xdd, 0x28, 0x50, 0x13, 0x80, 0xd0, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x87, 0x7c, 0xdd, 0x2f, 0x84, 0x00, 0xd5, 0x2a, 0x84, 0xa3,
+0xd0, 0x02, 0xd5, 0x26, 0x50, 0x9f, 0x80, 0x60, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xf0,
+0x9c, 0x74, 0x84, 0x46, 0x50, 0x8f, 0x80, 0x58, 0x80, 0x09, 0xdd, 0x27, 0x50, 0x13, 0x00, 0x0a,
+0x84, 0x46, 0x80, 0x08, 0xdd, 0x27, 0x80, 0x29, 0x84, 0x46, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00,
+0x01, 0x28, 0xdd, 0x27, 0x8c, 0xd0, 0x84, 0x46, 0x80, 0x28, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00,
+0x00, 0xb5, 0xdd, 0x27, 0xb4, 0x06, 0x46, 0xf0, 0x00, 0x0e, 0x14, 0x07, 0x80, 0x45, 0x84, 0x01,
+0xec, 0x6c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa8, 0xbc, 0x96, 0x49, 0x54, 0x70,
+0x80, 0x07, 0x40, 0xa0, 0x88, 0x09, 0xcf, 0x2e, 0x9d, 0x84, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94,
+0x8e, 0xf8, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x0d, 0xb8, 0xd5, 0x1f, 0xb4, 0x20, 0x40, 0x00,
+0xa0, 0x08, 0x92, 0x08, 0x40, 0x20, 0xf8, 0x09, 0x4e, 0x14, 0x00, 0x0a, 0x40, 0x00, 0xc0, 0x09,
+0x84, 0x40, 0x96, 0x48, 0x96, 0x00, 0x4b, 0xe0, 0x20, 0x01, 0xd5, 0x0a, 0x84, 0xa1, 0xda, 0x09,
+0x40, 0x40, 0xc0, 0x09, 0x96, 0x20, 0x96, 0x48, 0x84, 0x40, 0x4b, 0xe0, 0x24, 0x01, 0xc8, 0x0a,
+0xb4, 0xa0, 0x9d, 0xfa, 0xb6, 0xa6, 0x8c, 0xc8, 0x9e, 0x34, 0xe2, 0xea, 0xe9, 0xe0, 0x84, 0x00,
+0xd5, 0x02, 0x84, 0x01, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xfc, 0x96, 0x49, 0x54, 0x70, 0x80, 0x07, 0x41, 0xc0, 0x88, 0x09, 0xcf, 0x35, 0x9d, 0x84,
+0x46, 0xa0, 0x00, 0x05, 0x58, 0xa5, 0x0f, 0x6c, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x8e, 0x70,
+0xd5, 0x26, 0xb4, 0x20, 0x9d, 0xfa, 0x40, 0x00, 0xa0, 0x08, 0x92, 0x08, 0x40, 0x80, 0xf8, 0x09,
+0x4e, 0x14, 0x00, 0x0c, 0x40, 0x00, 0xc0, 0x09, 0xb4, 0x46, 0x96, 0x00, 0x96, 0x48, 0x4b, 0xe0,
+0x24, 0x01, 0x84, 0xa1, 0xd0, 0x13, 0xd5, 0x18, 0x84, 0xa1, 0x4c, 0x82, 0xc0, 0x0c, 0x40, 0x50,
+0xc0, 0x09, 0xb4, 0x46, 0x96, 0x28, 0x96, 0x48, 0x4b, 0xe0, 0x28, 0x01, 0x4c, 0x04, 0x00, 0x07,
+0xd5, 0x0b, 0x05, 0xe3, 0x00, 0x00, 0x15, 0xe0, 0x00, 0x00, 0x8c, 0xc8, 0x9e, 0x34, 0xe2, 0xfc,
+0xe9, 0xd9, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xec, 0x04, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x85, 0x0c, 0x96, 0xc9, 0x40, 0x21, 0xa1, 0x17, 0x40, 0x11,
+0x88, 0x09, 0xf1, 0x81, 0x4e, 0x83, 0x00, 0x6a, 0x50, 0x70, 0x00, 0x08, 0x9d, 0x84, 0x47, 0xc0,
+0x00, 0x05, 0x59, 0xce, 0x0e, 0x70, 0xd5, 0x5a, 0xb4, 0x20, 0x40, 0x00, 0xa0, 0x08, 0x92, 0x08,
+0x8d, 0x03, 0x40, 0x20, 0xf8, 0x09, 0x4e, 0x14, 0x00, 0x20, 0x40, 0x90, 0xc0, 0x09, 0x54, 0x94,
+0x80, 0xff, 0x54, 0xa0, 0x80, 0xff, 0x80, 0x2a, 0x84, 0x40, 0x80, 0x09, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0x80, 0x40, 0x80, 0x2a, 0x80, 0x09, 0xca, 0x46, 0xb4, 0x66,
+0xb4, 0x82, 0x05, 0xe3, 0x80, 0x00, 0x40, 0x21, 0x8c, 0x05, 0x40, 0x51, 0x10, 0x02, 0x40, 0x22,
+0xf8, 0x04, 0xdd, 0x3c, 0xd5, 0x23, 0x84, 0xa1, 0xda, 0x24, 0x40, 0x00, 0xc0, 0x09, 0x54, 0x90,
+0x00, 0xff, 0x54, 0xa0, 0x80, 0xff, 0x80, 0x2a, 0x84, 0x40, 0x80, 0x09, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x80, 0x40, 0x80, 0x2a, 0x80, 0x09, 0xca, 0x26, 0xb4, 0xa6,
+0xb4, 0x82, 0xb4, 0x67, 0x40, 0x22, 0x94, 0x05, 0x41, 0xe1, 0x10, 0x02, 0x40, 0x2f, 0x0c, 0x04,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8f, 0x6c, 0xdd, 0x2f, 0x84, 0xa1, 0xd0, 0x0d, 0xd5, 0x15,
+0xb4, 0x60, 0xb4, 0x26, 0xb4, 0x47, 0x40, 0x50, 0x84, 0x05, 0x40, 0x41, 0x94, 0x02, 0x41, 0xe2,
+0x08, 0x04, 0x15, 0xe0, 0x00, 0x00, 0x8c, 0xcc, 0x8c, 0xec, 0x05, 0xef, 0x80, 0x01, 0x9e, 0x34,
+0xe3, 0x1e, 0xe9, 0xa3, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x96, 0x49, 0xe6, 0x24, 0xe8, 0x03,
+0x84, 0x01, 0xd5, 0x5b, 0xb4, 0x20, 0x84, 0xa4, 0xd1, 0x2a, 0xe6, 0x25, 0xe8, 0x06, 0x84, 0xa1,
+0xd1, 0x09, 0x84, 0xa3, 0xd9, 0x51, 0xd5, 0x12, 0x84, 0xa5, 0xd1, 0x31, 0x84, 0xa6, 0xd9, 0x4c,
+0xd5, 0x38, 0x9c, 0x04, 0xb4, 0x40, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0c, 0xdc, 0x96, 0x50,
+0xae, 0x40, 0xe6, 0x22, 0xe9, 0x41, 0x84, 0x20, 0xd5, 0x20, 0x9d, 0x04, 0xb4, 0x64, 0x46, 0x10,
+0x00, 0x0b, 0x58, 0x10, 0x80, 0x1c, 0x54, 0x01, 0x80, 0x0f, 0xae, 0x08, 0xe6, 0x04, 0xe9, 0x03,
+0x84, 0x05, 0xd5, 0x31, 0xc8, 0x31, 0x84, 0xa1, 0xaf, 0x48, 0xd5, 0x2f, 0x9c, 0x84, 0xb4, 0x22,
+0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0c, 0xdd, 0x55, 0xe0, 0x80, 0x0f, 0x11, 0xe0, 0x00, 0x00,
+0x5c, 0xff, 0x00, 0x04, 0xe9, 0x21, 0x84, 0x23, 0xae, 0x40, 0xd5, 0x1e, 0x9c, 0xc4, 0xb4, 0x03,
+0x54, 0x00, 0x00, 0x0f, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x88, 0x64, 0xdd, 0x2f, 0xd5, 0x14,
+0x9c, 0x84, 0xb4, 0x02, 0x40, 0x50, 0x40, 0x09, 0x40, 0x10, 0x7c, 0x09, 0x46, 0xf0, 0x00, 0x0b,
+0x10, 0x57, 0x80, 0x1d, 0x46, 0xf0, 0x00, 0x0d, 0x10, 0x17, 0x8c, 0xde, 0x46, 0x10, 0x00, 0x0d,
+0x58, 0x10, 0x8c, 0xdf, 0xae, 0x08, 0x84, 0x00, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x04, 0x80, 0x80, 0x04, 0x80, 0xc1, 0x40, 0x14, 0x50, 0x09,
+0x81, 0x20, 0x54, 0x10, 0x80, 0x7f, 0x44, 0x00, 0x00, 0x10, 0x84, 0xe4, 0x4c, 0x10, 0x00, 0x60,
+0xe4, 0x31, 0xe8, 0x18, 0x84, 0xa9, 0xd1, 0x35, 0xe4, 0x2a, 0xe8, 0x0b, 0x84, 0xa2, 0x4c, 0x12,
+0x80, 0x9d, 0x84, 0xa8, 0xd1, 0x26, 0x84, 0xa1, 0x4c, 0x12, 0xc0, 0xf4, 0x48, 0x00, 0x00, 0x8e,
+0x84, 0x0b, 0x4c, 0x10, 0x00, 0x41, 0xe0, 0x20, 0xe9, 0x2c, 0x84, 0xac, 0x4c, 0x12, 0xc0, 0xea,
+0xd5, 0x32, 0x44, 0x50, 0x00, 0x18, 0xd1, 0x5b, 0xe4, 0x39, 0xe8, 0x09, 0x9d, 0x45, 0xd1, 0x4f,
+0x9d, 0x46, 0xd1, 0x0d, 0x9d, 0x44, 0x4c, 0x12, 0xc0, 0xdd, 0xd5, 0x41, 0x9d, 0x6e, 0xd1, 0x65,
+0x9d, 0x69, 0xd1, 0x6b, 0x9f, 0x6e, 0x4c, 0x12, 0xc0, 0xd5, 0xd5, 0x51, 0x84, 0x01, 0xd5, 0x7c,
+0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x88, 0x60, 0xdd, 0x2f, 0xd5, 0x74,
+0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8e, 0x80, 0xdd, 0x2f, 0xd5, 0x6c,
+0xa0, 0x32, 0xa4, 0x76, 0x54, 0x74, 0x3f, 0xff, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8d, 0x88,
+0xdd, 0x2f, 0xd5, 0x62, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8d, 0xfc,
+0xdd, 0x2f, 0xd5, 0x5a, 0xa0, 0x32, 0x50, 0x13, 0x00, 0x0c, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7,
+0x88, 0x90, 0xdd, 0x2f, 0xa5, 0xf6, 0x54, 0x73, 0xbf, 0xff, 0xd5, 0x4e, 0xa0, 0x32, 0xa4, 0x76,
+0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x85, 0xd0, 0xdd, 0x2f, 0xd5, 0x46, 0xa0, 0x32, 0xa4, 0x76,
+0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7, 0x83, 0x2c, 0xdd, 0x2f, 0xd5, 0x3e, 0xa0, 0x32, 0xa4, 0x76,
+0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8c, 0x3c, 0xdd, 0x2f, 0xd5, 0x36, 0xa0, 0x32, 0xa4, 0x76,
+0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x8b, 0x88, 0xdd, 0x2f, 0xd5, 0x2e, 0x40, 0x24, 0x40, 0x09,
+0xa4, 0x76, 0xa0, 0x32, 0x54, 0x31, 0x00, 0x0f, 0x50, 0x2f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x89, 0xec, 0xdd, 0x2f, 0xd5, 0x75, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x08,
+0x58, 0xf7, 0x82, 0x20, 0xdd, 0x2f, 0xd5, 0x18, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x09,
+0x58, 0xf7, 0x8b, 0xfc, 0xdd, 0x2f, 0xd5, 0x10, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x8f, 0x74, 0xdd, 0x2f, 0xd5, 0x08, 0xa0, 0x32, 0xa4, 0x76, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x88, 0xd0, 0xdd, 0x2f, 0x93, 0x10, 0x54, 0x84, 0x00, 0x0f, 0x4e, 0x82, 0x00, 0x52,
+0x46, 0x3f, 0xff, 0x0f, 0x58, 0x31, 0x8f, 0xff, 0x40, 0x73, 0x8c, 0x02, 0x40, 0x84, 0x40, 0x08,
+0x41, 0xe3, 0xa0, 0x04, 0x42, 0x5f, 0x78, 0x09, 0x42, 0x52, 0xfc, 0x09, 0x46, 0x4f, 0xf0, 0xff,
+0x42, 0x32, 0xf8, 0x08, 0x54, 0x10, 0x00, 0x0f, 0x58, 0x42, 0x0f, 0xff, 0x40, 0x71, 0x90, 0x02,
+0x40, 0x00, 0xd0, 0x08, 0x47, 0xec, 0x6f, 0xff, 0x40, 0x53, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x0d,
+0x00, 0x37, 0x8c, 0xdc, 0x59, 0xef, 0x0f, 0xff, 0x46, 0x11, 0x80, 0x00, 0x40, 0x42, 0xf8, 0x02,
+0x40, 0x72, 0x04, 0x04, 0x54, 0x01, 0x80, 0x03, 0x42, 0x53, 0xe4, 0x09, 0x42, 0x52, 0xe8, 0x09,
+0x41, 0xe0, 0x64, 0x08, 0x40, 0x32, 0xf8, 0x04, 0x42, 0x71, 0xbc, 0x09, 0x54, 0x13, 0xbf, 0xff,
+0xe4, 0x28, 0xe8, 0x07, 0x40, 0x03, 0xb8, 0x09, 0x40, 0x00, 0x38, 0x08, 0x58, 0x70, 0x00, 0x08,
+0x54, 0x53, 0xbf, 0xff, 0x84, 0x21, 0x10, 0x13, 0x00, 0x0f, 0xad, 0x76, 0xa9, 0xf4, 0x80, 0x09,
+0x80, 0x26, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x87, 0xa0, 0xdd, 0x2f, 0x84, 0x01, 0xd5, 0x02,
+0x84, 0x00, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xfc, 0x44, 0x20, 0x00, 0x14, 0x80, 0xc0, 0x80, 0xe1, 0x84, 0x20, 0x46, 0xf0, 0x01, 0x02,
+0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa6, 0x70, 0xa6, 0xb4, 0xa6, 0x31, 0x84, 0x7e, 0x40, 0x40,
+0x8c, 0x02, 0x92, 0x02, 0x94, 0x02, 0x40, 0x51, 0x0c, 0x02, 0xaf, 0x30, 0xaf, 0x74, 0xae, 0x31,
+0xa7, 0x37, 0x00, 0x33, 0x80, 0x9d, 0x54, 0x21, 0x00, 0x02, 0xae, 0xf5, 0xa6, 0xf3, 0xa1, 0x7b,
+0x00, 0x03, 0x80, 0x9e, 0x54, 0x31, 0x80, 0x38, 0x98, 0x28, 0x96, 0x01, 0x40, 0x70, 0x20, 0x09,
+0x54, 0x53, 0x80, 0x0f, 0x92, 0x84, 0x95, 0x24, 0x40, 0x42, 0x14, 0x04, 0x58, 0x21, 0x00, 0x1c,
+0x54, 0x50, 0x80, 0x08, 0x58, 0x31, 0x80, 0x40, 0x84, 0x20, 0xaf, 0x70, 0xaf, 0x37, 0xae, 0xb4,
+0xae, 0x72, 0xae, 0xf3, 0xae, 0x36, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xfc, 0x44, 0x20, 0x00, 0x14, 0x80, 0xc0, 0x80, 0xe1, 0x84, 0x20,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa6, 0x70, 0xa6, 0xb4, 0xa6, 0x31,
+0x84, 0x7e, 0x40, 0x40, 0x8c, 0x02, 0x92, 0x02, 0x94, 0x02, 0x40, 0x51, 0x0c, 0x02, 0xaf, 0x30,
+0xaf, 0x74, 0xae, 0x31, 0xa7, 0x37, 0x00, 0x33, 0x80, 0x9d, 0x54, 0x21, 0x00, 0x02, 0xae, 0xf5,
+0xa6, 0xf3, 0xa1, 0x7b, 0x00, 0x03, 0x80, 0x9e, 0x58, 0x21, 0x00, 0x1c, 0x98, 0x28, 0x96, 0x01,
+0x40, 0x70, 0x20, 0x09, 0x54, 0x53, 0x80, 0x0f, 0x92, 0x84, 0x95, 0x24, 0x40, 0x42, 0x14, 0x04,
+0x54, 0x31, 0x80, 0x38, 0x54, 0x50, 0x80, 0x08, 0x84, 0x20, 0xaf, 0x70, 0xaf, 0x37, 0xae, 0xb4,
+0xae, 0x72, 0xae, 0xf3, 0xae, 0x36, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa0, 0xbc, 0x44, 0x60, 0x00, 0x18, 0x10, 0x60, 0x00, 0x9e, 0x50, 0x60, 0x00, 0x24,
+0x80, 0xe0, 0x84, 0x20, 0x44, 0x20, 0x00, 0x18, 0x80, 0x06, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7,
+0x87, 0x08, 0xdd, 0x2f, 0xa6, 0xf0, 0x00, 0x83, 0x00, 0x01, 0x44, 0x0f, 0xff, 0xd8, 0x40, 0x44,
+0x00, 0x02, 0x54, 0x51, 0x80, 0x03, 0x58, 0x22, 0x80, 0x08, 0x58, 0x12, 0x00, 0x01, 0x84, 0x60,
+0x10, 0x33, 0x00, 0x16, 0x10, 0x33, 0x00, 0x17, 0xae, 0xb0, 0xae, 0x71, 0x46, 0x80, 0x01, 0x02,
+0x58, 0x84, 0x06, 0xf0, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x80, 0xb5, 0x84, 0x46, 0x50, 0x03,
+0x80, 0x28, 0x4b, 0xe0, 0x20, 0x01, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x81, 0x28, 0x84, 0x46,
+0x50, 0x03, 0x80, 0x2e, 0x4b, 0xe0, 0x20, 0x01, 0xa0, 0x79, 0x50, 0x03, 0x80, 0x34, 0x84, 0x46,
+0x4b, 0xe0, 0x20, 0x01, 0x00, 0x03, 0x80, 0x94, 0xc0, 0x06, 0xa6, 0x71, 0x59, 0xe0, 0x80, 0x40,
+0x11, 0xe3, 0x00, 0x01, 0xa7, 0x31, 0x42, 0x22, 0x10, 0x09, 0xae, 0xb1, 0x3a, 0x6f, 0xa0, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x80, 0x20, 0x46, 0x00, 0x00, 0x0d,
+0x58, 0x00, 0x0e, 0x74, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x86, 0x7c, 0xdd, 0x2f, 0x84, 0x00,
+0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa8, 0xbc, 0xef, 0x60, 0x81, 0x01,
+0x80, 0xe2, 0x50, 0x9f, 0x80, 0x24, 0x84, 0x20, 0x44, 0x20, 0x00, 0xa0, 0x80, 0x1f, 0x81, 0x43,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0x84, 0x80, 0x80, 0x28, 0x80, 0x47,
+0x84, 0x7f, 0x80, 0x09, 0xf4, 0x83, 0x10, 0x3f, 0x80, 0x9d, 0xf4, 0x82, 0xb7, 0x5f, 0x14, 0x8f,
+0x80, 0x01, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xf0, 0xdd, 0x2f, 0x96, 0xb8, 0x40, 0x04,
+0x88, 0x00, 0x9d, 0x43, 0x40, 0x42, 0x88, 0x09, 0x95, 0x22, 0x9a, 0xe0, 0x80, 0x3f, 0x50, 0x0f,
+0x80, 0x10, 0x10, 0x3f, 0x80, 0x9f, 0x10, 0x2f, 0x80, 0x9e, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x82, 0xf0, 0xdd, 0x2f, 0x80, 0x1f, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x84, 0x14, 0xdd, 0x2f,
+0x80, 0xdf, 0x84, 0x01, 0xec, 0xa0, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0x5c, 0x81, 0x00, 0x97, 0x90, 0x40, 0x90, 0x80, 0x13, 0x80, 0x1f, 0x84, 0x20, 0x44, 0x20,
+0x00, 0xa0, 0x04, 0x74, 0x00, 0x02, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f,
+0xce, 0x10, 0x46, 0x40, 0x00, 0x0d, 0x58, 0x42, 0x0e, 0x74, 0x00, 0x32, 0x01, 0x70, 0xcb, 0x02,
+0xd5, 0x09, 0x00, 0x02, 0x01, 0x71, 0xc0, 0x05, 0x50, 0x42, 0x01, 0x30, 0x80, 0x46, 0xd5, 0x05,
+0x84, 0x60, 0x80, 0x83, 0x44, 0x20, 0x00, 0xff, 0x87, 0xc1, 0x50, 0x53, 0x80, 0x0e, 0x50, 0x14,
+0xff, 0xf2, 0x80, 0x1f, 0x11, 0xef, 0x80, 0x9d, 0x10, 0x3f, 0x80, 0x94, 0xb7, 0x1f, 0xf5, 0x82,
+0xf1, 0x83, 0xf4, 0xa6, 0x10, 0x2f, 0x80, 0x9c, 0xf7, 0x81, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7,
+0x83, 0x70, 0xdd, 0x2f, 0x00, 0x0f, 0x80, 0x9e, 0x50, 0x2f, 0x80, 0x24, 0x99, 0x50, 0x9d, 0xeb,
+0x92, 0xe2, 0x95, 0xfa, 0x9b, 0x3d, 0x10, 0x4f, 0x80, 0x9f, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84,
+0x06, 0xf0, 0x46, 0x10, 0x00, 0x0a, 0x58, 0x10, 0x8f, 0xf4, 0x84, 0x46, 0x80, 0x07, 0x4b, 0xe0,
+0x20, 0x01, 0xf1, 0x01, 0x9c, 0x3e, 0x8c, 0x2c, 0x84, 0x42, 0x4b, 0xe0, 0x20, 0x01, 0x00, 0x3f,
+0x80, 0x9e, 0x80, 0x3f, 0x50, 0x21, 0x80, 0x08, 0x50, 0x0f, 0x80, 0x10, 0x10, 0x2f, 0x80, 0x9e,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x82, 0x6c, 0xdd, 0x2f, 0x80, 0x1f, 0x46, 0xf0, 0x00, 0x02,
+0x58, 0xf7, 0x84, 0x14, 0xdd, 0x2f, 0x80, 0xdf, 0x84, 0x00, 0xec, 0xa4, 0x3a, 0x6f, 0xa4, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf0, 0xb4, 0x60, 0xa6, 0x98, 0x54, 0x11,
+0x00, 0x80, 0x4e, 0x12, 0x00, 0x9a, 0x05, 0xe0, 0x00, 0x02, 0x44, 0x50, 0x00, 0x80, 0x00, 0x6f,
+0x00, 0x00, 0x54, 0x43, 0x00, 0xf0, 0x4c, 0x42, 0xc0, 0x90, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x37,
+0x83, 0x5a, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x17, 0x81, 0x88, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63,
+0x0e, 0x74, 0x84, 0x41, 0x14, 0x33, 0x00, 0x92, 0x4c, 0x11, 0x40, 0x31, 0x02, 0x10, 0x00, 0x0a,
+0xa0, 0x04, 0x80, 0x5f, 0x50, 0x3f, 0x80, 0x08, 0x50, 0x4f, 0x80, 0x0e, 0x46, 0xf0, 0x00, 0x02,
+0x58, 0xf7, 0x89, 0x84, 0xdd, 0x2f, 0x02, 0x03, 0x01, 0x28, 0xc0, 0x0f, 0x01, 0xe3, 0x02, 0xa8,
+0x84, 0xa1, 0x4d, 0xe2, 0xc0, 0x0b, 0x00, 0x23, 0x02, 0x51, 0xc2, 0x07, 0x84, 0x00, 0x46, 0xf0,
+0x00, 0x02, 0x58, 0xf7, 0x8d, 0xb4, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x07, 0x80, 0xc4,
+0x46, 0xf0, 0x00, 0x0e, 0x00, 0x47, 0x80, 0xc5, 0x46, 0x30, 0x00, 0x0e, 0x58, 0x31, 0x81, 0x88,
+0x87, 0xc0, 0x11, 0xe1, 0x80, 0x03, 0xae, 0x19, 0xaf, 0x1a, 0x46, 0xf0, 0x00, 0x0e, 0x04, 0x27,
+0x80, 0x62, 0x40, 0x21, 0x20, 0x08, 0x92, 0x48, 0x84, 0xa1, 0xda, 0x46, 0x46, 0xf0, 0x00, 0x0e,
+0x00, 0x17, 0x81, 0x8c, 0x4c, 0x11, 0x00, 0x3f, 0x84, 0xa2, 0xd9, 0x04, 0x44, 0x00, 0x00, 0xc8,
+0xd5, 0x12, 0x84, 0xa3, 0xd1, 0x0e, 0x84, 0x04, 0x4c, 0x10, 0x00, 0x0c, 0x56, 0x30, 0x80, 0x05,
+0x45, 0xe0, 0x15, 0x7c, 0x84, 0x40, 0x40, 0x01, 0x0c, 0x1b, 0x40, 0x0f, 0x0c, 0x1a, 0xd5, 0x03,
+0x44, 0x00, 0x07, 0xd0, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x37, 0x80, 0xc2, 0xcb, 0x05, 0x46, 0xf0,
+0x00, 0x0e, 0x00, 0x37, 0x80, 0xc3, 0x46, 0x20, 0x04, 0x11, 0x05, 0xe1, 0x00, 0x49, 0x46, 0xf0,
+0x00, 0x0e, 0x04, 0x57, 0x80, 0x64, 0x40, 0x2f, 0x18, 0x08, 0x44, 0x40, 0x03, 0xe8, 0x42, 0x42,
+0x90, 0x24, 0x51, 0xe1, 0x51, 0x20, 0x40, 0x2f, 0x00, 0x01, 0x9f, 0x59, 0x42, 0x22, 0x14, 0x73,
+0x4e, 0x27, 0x00, 0x0b, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7, 0x82, 0x9c, 0xdd, 0x2f,
+0xd5, 0x03, 0x84, 0x02, 0xd5, 0xd8, 0xec, 0x10, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x17, 0x80, 0xc8, 0x80, 0xc0, 0xc1, 0x06,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8f, 0x5c, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x07,
+0x80, 0xd8, 0x84, 0xa1, 0x4c, 0x02, 0x80, 0x8a, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x57, 0x81, 0x88,
+0x4e, 0x52, 0x00, 0x84, 0xb4, 0x26, 0xa6, 0x48, 0x55, 0xe0, 0x80, 0x60, 0x4f, 0xe3, 0x00, 0x0f,
+0x54, 0x20, 0x80, 0x10, 0xc2, 0x0b, 0xa1, 0x32, 0xa6, 0xe1, 0x54, 0x61, 0x80, 0x20, 0x96, 0x70,
+0xc9, 0x05, 0x46, 0xf0, 0x00, 0x0e, 0x10, 0x17, 0x81, 0x8a, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x07,
+0x80, 0xc5, 0xc0, 0x0d, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x01, 0x88, 0x01, 0xe0, 0x00, 0x02,
+0x4f, 0xe2, 0x00, 0x06, 0xa6, 0x41, 0xc1, 0x03, 0x84, 0x20, 0xd5, 0x06, 0x84, 0x21, 0x46, 0x00,
+0x00, 0x0e, 0x58, 0x00, 0x01, 0x88, 0xae, 0x43, 0x46, 0xf0, 0x00, 0x0e, 0x04, 0x47, 0x80, 0x62,
+0x46, 0x0f, 0xf0, 0x00, 0x58, 0x00, 0x00, 0xff, 0x46, 0x30, 0x10, 0x00, 0x40, 0x52, 0x00, 0x02,
+0x58, 0x31, 0x80, 0x01, 0xdb, 0x4a, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8d, 0xb4,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x17, 0x81, 0x8c, 0x84, 0xa1, 0xd1, 0x3c, 0x84, 0xa2,
+0xd9, 0x04, 0x44, 0x00, 0x00, 0xc8, 0xd5, 0x11, 0x84, 0xa3, 0xd1, 0x0d, 0x84, 0xa4, 0xd1, 0x0b,
+0x56, 0x40, 0x80, 0x05, 0x44, 0x50, 0x15, 0x7c, 0x87, 0xc0, 0x40, 0x0f, 0x10, 0x1b, 0x40, 0x02,
+0x90, 0x1a, 0xd5, 0x03, 0x44, 0x00, 0x07, 0xd0, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x37, 0x80, 0xc2,
+0xcb, 0x05, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x37, 0x80, 0xc3, 0x46, 0x20, 0x04, 0x11, 0x05, 0xe1,
+0x00, 0x49, 0x46, 0xf0, 0x00, 0x0e, 0x04, 0x57, 0x80, 0x64, 0x40, 0x2f, 0x18, 0x08, 0x44, 0x40,
+0x03, 0xe8, 0x43, 0xe2, 0x90, 0x24, 0x50, 0x21, 0x51, 0x20, 0x9a, 0x90, 0x9e, 0x19, 0x42, 0x2f,
+0x00, 0x73, 0x4e, 0x27, 0x00, 0x0b, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7, 0x82, 0x9c,
+0xdd, 0x2f, 0xd5, 0x03, 0x84, 0x02, 0xd5, 0xd9, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xe0, 0x80, 0x60, 0xa4, 0x06, 0x5c, 0xf0, 0x00, 0x35, 0xe9, 0x2e,
+0xa0, 0x5a, 0x9c, 0x8c, 0xa7, 0x97, 0x40, 0x43, 0x18, 0x09, 0x46, 0xf0, 0x00, 0x0e, 0x10, 0x47,
+0x81, 0x1d, 0xc1, 0x24, 0xa7, 0x89, 0x55, 0xe3, 0x00, 0x01, 0x4f, 0xe3, 0x00, 0x20, 0x54, 0x63,
+0x00, 0x06, 0xce, 0x1c, 0xd5, 0x20, 0x12, 0x20, 0x00, 0x0a, 0x12, 0x60, 0x00, 0x0b, 0xa6, 0xa0,
+0x40, 0x11, 0x08, 0x09, 0x54, 0x10, 0x80, 0x03, 0xc1, 0x0b, 0x84, 0xa2, 0xd1, 0x02, 0xd5, 0x06,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x86, 0xf0, 0xdd, 0x2f, 0x84, 0x01, 0xd5, 0x08, 0x46, 0xf0,
+0x00, 0x02, 0x58, 0xf7, 0x85, 0xa4, 0xdd, 0x2f, 0xd5, 0xf9, 0x84, 0x00, 0xec, 0x20, 0x3a, 0x6f,
+0x98, 0x84, 0xdd, 0x9e, 0x50, 0x0f, 0x80, 0x04, 0x50, 0x40, 0x80, 0x1c, 0xb6, 0x20, 0xa8, 0x81,
+0xa8, 0xc3, 0xa9, 0x02, 0xa9, 0x04, 0x46, 0xf0, 0x00, 0x0e, 0x01, 0xe7, 0x80, 0xd8, 0xa7, 0x53,
+0xa6, 0xd2, 0x54, 0x22, 0x80, 0x0f, 0x40, 0x11, 0x20, 0x08, 0x84, 0xa1, 0x40, 0x20, 0x8c, 0x04,
+0x4d, 0xe2, 0xff, 0xcb, 0xd5, 0xe3, 0x92, 0x00, 0x84, 0x60, 0xd5, 0x0e, 0x38, 0x50, 0x0c, 0x00,
+0x38, 0x40, 0x8c, 0x00, 0x9c, 0xd9, 0xe2, 0x85, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x08, 0xe2, 0xa4,
+0xe8, 0x03, 0x84, 0x02, 0xd5, 0x04, 0xe2, 0x62, 0xe9, 0xf2, 0x84, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0x3c, 0x9c, 0x01, 0x08, 0x60, 0x00, 0x01, 0x96, 0x49, 0xaf, 0x90, 0x08, 0x60,
+0x00, 0x01, 0xaf, 0xa0, 0x08, 0x60, 0x00, 0x01, 0xaf, 0xa8, 0xa7, 0xa0, 0xa7, 0x40, 0xf4, 0x01,
+0xce, 0x05, 0x97, 0xac, 0xc6, 0x03, 0x84, 0xc1, 0xd5, 0x02, 0x84, 0xc0, 0xaf, 0x98, 0x54, 0x32,
+0x80, 0xfe, 0x95, 0x5b, 0xa6, 0x90, 0xe0, 0x25, 0xe9, 0x08, 0x9e, 0x94, 0x99, 0x5a, 0x96, 0xa8,
+0x9d, 0x51, 0x94, 0xab, 0xe0, 0x22, 0xe9, 0x03, 0x84, 0x00, 0xd5, 0x16, 0x40, 0x50, 0x8c, 0x09,
+0x9a, 0xeb, 0x96, 0x98, 0x98, 0x02, 0x96, 0xd4, 0x84, 0xa8, 0x40, 0x21, 0x8c, 0x1a, 0x40, 0x22,
+0x8c, 0x1b, 0x20, 0x00, 0x00, 0x01, 0x54, 0x50, 0x80, 0x0f, 0x9a, 0xea, 0x40, 0x10, 0x0c, 0x0e,
+0x96, 0x4c, 0xc1, 0x04, 0x84, 0x01, 0xae, 0x20, 0xd5, 0x02, 0xae, 0x60, 0x84, 0x01, 0x3a, 0x6f,
+0x98, 0x04, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xdc, 0x85, 0x20, 0xf4, 0x83, 0x12, 0x92,
+0x00, 0x00, 0x80, 0xa0, 0x08, 0x42, 0x80, 0x0a, 0xf3, 0x82, 0x40, 0x82, 0x10, 0x09, 0xf1, 0x85,
+0x14, 0x8f, 0x80, 0x04, 0x80, 0xc0, 0x80, 0x25, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xf0,
+0x80, 0x02, 0x84, 0x46, 0x4b, 0xe0, 0x1c, 0x01, 0xf0, 0x02, 0x50, 0x13, 0x00, 0x10, 0x84, 0x46,
+0x47, 0xc0, 0x00, 0x0d, 0x59, 0xce, 0x0e, 0x74, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0xa0, 0x00, 0x24,
+0x50, 0x73, 0x00, 0x24, 0x50, 0x9e, 0x02, 0x51, 0x50, 0x6f, 0x80, 0x1f, 0x46, 0x80, 0x00, 0x02,
+0x58, 0x84, 0x09, 0x00, 0xd5, 0x2c, 0xf0, 0x03, 0xa4, 0x80, 0x98, 0x51, 0x5e, 0xf0, 0x81, 0x7e,
+0xe8, 0x2f, 0x01, 0xe3, 0x80, 0x00, 0x84, 0x65, 0x4d, 0xe1, 0xc0, 0x1e, 0xf4, 0x04, 0x84, 0xa8,
+0xdc, 0x1a, 0xf0, 0x02, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x80, 0xb5, 0x84, 0x46, 0x46, 0xf0,
+0x01, 0x02, 0x58, 0xf7, 0x86, 0xd4, 0xdd, 0x2f, 0xc8, 0x0e, 0x02, 0x1e, 0x01, 0x26, 0xb7, 0x3f,
+0x80, 0x07, 0x80, 0x46, 0x50, 0x34, 0xff, 0xff, 0x50, 0x44, 0xff, 0xfd, 0x50, 0x54, 0xff, 0xfe,
+0x4b, 0xe0, 0x20, 0x01, 0xa6, 0xb9, 0x9c, 0x52, 0x99, 0xf9, 0x89, 0x41, 0xa6, 0x79, 0x05, 0xef,
+0x80, 0x05, 0x9c, 0xca, 0x40, 0x01, 0xa8, 0x00, 0x40, 0xff, 0x00, 0x06, 0xe8, 0xcd, 0x84, 0x01,
+0xec, 0x24, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa8, 0xbc, 0x80, 0xc0, 0x54, 0xa0,
+0x80, 0xff, 0x54, 0x91, 0x00, 0xff, 0x84, 0x20, 0x44, 0x20, 0x00, 0x18, 0x80, 0xe3, 0x81, 0x04,
+0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa7, 0x30, 0xa6, 0x31, 0x54, 0x32,
+0x00, 0x03, 0x40, 0x55, 0x10, 0x08, 0x42, 0x40, 0x00, 0x09, 0x54, 0x24, 0x80, 0x01, 0x40, 0x02,
+0x08, 0x04, 0x40, 0x11, 0x94, 0x04, 0xae, 0x70, 0xae, 0x31, 0x80, 0x27, 0x84, 0x46, 0x46, 0x70,
+0x01, 0x02, 0x58, 0x73, 0x86, 0xf0, 0x9c, 0x34, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x10, 0x00, 0x0e,
+0x58, 0x10, 0x81, 0x28, 0x84, 0x46, 0x50, 0x03, 0x00, 0x0a, 0x4b, 0xe0, 0x1c, 0x01, 0x50, 0x03,
+0x00, 0x10, 0x80, 0x28, 0x84, 0x46, 0x4b, 0xe0, 0x1c, 0x01, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e,
+0x3a, 0x2f, 0x94, 0x3c, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x81, 0x20, 0x50, 0x0f, 0x80, 0x20,
+0xf0, 0x81, 0x80, 0xe1, 0x84, 0xc0, 0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xa4, 0xf2, 0x01,
+0x84, 0xbf, 0x9d, 0x14, 0xf4, 0x81, 0x40, 0x04, 0x98, 0x00, 0xb4, 0x62, 0x9c, 0x64, 0x80, 0x43,
+0xd3, 0x07, 0xf1, 0x81, 0x99, 0xb3, 0xb4, 0x24, 0x4b, 0xe0, 0x20, 0x01, 0xd5, 0xf1, 0x80, 0x06,
+0xb6, 0xc7, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xec, 0x10, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x74, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff,
+0xfc, 0x84, 0xdd, 0x9e, 0x46, 0x00, 0x04, 0x11, 0xa0, 0x81, 0x58, 0x11, 0x00, 0x0c, 0xa8, 0x41,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0x3c, 0x46, 0x40, 0x04, 0x10, 0x46, 0x30, 0x04, 0x10,
+0x46, 0x20, 0x04, 0x10, 0x58, 0x42, 0x04, 0x38, 0x58, 0x31, 0x8a, 0x30, 0x58, 0x21, 0x0a, 0x34,
+0x84, 0x20, 0xb4, 0xc4, 0xb4, 0xa3, 0x5c, 0x63, 0x00, 0x01, 0x96, 0x28, 0xc0, 0x02, 0x84, 0xc0,
+0xb4, 0xa2, 0x46, 0x7f, 0xf0, 0x0f, 0x58, 0x73, 0x8f, 0x00, 0x40, 0x02, 0x9c, 0x02, 0x9c, 0x49,
+0xc8, 0x02, 0xce, 0x08, 0x84, 0x1f, 0x4c, 0x50, 0x00, 0x92, 0x44, 0x50, 0x07, 0xd0, 0xd9, 0xea,
+0xd5, 0x6b, 0x46, 0x10, 0x04, 0x11, 0x58, 0x10, 0x82, 0x00, 0xb4, 0x81, 0x96, 0xa4, 0xc2, 0x17,
+0x84, 0x40, 0xd5, 0x0b, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0xd9, 0x4c, 0x33, 0x7f, 0xfd, 0x9c, 0x91,
+0x44, 0x70, 0x00, 0x32, 0x4c, 0x23, 0x80, 0x04, 0x84, 0x60, 0xd5, 0xf5, 0x84, 0x7f, 0x4c, 0x41,
+0x80, 0x76, 0x9c, 0x01, 0x44, 0x40, 0x07, 0xd0, 0x4c, 0x02, 0x7f, 0xe9, 0x46, 0x60, 0x04, 0x11,
+0x58, 0x63, 0x00, 0x04, 0xb4, 0x06, 0x84, 0xb7, 0x40, 0x10, 0x14, 0x02, 0x46, 0x40, 0x04, 0x10,
+0x46, 0x30, 0x04, 0x10, 0x46, 0x20, 0x04, 0x10, 0xb6, 0x26, 0x58, 0x42, 0x04, 0x38, 0x58, 0x31,
+0x8a, 0x30, 0x58, 0x21, 0x0a, 0x34, 0x84, 0x20, 0xb4, 0xa4, 0x46, 0x60, 0x0f, 0xf0, 0xb4, 0x03,
+0x40, 0x52, 0x98, 0x02, 0xc0, 0x03, 0x84, 0xa0, 0xd5, 0x03, 0x5c, 0x52, 0x80, 0x01, 0xb4, 0x02,
+0x9c, 0x49, 0xc8, 0x03, 0xc5, 0x05, 0xd5, 0x09, 0x84, 0xff, 0x4c, 0x03, 0x80, 0x48, 0x44, 0x00,
+0x07, 0xd0, 0x4c, 0x10, 0x7f, 0xeb, 0xd5, 0x31, 0x46, 0x10, 0x04, 0x11, 0x58, 0x10, 0x82, 0x00,
+0xb4, 0x81, 0x54, 0x22, 0x00, 0x02, 0xc2, 0x3a, 0x84, 0x40, 0xd5, 0x0b, 0x92, 0x00, 0x84, 0xe7,
+0x9c, 0xd9, 0x4c, 0x33, 0xff, 0xfd, 0x9c, 0x91, 0x44, 0x60, 0x00, 0x32, 0x4c, 0x23, 0x00, 0x04,
+0x84, 0x60, 0xd5, 0xf5, 0x84, 0xff, 0x4c, 0x43, 0x80, 0x2a, 0x9c, 0x01, 0x44, 0x30, 0x07, 0xd0,
+0x4c, 0x01, 0xff, 0xe8, 0xd5, 0x23, 0x46, 0x10, 0x04, 0x10, 0x46, 0x60, 0x04, 0x10, 0x46, 0x40,
+0x04, 0x10, 0x58, 0x10, 0x8a, 0x30, 0x58, 0x63, 0x0a, 0x34, 0x58, 0x42, 0x04, 0x38, 0xb4, 0x41,
+0xb4, 0x26, 0xb4, 0x04, 0x84, 0x00, 0xd5, 0x86, 0x46, 0x20, 0x04, 0x10, 0x46, 0x00, 0x04, 0x10,
+0x46, 0x50, 0x04, 0x10, 0x58, 0x00, 0x0a, 0x34, 0x58, 0x21, 0x0a, 0x30, 0x58, 0x52, 0x84, 0x38,
+0xb4, 0x42, 0xb4, 0x20, 0xb4, 0x05, 0x84, 0x00, 0xd5, 0xc0, 0x3a, 0x6f, 0x9c, 0x04, 0xdd, 0x9e,
+0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xfc, 0x46, 0x60, 0x00, 0x0e, 0x58, 0x63, 0x00, 0xc8, 0x46, 0x70,
+0x01, 0x02, 0x58, 0x73, 0x87, 0x08, 0x84, 0x20, 0x44, 0x20, 0x00, 0x10, 0x80, 0x06, 0x4b, 0xe0,
+0x1c, 0x01, 0x84, 0x20, 0x44, 0x20, 0x01, 0x8c, 0x50, 0x03, 0x7e, 0x74, 0x4b, 0xe0, 0x1c, 0x01,
+0x84, 0x20, 0x84, 0x46, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x01, 0x28, 0x4b, 0xe0, 0x1c, 0x01,
+0x84, 0x40, 0x80, 0x62, 0x46, 0x70, 0x00, 0x00, 0x58, 0x73, 0x81, 0x0c, 0x50, 0x03, 0x00, 0x14,
+0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8e, 0x78, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x40, 0x50, 0x03,
+0x00, 0x30, 0x80, 0x62, 0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8d, 0x48, 0x4b, 0xe0, 0x1c, 0x01,
+0x84, 0x00, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8e, 0x74, 0x46, 0xf0, 0x00, 0x0e, 0x10, 0x07,
+0x81, 0x88, 0x10, 0x00, 0x82, 0x65, 0x10, 0x00, 0x82, 0x66, 0x10, 0x00, 0x82, 0x64, 0xec, 0x04,
+0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x00,
+0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x04, 0x20, 0x00, 0xa8, 0x96, 0x54, 0xc1, 0x1c, 0x04, 0x50,
+0x00, 0x92, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x47, 0x83, 0x5a, 0x50, 0x32, 0x83, 0xe8, 0x46, 0x10,
+0x00, 0x0d, 0x58, 0x10, 0x8c, 0xe4, 0xe2, 0x64, 0xe8, 0x0c, 0xb4, 0x81, 0x9c, 0xa1, 0xb6, 0x41,
+0xe4, 0x4a, 0xe9, 0x09, 0x04, 0x50, 0x00, 0xa9, 0x42, 0x32, 0xf0, 0x08, 0x14, 0x30, 0x00, 0xa9,
+0x84, 0x00, 0xb6, 0x01, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x00, 0xf8, 0x44, 0x10, 0x03, 0xe8,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x54, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0xbc, 0x81, 0x00, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7,
+0x84, 0x94, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x54, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x83, 0x24, 0xdd, 0x2f, 0x80, 0xe0, 0xc0, 0x4c, 0xa1, 0x82, 0x46, 0x30, 0x00, 0x0e,
+0x58, 0x31, 0x80, 0xb5, 0x80, 0x83, 0x80, 0x06, 0x84, 0x24, 0x84, 0x41, 0x46, 0xf0, 0x00, 0x02,
+0x58, 0xf7, 0x8a, 0x58, 0xdd, 0x2f, 0x84, 0x40, 0xae, 0xb2, 0xae, 0xb3, 0x46, 0x10, 0x00, 0x0d,
+0x58, 0x10, 0x8e, 0x74, 0x00, 0x30, 0x82, 0x66, 0xa7, 0x30, 0x00, 0x53, 0x00, 0x16, 0xa6, 0x31,
+0x85, 0x53, 0x54, 0x91, 0x80, 0x0f, 0x40, 0x42, 0x28, 0x02, 0x54, 0x84, 0x00, 0x01, 0x40, 0x94,
+0x90, 0x08, 0x54, 0x52, 0x80, 0x0f, 0x40, 0x84, 0x10, 0x08, 0x42, 0x00, 0x10, 0x09, 0x40, 0x00,
+0x20, 0x04, 0x92, 0x64, 0x58, 0x42, 0x00, 0x08, 0x40, 0x52, 0xa4, 0x04, 0x10, 0x33, 0x00, 0x17,
+0xaf, 0x30, 0x10, 0x53, 0x00, 0x16, 0xae, 0x31, 0x44, 0x30, 0x00, 0xff, 0x00, 0x00, 0x82, 0x66,
+0x9d, 0x01, 0x10, 0x40, 0x82, 0x66, 0x4c, 0x01, 0xc0, 0x04, 0x10, 0x20, 0x82, 0x66, 0x80, 0x26,
+0x80, 0x67, 0x84, 0x00, 0x8c, 0x58, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x84, 0x38, 0xdd, 0x2f,
+0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x0e, 0x00, 0x07, 0x81, 0x88, 0x84, 0x41, 0x46, 0x10, 0x00, 0x02, 0x58, 0x10, 0x8d, 0xb4,
+0x4c, 0x01, 0x40, 0x03, 0xd5, 0x02, 0x84, 0x00, 0x4b, 0xe0, 0x04, 0x01, 0x46, 0x00, 0x00, 0x0e,
+0x58, 0x00, 0x00, 0xdc, 0x44, 0x10, 0x27, 0x10, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x82, 0x54,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x84, 0x20, 0x80, 0xc0, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x84, 0x6c, 0xdd, 0x2f,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8b, 0x44, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10,
+0x8e, 0x74, 0x00, 0x20, 0x82, 0x65, 0x84, 0x01, 0x14, 0x60, 0x80, 0xa9, 0x10, 0x00, 0x82, 0x64,
+0xca, 0x14, 0x46, 0x40, 0x04, 0x00, 0x05, 0xe2, 0x00, 0x19, 0x42, 0x5f, 0x00, 0x09, 0x14, 0x52,
+0x00, 0x19, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x34, 0xb4, 0x60, 0x96, 0x99, 0xb6, 0x40,
+0x46, 0x31, 0x23, 0x40, 0xb4, 0x20, 0xd5, 0x15, 0x84, 0xa1, 0xda, 0x16, 0x46, 0x40, 0x04, 0x00,
+0x05, 0xe2, 0x00, 0x20, 0x46, 0x00, 0x04, 0x00, 0x58, 0x5f, 0x00, 0x80, 0x14, 0x52, 0x00, 0x20,
+0x58, 0x00, 0x02, 0x34, 0xb4, 0x60, 0x96, 0x99, 0xb6, 0x40, 0x46, 0x35, 0x67, 0x80, 0xb4, 0x20,
+0x40, 0x10, 0x8c, 0x04, 0xd5, 0x08, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x00, 0x80, 0xb4, 0x20,
+0x42, 0x10, 0xc0, 0x08, 0xb6, 0x20, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0xf4, 0xa0, 0x82, 0x80, 0xc0, 0xa6, 0xd0, 0x40, 0x11, 0x90, 0x09, 0x54, 0x00, 0x80, 0x04,
+0x4e, 0x03, 0x01, 0x06, 0xb4, 0x26, 0xa6, 0x08, 0x54, 0x40, 0x00, 0x60, 0xc4, 0x05, 0x54, 0x50,
+0x00, 0x80, 0x4e, 0x52, 0x00, 0xfd, 0xa7, 0xd1, 0x54, 0x23, 0x80, 0x40, 0xc2, 0x07, 0x00, 0x90,
+0x80, 0x02, 0x54, 0x84, 0x80, 0x01, 0x4e, 0x82, 0x00, 0xf3, 0x55, 0xe0, 0x00, 0x40, 0x4f, 0xe2,
+0x00, 0x04, 0x84, 0xe3, 0xd5, 0x0e, 0x54, 0x10, 0x00, 0x10, 0xc1, 0x03, 0x84, 0xe1, 0xd5, 0x09,
+0x54, 0x40, 0x00, 0x20, 0x96, 0x20, 0x84, 0x62, 0x40, 0x70, 0x00, 0x1a, 0x40, 0x71, 0x80, 0x1b,
+0xa0, 0xb4, 0x02, 0x13, 0x00, 0x0a, 0x8c, 0x58, 0x51, 0xe0, 0xff, 0xe8, 0x13, 0xe3, 0x00, 0x0a,
+0xa8, 0xb4, 0x04, 0x93, 0x00, 0x02, 0x00, 0x84, 0x80, 0x00, 0x40, 0x54, 0x10, 0x09, 0x54, 0x02,
+0x80, 0x08, 0xc0, 0x1d, 0x02, 0x43, 0x00, 0x0b, 0x58, 0x02, 0x00, 0x40, 0x96, 0x41, 0x12, 0x13,
+0x00, 0x0b, 0xa6, 0x10, 0x96, 0xc2, 0x4e, 0x34, 0x00, 0x06, 0x58, 0x50, 0x80, 0x02, 0x12, 0x53,
+0x00, 0x0b, 0xa0, 0x74, 0x03, 0xe3, 0x00, 0x0a, 0x50, 0x90, 0x80, 0x02, 0x50, 0x8f, 0x7f, 0xfe,
+0x14, 0x93, 0x00, 0x04, 0x12, 0x83, 0x00, 0x0a, 0x54, 0x00, 0x00, 0x0f, 0x10, 0x03, 0x00, 0x18,
+0xb4, 0x06, 0xa6, 0xc1, 0x54, 0x21, 0x80, 0x10, 0xc2, 0x12, 0x02, 0x13, 0x00, 0x0b, 0x05, 0xe3,
+0x00, 0x04, 0x02, 0x93, 0x00, 0x0a, 0x58, 0x80, 0x80, 0x08, 0x50, 0x5f, 0x00, 0x04, 0x50, 0x44,
+0xff, 0xfc, 0x12, 0x83, 0x00, 0x0b, 0xa9, 0x74, 0x12, 0x43, 0x00, 0x0a, 0xb4, 0x06, 0xa6, 0xc1,
+0x54, 0x21, 0x80, 0x40, 0xc2, 0x0c, 0x02, 0x93, 0x00, 0x0b, 0x04, 0x83, 0x00, 0x04, 0x58, 0x54,
+0x80, 0x10, 0x50, 0x44, 0x00, 0x02, 0x12, 0x53, 0x00, 0x0b, 0xa9, 0x34, 0xa0, 0x34, 0x46, 0x80,
+0x01, 0x02, 0x58, 0x84, 0x06, 0xd4, 0x46, 0x10, 0x00, 0x0a, 0x58, 0x10, 0x8f, 0xf4, 0x84, 0x46,
+0x4b, 0xe0, 0x20, 0x01, 0xc0, 0x0a, 0xa0, 0x34, 0x46, 0x10, 0x00, 0x0a, 0x58, 0x10, 0x8f, 0xfc,
+0x84, 0x46, 0x4b, 0xe0, 0x20, 0x01, 0xc8, 0x73, 0x04, 0x93, 0x00, 0x04, 0x02, 0x53, 0x00, 0x0a,
+0x50, 0x14, 0x80, 0x06, 0x51, 0xe2, 0xff, 0xfa, 0xa8, 0x74, 0x13, 0xe3, 0x00, 0x0a, 0x84, 0x42,
+0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x86, 0xf0, 0xdd, 0x2f, 0xa1, 0x34,
+0x02, 0x03, 0x00, 0x0a, 0x9c, 0xe2, 0x9e, 0x82, 0x84, 0xa2, 0xa8, 0xf4, 0x12, 0x23, 0x00, 0x0a,
+0xd7, 0x16, 0x46, 0xf0, 0x00, 0x0e, 0x04, 0x27, 0x80, 0x34, 0x96, 0x54, 0xc1, 0x10, 0x80, 0x06,
+0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x86, 0x44, 0xdd, 0x2f, 0x84, 0xa1, 0xd8, 0x08, 0x80, 0x26,
+0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8e, 0xbc, 0xdd, 0x2f, 0xd5, 0x41, 0x50, 0x9f, 0x80, 0x04,
+0x46, 0x80, 0x01, 0x02, 0x58, 0x84, 0x06, 0xd4, 0x80, 0x09, 0x46, 0x10, 0x00, 0x0b, 0x58, 0x10,
+0x80, 0x04, 0x84, 0x42, 0x4b, 0xe0, 0x20, 0x01, 0xc0, 0x32, 0x80, 0x09, 0x46, 0x10, 0x00, 0x0b,
+0x58, 0x10, 0x80, 0x0c, 0x84, 0x42, 0x4b, 0xe0, 0x20, 0x01, 0xc8, 0x03, 0x84, 0xa2, 0xdf, 0x27,
+0x50, 0x8f, 0x80, 0x04, 0x46, 0x70, 0x01, 0x02, 0x58, 0x73, 0x86, 0xd4, 0x80, 0x08, 0x46, 0x10,
+0x00, 0x0b, 0x58, 0x10, 0x80, 0x10, 0x84, 0x42, 0x4b, 0xe0, 0x1c, 0x01, 0xc0, 0x18, 0x80, 0x08,
+0x46, 0x10, 0x00, 0x0b, 0x58, 0x10, 0x80, 0x08, 0x84, 0x42, 0x4b, 0xe0, 0x1c, 0x01, 0xc8, 0x0f,
+0xa0, 0x74, 0x84, 0xa3, 0x01, 0xe0, 0x80, 0x01, 0x4d, 0xe2, 0xc0, 0x0a, 0x02, 0x23, 0x00, 0x0a,
+0x80, 0x06, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x8f, 0x30, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f,
+0xa4, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10,
+0x81, 0x94, 0x46, 0xf0, 0x00, 0x0b, 0x14, 0x17, 0x80, 0x54, 0x46, 0x40, 0x04, 0x00, 0x05, 0xe2,
+0x00, 0x08, 0x42, 0x5f, 0x40, 0x09, 0x14, 0x52, 0x00, 0x08, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x8e, 0xcc, 0xdd, 0x2f, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x38, 0xb4, 0x60, 0xb6, 0x60,
+0xa0, 0x81, 0xa8, 0x81, 0xa0, 0x42, 0xa8, 0x42, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x18,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x3c, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x82, 0xec, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x01, 0x58, 0xf7, 0x85, 0x70, 0xdd, 0x2f,
+0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x46, 0x40, 0x00, 0x0d, 0x58, 0x42, 0x0c, 0xe8,
+0x38, 0x12, 0x02, 0x0a, 0x46, 0x10, 0x04, 0x10, 0x58, 0x10, 0x88, 0x00, 0x04, 0x50, 0x80, 0x78,
+0x84, 0x41, 0x40, 0x41, 0x00, 0x0c, 0x40, 0x32, 0x14, 0x04, 0x14, 0x30, 0x80, 0x78, 0x04, 0x20,
+0x80, 0x7a, 0x40, 0x02, 0x08, 0x04, 0x14, 0x00, 0x80, 0x7a, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xf4, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x78, 0x96, 0x40,
+0x96, 0x8c, 0xc2, 0x07, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x3a, 0x84, 0x01, 0xd5, 0x68,
+0x54, 0x10, 0x80, 0x02, 0xc1, 0x07, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x3b, 0x84, 0x02,
+0xd5, 0x5f, 0x41, 0xe0, 0x40, 0x09, 0x54, 0x1f, 0x00, 0xff, 0x54, 0x50, 0x80, 0x02, 0xc5, 0x08,
+0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x4b, 0x44, 0x02, 0x00, 0x00, 0xd5, 0x51, 0x96, 0xcc,
+0xc3, 0x08, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x4a, 0x44, 0x01, 0x00, 0x00, 0xd5, 0x48,
+0x40, 0x10, 0x60, 0x09, 0x97, 0x0c, 0xc4, 0x08, 0x46, 0x00, 0x10, 0x00, 0x46, 0xf0, 0x00, 0x0d,
+0x04, 0x17, 0x83, 0x52, 0xd5, 0x3d, 0x54, 0x50, 0x80, 0x02, 0xc5, 0x08, 0x46, 0x00, 0x20, 0x00,
+0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x53, 0xd5, 0x33, 0x54, 0x20, 0x80, 0x04, 0xc2, 0x08,
+0x46, 0x00, 0x40, 0x00, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x54, 0xd5, 0x29, 0x54, 0x40,
+0x80, 0x10, 0xc4, 0x08, 0x46, 0x01, 0x00, 0x00, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x56,
+0xd5, 0x1f, 0x54, 0x50, 0x80, 0x20, 0xc5, 0x08, 0x46, 0x02, 0x00, 0x00, 0x46, 0xf0, 0x00, 0x0d,
+0x04, 0x17, 0x83, 0x57, 0xd5, 0x15, 0x54, 0x20, 0x80, 0x40, 0xc2, 0x08, 0x46, 0x04, 0x00, 0x00,
+0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x58, 0xd5, 0x0b, 0x54, 0x40, 0x80, 0x80, 0x96, 0x60,
+0xc1, 0x07, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0x59, 0x46, 0x08, 0x00, 0x00, 0x47, 0xe0,
+0x04, 0x10, 0x59, 0xef, 0x08, 0x00, 0x14, 0x0f, 0x00, 0x78, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00,
+0x0e, 0x74, 0x04, 0x5f, 0x00, 0x78, 0xf5, 0x81, 0xdd, 0x21, 0xec, 0x0c, 0x3b, 0xff, 0xfc, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x44, 0x40, 0x00, 0x40, 0x84, 0xa0,
+0xf5, 0x81, 0x46, 0x10, 0x04, 0x10, 0x10, 0x4f, 0x80, 0x04, 0x10, 0x4f, 0x80, 0x07, 0x58, 0x10,
+0x88, 0x00, 0xb4, 0x61, 0x50, 0x60, 0x00, 0x9c, 0x58, 0x01, 0x80, 0x02, 0xb6, 0x01, 0x80, 0x01,
+0xf2, 0x01, 0x14, 0x20, 0x80, 0x71, 0x04, 0x70, 0x00, 0x71, 0x42, 0x93, 0x8c, 0x0b, 0xf7, 0x81,
+0x81, 0x01, 0x4e, 0x93, 0xff, 0xfa, 0x42, 0x73, 0x84, 0x0b, 0xcf, 0xf6, 0x46, 0x90, 0x00, 0x03,
+0x58, 0x94, 0x8b, 0x34, 0x50, 0x13, 0x7f, 0x64, 0x50, 0x23, 0x7f, 0xe4, 0x50, 0x04, 0x01, 0xa0,
+0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x46, 0x00, 0x04, 0x10, 0x50, 0x13, 0x7f, 0x84, 0x50, 0x23,
+0x7f, 0xec, 0x58, 0x00, 0x09, 0xb0, 0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x46, 0x00, 0x04, 0x10,
+0x46, 0x90, 0x00, 0x03, 0x58, 0x94, 0x8a, 0xe8, 0x50, 0x13, 0x7f, 0xa4, 0x50, 0x23, 0x7f, 0xf4,
+0x58, 0x00, 0x09, 0x80, 0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x46, 0x00, 0x04, 0x10, 0x50, 0x13,
+0x7f, 0xc4, 0x9e, 0xb4, 0x58, 0x00, 0x09, 0x90, 0x84, 0x62, 0x4b, 0xe0, 0x24, 0x01, 0x84, 0x61,
+0xaf, 0xf5, 0xaf, 0xf4, 0x10, 0x34, 0x01, 0xa8, 0x10, 0x34, 0x01, 0xb8, 0x14, 0x73, 0x00, 0x09,
+0xaf, 0xf7, 0xaf, 0xf6, 0xa9, 0xf4, 0xa9, 0xf5, 0xa9, 0xf2, 0xa9, 0xf3, 0x50, 0x03, 0x00, 0x1c,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0xe4, 0xdd, 0x2f, 0x04, 0x04, 0x00, 0x71, 0x58, 0x20,
+0x00, 0x05, 0xf0, 0x81, 0x10, 0x2f, 0x80, 0x04, 0xf1, 0x01, 0x14, 0x14, 0x00, 0x71, 0xec, 0x0c,
+0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x42, 0x11, 0x40, 0x08,
+0x14, 0x10, 0x00, 0x2d, 0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x42, 0x11, 0x44, 0x08,
+0x14, 0x10, 0x00, 0x2d, 0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x58, 0x11, 0x00, 0x01,
+0x14, 0x10, 0x00, 0x2d, 0xdd, 0x9e, 0x92, 0x00, 0x04, 0x20, 0x00, 0x2d, 0x58, 0x11, 0x00, 0x02,
+0x14, 0x10, 0x00, 0x2d, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0x3c, 0xef, 0xf4, 0x46, 0x00,
+0x04, 0x10, 0x58, 0x00, 0x08, 0x00, 0x50, 0x10, 0x00, 0x80, 0x85, 0x20, 0x04, 0x40, 0x00, 0x43,
+0x40, 0x32, 0x40, 0x09, 0x54, 0x31, 0x80, 0x0f, 0x80, 0x40, 0xc3, 0x64, 0x84, 0x40, 0x97, 0x5c,
+0xc5, 0x5c, 0x54, 0x61, 0x00, 0x03, 0x14, 0x60, 0x00, 0x43, 0x84, 0xc0, 0x04, 0x80, 0x00, 0x43,
+0x40, 0x44, 0x20, 0x09, 0x54, 0x42, 0x00, 0x7f, 0x40, 0x72, 0x20, 0x08, 0x40, 0x53, 0x90, 0x04,
+0x14, 0x50, 0x00, 0x1d, 0x44, 0x7f, 0xff, 0xc7, 0x04, 0xa0, 0x80, 0x02, 0xb5, 0x01, 0x14, 0xaf,
+0x80, 0x01, 0x8d, 0x04, 0x00, 0xaf, 0x80, 0x07, 0x80, 0xa4, 0x40, 0xa5, 0x1c, 0x02, 0x58, 0xa5,
+0x00, 0x20, 0x10, 0xaf, 0x80, 0x07, 0x54, 0x74, 0x00, 0x7f, 0x40, 0xa4, 0x1c, 0x09, 0x40, 0x74,
+0x9c, 0x06, 0x04, 0x8f, 0x80, 0x01, 0x88, 0xea, 0x14, 0x80, 0x80, 0x02, 0x50, 0x83, 0xff, 0xff,
+0xd5, 0x08, 0x14, 0xa0, 0x00, 0x1b, 0x9d, 0xb1, 0x04, 0xa0, 0x00, 0x1b, 0x54, 0x55, 0x00, 0x7f,
+0x40, 0xa2, 0xa0, 0x08, 0xe2, 0xc8, 0xe9, 0xf6, 0x54, 0x63, 0x80, 0x7f, 0x40, 0x63, 0x20, 0x08,
+0x40, 0x52, 0xc0, 0x08, 0x58, 0x73, 0x00, 0x02, 0x58, 0x63, 0x00, 0x18, 0x40, 0x73, 0x94, 0x04,
+0x40, 0x53, 0x14, 0x04, 0x46, 0x68, 0x0f, 0xff, 0x58, 0x63, 0x0f, 0xff, 0x40, 0x42, 0x60, 0x08,
+0x40, 0x52, 0x98, 0x02, 0x40, 0x73, 0x98, 0x02, 0x40, 0x73, 0x90, 0x04, 0x40, 0x42, 0x90, 0x04,
+0x14, 0x40, 0x00, 0x44, 0x14, 0x70, 0x00, 0x45, 0x9c, 0x91, 0x84, 0xa4, 0xd2, 0x98, 0x92, 0x61,
+0xd5, 0x9f, 0x46, 0x00, 0x20, 0x00, 0x14, 0x01, 0x00, 0x78, 0xec, 0x0c, 0x3a, 0x6f, 0xa8, 0x04,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0x3c, 0xef, 0xf4, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00,
+0x08, 0x00, 0x50, 0x10, 0x00, 0x80, 0x85, 0x20, 0x04, 0x40, 0x00, 0x40, 0x40, 0x32, 0x40, 0x09,
+0x54, 0x31, 0x80, 0x0f, 0x80, 0x40, 0xc3, 0x6a, 0x84, 0x40, 0x97, 0x5c, 0xc5, 0x62, 0x54, 0x61,
+0x00, 0x03, 0x14, 0x60, 0x00, 0x40, 0x84, 0xc0, 0x04, 0x80, 0x00, 0x40, 0x40, 0x44, 0x20, 0x09,
+0x54, 0x42, 0x00, 0x7f, 0x40, 0x72, 0x20, 0x08, 0x40, 0x53, 0x90, 0x04, 0x14, 0x50, 0x00, 0x1d,
+0x44, 0x7f, 0xff, 0xc7, 0x04, 0xa0, 0x80, 0x02, 0xb5, 0x01, 0x14, 0xaf, 0x80, 0x01, 0x8d, 0x04,
+0x00, 0xaf, 0x80, 0x07, 0x80, 0xa4, 0x40, 0xa5, 0x1c, 0x02, 0x58, 0xa5, 0x00, 0x28, 0x10, 0xaf,
+0x80, 0x07, 0x54, 0x74, 0x00, 0x7f, 0x40, 0xa4, 0x1c, 0x09, 0x40, 0x74, 0x9c, 0x06, 0x04, 0x8f,
+0x80, 0x01, 0x88, 0xea, 0x14, 0x80, 0x80, 0x02, 0x50, 0x83, 0xff, 0xff, 0xd5, 0x08, 0x14, 0xa0,
+0x00, 0x1b, 0x9d, 0xb1, 0x04, 0xa0, 0x00, 0x1b, 0x54, 0x55, 0x00, 0x7f, 0x40, 0xa2, 0xa0, 0x08,
+0xe2, 0xc8, 0xe9, 0xf6, 0x00, 0x8f, 0x80, 0x07, 0x54, 0x63, 0x80, 0x7f, 0x40, 0x74, 0x04, 0x09,
+0x40, 0x63, 0x20, 0x08, 0x54, 0x73, 0x80, 0x03, 0x40, 0x82, 0xc0, 0x08, 0x40, 0x73, 0x98, 0x04,
+0x40, 0x53, 0xa0, 0x04, 0x58, 0x63, 0x00, 0x02, 0x46, 0x78, 0x0f, 0xff, 0x40, 0x63, 0x20, 0x04,
+0x58, 0x73, 0x8f, 0xff, 0x40, 0x82, 0x60, 0x08, 0x40, 0x52, 0x9c, 0x02, 0x40, 0x63, 0x1c, 0x02,
+0x40, 0x63, 0x20, 0x04, 0x40, 0x42, 0xa0, 0x04, 0x14, 0x40, 0x00, 0x41, 0x14, 0x60, 0x00, 0x42,
+0x9c, 0x91, 0x84, 0xa4, 0xd2, 0x92, 0x92, 0x61, 0xd5, 0x99, 0x46, 0x00, 0x10, 0x00, 0x14, 0x01,
+0x00, 0x78, 0xec, 0x0c, 0x3a, 0x6f, 0xa8, 0x04, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0x3c,
+0x04, 0x50, 0x00, 0x29, 0x04, 0x30, 0x00, 0x2a, 0x9d, 0x2a, 0x9a, 0xa3, 0xe4, 0x42, 0x4e, 0xf3,
+0x00, 0x85, 0x00, 0x30, 0x00, 0xa2, 0x9c, 0x9c, 0x40, 0x81, 0x10, 0x08, 0x40, 0x20, 0x20, 0x00,
+0xa7, 0xd7, 0x54, 0x63, 0x80, 0x80, 0xc6, 0x79, 0xb5, 0x01, 0x50, 0x41, 0x80, 0x24, 0x38, 0x80,
+0x12, 0x0a, 0x00, 0x70, 0x80, 0x9f, 0x00, 0x50, 0x80, 0x9e, 0xa1, 0x0b, 0x99, 0xbd, 0x50, 0x73,
+0x00, 0x14, 0x50, 0x50, 0x80, 0x10, 0x02, 0x81, 0x00, 0x03, 0x95, 0x9c, 0xc4, 0x22, 0x93, 0x0e,
+0x40, 0x84, 0x38, 0x08, 0x40, 0x74, 0x1c, 0x04, 0xad, 0xd3, 0xb6, 0xa2, 0xa7, 0x17, 0x42, 0x42,
+0x18, 0x09, 0xaf, 0x17, 0x99, 0x86, 0xa1, 0x4a, 0x14, 0x53, 0x00, 0x12, 0xa1, 0x0b, 0xa4, 0x52,
+0x54, 0x42, 0x3f, 0xff, 0x92, 0x2e, 0x40, 0x10, 0xb8, 0x08, 0x40, 0x50, 0x90, 0x04, 0xad, 0x52,
+0xa7, 0x17, 0xa6, 0x55, 0x54, 0x52, 0x00, 0x7f, 0x58, 0x10, 0x80, 0x40, 0xaf, 0x57, 0xd5, 0x1b,
+0x93, 0x0e, 0x40, 0x84, 0x38, 0x08, 0x40, 0x74, 0x1c, 0x04, 0xad, 0xd3, 0x99, 0x86, 0xa6, 0x57,
+0xb6, 0xa2, 0x58, 0x10, 0x80, 0x40, 0xae, 0x57, 0x14, 0x43, 0x00, 0x12, 0xa4, 0x52, 0xa7, 0x17,
+0x92, 0x2e, 0x40, 0x10, 0xb8, 0x08, 0xac, 0x52, 0x54, 0x42, 0x00, 0x7f, 0xa6, 0x55, 0xaf, 0x17,
+0x42, 0x10, 0x98, 0x09, 0x95, 0x1c, 0xae, 0x55, 0x98, 0x44, 0x50, 0x10, 0x80, 0x48, 0xa6, 0x8e,
+0x44, 0x5f, 0xff, 0xcf, 0x40, 0x41, 0x14, 0x02, 0x58, 0x22, 0x00, 0x08, 0x9c, 0xdc, 0x84, 0x84,
+0xaf, 0x0f, 0xae, 0x8e, 0x40, 0x51, 0x90, 0x0c, 0x99, 0x05, 0xa4, 0xa3, 0xb4, 0x61, 0x54, 0x51,
+0x3f, 0xff, 0x99, 0x1d, 0xad, 0x0a, 0x46, 0x40, 0x04, 0x10, 0x00, 0x20, 0x00, 0xa2, 0x04, 0x50,
+0x00, 0x2a, 0x9c, 0x51, 0x96, 0x8c, 0x9c, 0xe9, 0x58, 0x42, 0x08, 0x00, 0x14, 0x30, 0x00, 0x2a,
+0x10, 0x20, 0x00, 0xa2, 0x10, 0x22, 0x01, 0x88, 0x3a, 0x6f, 0xa0, 0x04, 0xdd, 0x9e, 0x92, 0x00,
+0x04, 0x50, 0x00, 0x2b, 0x04, 0x30, 0x00, 0x2c, 0x9d, 0x2a, 0x9a, 0xa3, 0xe4, 0x42, 0xe9, 0x3e,
+0x00, 0x30, 0x00, 0xa3, 0x9d, 0x1e, 0x94, 0xa4, 0x98, 0x82, 0xa7, 0x57, 0x54, 0x42, 0x80, 0x80,
+0xc4, 0x35, 0x50, 0x51, 0x80, 0x26, 0x38, 0x10, 0x16, 0x0a, 0x94, 0xdc, 0xa1, 0x0a, 0x98, 0xc3,
+0xb6, 0x82, 0xa1, 0x4c, 0x14, 0x51, 0x80, 0x1b, 0xa5, 0x0e, 0xa4, 0xd3, 0x54, 0x42, 0x3f, 0xff,
+0x92, 0x6e, 0x40, 0x31, 0xb8, 0x08, 0x40, 0x51, 0x90, 0x04, 0xad, 0x53, 0xa7, 0x55, 0x00, 0x40,
+0x80, 0x0f, 0xa6, 0xd7, 0x96, 0x64, 0x95, 0x0e, 0x54, 0x11, 0x80, 0x3f, 0x40, 0x30, 0x90, 0x04,
+0x54, 0x12, 0x80, 0x7f, 0xae, 0xd7, 0xae, 0x55, 0x46, 0x10, 0x04, 0x10, 0x00, 0x50, 0x00, 0xa3,
+0x04, 0x40, 0x00, 0x2c, 0x9c, 0xa9, 0x97, 0x54, 0x9c, 0xe1, 0x58, 0x10, 0x88, 0x00, 0x14, 0x30,
+0x00, 0x2c, 0x10, 0x50, 0x00, 0xa3, 0x10, 0x50, 0x81, 0x98, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0xfc, 0x85, 0x20, 0x80, 0xc0, 0x46, 0x80, 0x00, 0x00, 0x58, 0x84, 0x03, 0x68, 0xd5, 0x22,
+0xa7, 0x1f, 0x54, 0x22, 0x00, 0x80, 0xc2, 0x30, 0x38, 0x23, 0x06, 0x02, 0x38, 0x93, 0x06, 0x0a,
+0x80, 0x22, 0x00, 0x31, 0x00, 0x14, 0xcb, 0x02, 0xd5, 0x05, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00,
+0x0e, 0x54, 0x4b, 0xe0, 0x20, 0x01, 0x9c, 0x3e, 0x94, 0xc4, 0x99, 0xf3, 0xa6, 0xbf, 0x44, 0x4f,
+0xff, 0xc0, 0x40, 0x51, 0x10, 0x04, 0xaf, 0x7f, 0x04, 0x13, 0x00, 0x2b, 0x9c, 0x09, 0x14, 0x03,
+0x00, 0x2b, 0x04, 0x23, 0x00, 0x2b, 0x04, 0x53, 0x00, 0x2c, 0x97, 0xd4, 0x9c, 0x7e, 0x95, 0x0c,
+0x41, 0xe2, 0x88, 0x01, 0x50, 0x13, 0x80, 0x26, 0x98, 0xf4, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00,
+0x0e, 0x64, 0x4f, 0xe6, 0xff, 0xcf, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x85, 0x20, 0x80, 0xc0, 0x46, 0x80, 0x00, 0x00, 0x58, 0x84,
+0x03, 0x68, 0xd5, 0x1a, 0xa6, 0xff, 0x54, 0x11, 0x80, 0x80, 0xc1, 0x28, 0x38, 0x13, 0x0a, 0x02,
+0x38, 0x93, 0x0a, 0x0a, 0x4b, 0xe0, 0x20, 0x01, 0xa6, 0x7f, 0xa6, 0xfd, 0x44, 0x0f, 0xff, 0xc0,
+0x40, 0x50, 0x80, 0x04, 0x58, 0x41, 0x80, 0x40, 0xaf, 0x7f, 0xaf, 0x3d, 0x04, 0x23, 0x00, 0x29,
+0x9c, 0x11, 0x14, 0x03, 0x00, 0x29, 0x04, 0x43, 0x00, 0x29, 0x04, 0x53, 0x00, 0x2a, 0x96, 0x64,
+0x9c, 0xcc, 0x95, 0xdc, 0x41, 0xe2, 0x90, 0x01, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x54,
+0x50, 0x20, 0x80, 0x24, 0x99, 0xf7, 0x4f, 0xe6, 0xff, 0xd7, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x83, 0x80, 0x50, 0x00, 0x00, 0xb8,
+0x46, 0x40, 0x04, 0x10, 0xf0, 0x81, 0x58, 0x42, 0x08, 0x00, 0x00, 0x7e, 0x00, 0xa1, 0x00, 0x12,
+0x01, 0xbc, 0x9d, 0x7a, 0x94, 0xac, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x54, 0x50, 0xa3,
+0x80, 0x22, 0x40, 0x6e, 0x08, 0x00, 0x4c, 0x70, 0x80, 0x55, 0xa6, 0x77, 0x55, 0xe0, 0x80, 0x80,
+0x4f, 0xe2, 0x00, 0x50, 0x02, 0x83, 0x00, 0x03, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7,
+0x83, 0x24, 0xdd, 0x2f, 0x54, 0x94, 0x3f, 0xff, 0x95, 0x3c, 0x81, 0x00, 0x40, 0x3e, 0x10, 0x00,
+0xf0, 0x01, 0xb4, 0x9f, 0x4e, 0x83, 0x00, 0x07, 0xbb, 0x2d, 0x42, 0x01, 0xc4, 0x08, 0xb8, 0xad,
+0xd5, 0x38, 0x39, 0xee, 0x2a, 0x02, 0x84, 0x41, 0x12, 0x9f, 0x00, 0x06, 0x80, 0x3e, 0x04, 0x51,
+0x80, 0x0b, 0x10, 0x2f, 0x00, 0x14, 0x14, 0x5f, 0x00, 0x04, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x83, 0x68, 0xdd, 0x2f, 0x38, 0x8e, 0x2a, 0x0a, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa6, 0xf7, 0x04, 0x84,
+0x00, 0x02, 0x58, 0x01, 0x80, 0x40, 0xae, 0x37, 0xa4, 0x73, 0xb7, 0x06, 0x40, 0x50, 0xb8, 0x09,
+0x40, 0x52, 0xb8, 0x08, 0x58, 0x22, 0x86, 0x40, 0xac, 0xb3, 0xb4, 0x9f, 0x10, 0x72, 0x01, 0xb8,
+0x00, 0xae, 0x00, 0xa1, 0x50, 0x75, 0x00, 0x01, 0x97, 0xbc, 0x10, 0x6e, 0x00, 0xa1, 0xd5, 0x9e,
+0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x83, 0x80,
+0x50, 0x00, 0x00, 0xb8, 0x46, 0x40, 0x04, 0x10, 0xf0, 0x81, 0x58, 0x42, 0x08, 0x00, 0x00, 0x7e,
+0x00, 0xa0, 0x00, 0x52, 0x01, 0xac, 0x94, 0xbc, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x64,
+0x50, 0xa3, 0x80, 0x20, 0x40, 0x6e, 0x08, 0x00, 0xd7, 0x54, 0x01, 0xe3, 0x00, 0x07, 0x54, 0x5f,
+0x00, 0x80, 0xc5, 0x4f, 0x02, 0x83, 0x00, 0x03, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7,
+0x83, 0x24, 0xdd, 0x2f, 0x98, 0x7f, 0x54, 0x94, 0x3f, 0xff, 0x81, 0x00, 0x9c, 0x09, 0x95, 0x03,
+0x40, 0x3e, 0x10, 0x00, 0xf0, 0x01, 0xb4, 0x9f, 0x4e, 0x83, 0x00, 0x06, 0x44, 0x31, 0x00, 0x00,
+0xbb, 0xad, 0xd5, 0x37, 0x39, 0xee, 0x2a, 0x02, 0x84, 0x40, 0x12, 0x9f, 0x00, 0x06, 0x80, 0x3e,
+0xa1, 0x59, 0x10, 0x2f, 0x00, 0x14, 0x14, 0x5f, 0x00, 0x04, 0xb6, 0x9f, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x83, 0x68, 0xdd, 0x2f, 0x38, 0x8e, 0x2a, 0x0a, 0x80, 0x06, 0x84, 0x20, 0x44, 0x20,
+0x00, 0x10, 0x46, 0xf0, 0x01, 0x02, 0x58, 0xf7, 0x87, 0x08, 0xdd, 0x2f, 0xa6, 0xf7, 0x04, 0x84,
+0x00, 0x02, 0x58, 0x11, 0x80, 0x40, 0xae, 0x77, 0xa5, 0x33, 0xb7, 0x06, 0x40, 0x52, 0x38, 0x09,
+0x40, 0x52, 0xb8, 0x08, 0x58, 0x22, 0x80, 0xc8, 0xac, 0xb3, 0xb4, 0x9f, 0x10, 0x72, 0x01, 0xa8,
+0x00, 0xae, 0x00, 0xa0, 0x50, 0x75, 0x00, 0x01, 0x97, 0xbc, 0x10, 0x6e, 0x00, 0xa0, 0xd5, 0xa0,
+0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xfc, 0xb6, 0x20,
+0xa8, 0xc1, 0x80, 0xc1, 0xa0, 0x43, 0x84, 0xe0, 0x81, 0x23, 0x81, 0x02, 0xa8, 0x42, 0x47, 0xc0,
+0x01, 0x02, 0x59, 0xce, 0x07, 0x08, 0x81, 0x47, 0xd5, 0x0c, 0xdd, 0x3c, 0xa6, 0xb7, 0x44, 0x3f,
+0xff, 0xc0, 0x40, 0x01, 0x0c, 0x04, 0xae, 0x37, 0x1c, 0xa4, 0x00, 0x01, 0x9d, 0xf9, 0x8c, 0xd0,
+0x80, 0x06, 0x84, 0x20, 0x44, 0x20, 0x00, 0x10, 0xe2, 0xe9, 0xe9, 0xf0, 0xec, 0x04, 0x3a, 0x6f,
+0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xec, 0xb6, 0x20, 0xa8, 0xc1, 0x46, 0x80,
+0x04, 0x10, 0x04, 0x90, 0x00, 0x03, 0x58, 0x84, 0x09, 0xb0, 0x14, 0x90, 0x00, 0x02, 0x44, 0x70,
+0x06, 0x40, 0x83, 0x83, 0x80, 0xc1, 0x46, 0x30, 0x00, 0x0d, 0x58, 0x31, 0x8e, 0x54, 0x40, 0x10,
+0x20, 0x03, 0x44, 0x50, 0x00, 0xc8, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x64, 0x40, 0x41,
+0x84, 0x1a, 0x40, 0x40, 0x04, 0x1b, 0x40, 0x82, 0x84, 0x1b, 0x40, 0x83, 0x84, 0x1a, 0x84, 0xe0,
+0xf4, 0x83, 0x81, 0x42, 0x46, 0x40, 0x01, 0x02, 0x58, 0x42, 0x07, 0x08, 0x81, 0x27, 0x54, 0x34,
+0x3f, 0xff, 0xd5, 0x26, 0xf3, 0x81, 0xf4, 0x82, 0xdd, 0x24, 0xf0, 0x03, 0x46, 0xf0, 0x00, 0x00,
+0x58, 0xf7, 0x83, 0x24, 0xdd, 0x2f, 0xf3, 0x01, 0xf4, 0x02, 0xc0, 0x20, 0x12, 0x80, 0x00, 0x06,
+0x10, 0x90, 0x00, 0x0e, 0x10, 0x90, 0x00, 0x0f, 0xa6, 0x77, 0x9d, 0xf9, 0x55, 0xe0, 0x80, 0x3f,
+0x11, 0xe3, 0x00, 0x07, 0xa5, 0x73, 0x40, 0x12, 0xb8, 0x09, 0x40, 0x10, 0xb8, 0x08, 0x41, 0xe0,
+0x8c, 0x04, 0x13, 0xe3, 0x00, 0x03, 0xa0, 0x82, 0xaa, 0xb4, 0x1c, 0x05, 0x00, 0x01, 0x80, 0x06,
+0x84, 0x20, 0x44, 0x20, 0x00, 0x10, 0xe2, 0xfc, 0xe9, 0xd6, 0xec, 0x14, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x83, 0x1c, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x69, 0x84, 0xa1,
+0xd8, 0x0b, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x00, 0x04, 0xb4, 0x80, 0x54, 0x32, 0x01, 0xfd,
+0x58, 0x11, 0x80, 0x02, 0xd5, 0x08, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x00, 0x04, 0xb4, 0xa0,
+0x54, 0x12, 0x81, 0xfd, 0xb6, 0x20, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x1c,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc,
+0xef, 0xfc, 0x46, 0x60, 0x04, 0x00, 0x58, 0x63, 0x00, 0x04, 0x84, 0xe0, 0x85, 0x08, 0x46, 0x90,
+0x00, 0x04, 0x58, 0x94, 0x83, 0x1c, 0x84, 0x01, 0x4b, 0xe0, 0x24, 0x01, 0xb4, 0x46, 0x99, 0xff,
+0x54, 0x11, 0x00, 0x08, 0x84, 0x01, 0x97, 0xf8, 0xc1, 0x03, 0x40, 0x73, 0x80, 0x04, 0x05, 0xe3,
+0x00, 0x00, 0x8f, 0x01, 0x54, 0x5f, 0x01, 0xfe, 0x58, 0x42, 0x80, 0x01, 0xb6, 0x86, 0x54, 0x84,
+0x00, 0xff, 0x4b, 0xe0, 0x24, 0x01, 0xb4, 0x66, 0x54, 0x01, 0x81, 0xfe, 0xb6, 0x06, 0x4e, 0x83,
+0xff, 0xe4, 0x84, 0x08, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x1c, 0xdd, 0x2f, 0x80, 0x07,
+0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x46, 0x60,
+0x04, 0x00, 0x97, 0xc0, 0x58, 0x63, 0x00, 0x04, 0x85, 0x28, 0x46, 0x80, 0x00, 0x04, 0x58, 0x84,
+0x03, 0x1c, 0xb4, 0x46, 0x40, 0x33, 0x9c, 0x09, 0x94, 0x5a, 0x55, 0xe1, 0x01, 0xfb, 0x40, 0x00,
+0xf8, 0x04, 0xb6, 0x06, 0x84, 0x01, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0xa6, 0x84, 0x01, 0x54, 0x42,
+0x81, 0xfe, 0x40, 0x32, 0x00, 0x04, 0xb6, 0x66, 0x8f, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0xb4, 0x46,
+0x84, 0x01, 0x54, 0x11, 0x01, 0xfe, 0xb6, 0x26, 0x99, 0xff, 0x54, 0x94, 0x80, 0xff, 0x4b, 0xe0,
+0x20, 0x01, 0x97, 0xf8, 0x4e, 0x93, 0xff, 0xdf, 0x84, 0x0a, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x83, 0x1c, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x69, 0x84, 0xa1, 0xd8, 0x16, 0x46, 0x60, 0x04, 0x00,
+0x58, 0x63, 0x00, 0x04, 0x05, 0xe3, 0x00, 0x00, 0x54, 0x5f, 0x01, 0xfd, 0x58, 0x42, 0x80, 0x02,
+0xb6, 0x86, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x1c, 0xdd, 0x2f, 0xb4, 0x66, 0x54, 0x21,
+0x81, 0xfd, 0xb6, 0x46, 0xd5, 0x09, 0x46, 0x60, 0x04, 0x00, 0xa0, 0xb1, 0x54, 0x01, 0x01, 0xfd,
+0x58, 0x10, 0x00, 0x02, 0xa8, 0x71, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x1c,
+0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x8d, 0x2c, 0xdd, 0x2f, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8c, 0xb8,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8c, 0x4c, 0xdd, 0x2f, 0x80, 0xc0, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x8b, 0xf4, 0xdd, 0x2f, 0x96, 0x34, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xfc, 0x97, 0x81, 0x97, 0xca, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x8d, 0x2c, 0xdd, 0x2f, 0x84, 0x03, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8c, 0xb8, 0xdd, 0x2f,
+0xcf, 0x05, 0x44, 0x00, 0xfc, 0x00, 0x40, 0x63, 0x00, 0x04, 0x46, 0x70, 0x00, 0x03, 0x58, 0x73,
+0x8c, 0xb8, 0x40, 0x03, 0x20, 0x09, 0x4b, 0xe0, 0x1c, 0x01, 0x96, 0x30, 0x4b, 0xe0, 0x1c, 0x01,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8c, 0x4c, 0xdd, 0x2f, 0x80, 0xc0, 0x46, 0xf0, 0x00, 0x03,
+0x58, 0xf7, 0x8b, 0xf4, 0xdd, 0x2f, 0x80, 0x06, 0xec, 0x04, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0x60, 0x00, 0x03, 0x58, 0x63, 0x0c, 0xb8, 0x54, 0x80, 0x80, 0xff,
+0x97, 0xc1, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8d, 0x2c, 0xdd, 0x2f, 0x84, 0x02, 0xdd, 0x26,
+0x40, 0x03, 0xa0, 0x09, 0xdd, 0x26, 0x96, 0x38, 0xdd, 0x26, 0x80, 0x08, 0xdd, 0x26, 0x46, 0x60,
+0x00, 0x03, 0x58, 0x63, 0x0d, 0x88, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8b, 0xf4, 0xdd, 0x2f,
+0x4b, 0xe0, 0x18, 0x01, 0xc8, 0xfe, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8d, 0x2c, 0xdd, 0x2f, 0x84, 0x04, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x8c, 0xb8, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8b, 0xf4,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8d, 0x2c, 0xdd, 0x2f, 0x84, 0x06, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x8c, 0xb8, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8b, 0xf4,
+0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x04, 0x00,
+0x80, 0x01, 0x84, 0x48, 0x14, 0x20, 0x81, 0x06, 0x14, 0x20, 0x01, 0x0a, 0xdd, 0x9e, 0x92, 0x00,
+0xef, 0xf8, 0x46, 0x10, 0x00, 0x0d, 0x04, 0x40, 0x83, 0x5a, 0x46, 0x30, 0x04, 0x00, 0x9c, 0xa1,
+0x14, 0x20, 0x83, 0x5a, 0x58, 0x31, 0x84, 0x00, 0xb4, 0x03, 0x46, 0x10, 0x04, 0x00, 0x58, 0x50,
+0x00, 0x11, 0xb6, 0xa3, 0x04, 0x40, 0x81, 0x06, 0x58, 0x22, 0x00, 0x80, 0x14, 0x20, 0x81, 0x06,
+0xb4, 0x03, 0xf0, 0x81, 0xec, 0x08, 0xdd, 0x9e, 0x46, 0x30, 0x04, 0x00, 0x80, 0x03, 0x44, 0x20,
+0x00, 0x4e, 0x44, 0x10, 0x00, 0xa8, 0x14, 0x21, 0x81, 0x04, 0x14, 0x10, 0x01, 0x06, 0xdd, 0x9e,
+0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x5a, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x00, 0x0e,
+0x58, 0x00, 0x01, 0x44, 0x84, 0x80, 0xb6, 0x80, 0x84, 0x21, 0xb4, 0x60, 0xa8, 0xc1, 0xa8, 0x42,
+0xb4, 0x40, 0xa1, 0x42, 0x9f, 0x29, 0x40, 0x32, 0x08, 0x02, 0x9c, 0x5a, 0x95, 0x4a, 0x98, 0xc5,
+0x46, 0x40, 0x00, 0x0e, 0x58, 0x42, 0x01, 0x30, 0xa9, 0x19, 0xb4, 0x40, 0x9c, 0x51, 0xb6, 0x20,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8d, 0x68, 0xb4, 0x41, 0x98, 0x02,
+0xd5, 0x03, 0x64, 0x00, 0x00, 0x00, 0xb4, 0x81, 0x9a, 0xe0, 0x4e, 0x35, 0xff, 0xfc, 0xdd, 0x9e,
+0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f, 0xa0, 0x32, 0xc0, 0x2d, 0x84, 0xa2, 0xd0, 0x2b, 0x84, 0xa3,
+0xd8, 0x02, 0xd5, 0x28, 0xa0, 0x33, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x57, 0x83, 0x5b, 0xd0, 0x07,
+0xa0, 0x41, 0x05, 0xe3, 0x00, 0x01, 0x40, 0x50, 0xf8, 0x00, 0xa9, 0x41, 0xa0, 0x73, 0x46, 0x00,
+0x00, 0x0d, 0x58, 0x00, 0x0d, 0x6c, 0x4c, 0x13, 0x40, 0x05, 0x84, 0x40, 0xb6, 0x40, 0xd5, 0x0d,
+0x05, 0xe3, 0x00, 0x04, 0x14, 0x1f, 0x00, 0x03, 0xa1, 0x33, 0xa1, 0x74, 0xa9, 0x64, 0xb4, 0x60,
+0x4c, 0x33, 0x40, 0x04, 0xa0, 0x73, 0xb6, 0x20, 0x84, 0x00, 0x84, 0x43, 0xa8, 0x34, 0xa8, 0xb2,
+0xa8, 0x33, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f, 0xec, 0x08,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xf4, 0x80, 0xe1,
+0x80, 0xc0, 0xc1, 0x7a, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70,
+0xdd, 0x2f, 0x84, 0x01, 0xa8, 0x32, 0x46, 0x30, 0x00, 0x0d, 0x04, 0x21, 0x83, 0x5b, 0x46, 0x00,
+0x00, 0x0d, 0x58, 0x00, 0x0d, 0x74, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8d, 0x68, 0xca, 0x0b,
+0xa9, 0xb3, 0xa9, 0xb4, 0x14, 0x61, 0x83, 0x5b, 0x46, 0xf0, 0x00, 0x0d, 0x14, 0x77, 0x83, 0x5c,
+0xa9, 0xf1, 0xd5, 0x39, 0xb4, 0x21, 0xb4, 0x00, 0xe2, 0x20, 0xe8, 0x03, 0x9a, 0x01, 0xd5, 0x02,
+0x9a, 0x08, 0x44, 0x10, 0x00, 0x21, 0x40, 0x00, 0x04, 0x37, 0xa0, 0x51, 0xe2, 0x01, 0xe8, 0x03,
+0x9a, 0x08, 0xd5, 0x02, 0x84, 0x00, 0xa8, 0x11, 0xa0, 0xd1, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17,
+0x83, 0x5b, 0x46, 0xf0, 0x00, 0x0d, 0x14, 0x37, 0x83, 0x5c, 0xa0, 0x11, 0xe2, 0xe0, 0xe8, 0x0b,
+0x9a, 0x07, 0xa8, 0x11, 0x46, 0x00, 0x00, 0x0d, 0x04, 0x50, 0x03, 0x5b, 0xda, 0x20, 0x14, 0x60,
+0x03, 0x5b, 0xd5, 0x1d, 0xa0, 0x93, 0x9b, 0xf8, 0x4c, 0x20, 0xff, 0xf1, 0xd5, 0x18, 0x14, 0x00,
+0x83, 0x5c, 0xc0, 0x0c, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8d, 0x68, 0x46, 0x00, 0x00, 0x0d,
+0x58, 0x00, 0x0d, 0x74, 0xb4, 0x41, 0xb6, 0x40, 0xd5, 0x03, 0x84, 0x22, 0xa8, 0x72, 0xf0, 0x01,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f, 0xd5, 0x16, 0xa8, 0xb3, 0xa0, 0x14,
+0x46, 0x10, 0x00, 0x0d, 0xa8, 0x34, 0x05, 0xe1, 0x00, 0x04, 0x14, 0x6f, 0x00, 0x03, 0xa9, 0x94,
+0xa9, 0xf1, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x37, 0x83, 0x5b, 0x04, 0x40, 0x83, 0x5c, 0xa0, 0x19,
+0xe2, 0x80, 0xe8, 0xd6, 0xd5, 0xe5, 0xec, 0x0c, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8a, 0x70, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x81, 0x44, 0xa0, 0xc9, 0xa1, 0x4a,
+0xf0, 0x01, 0x9f, 0x29, 0x40, 0x22, 0x0c, 0x02, 0x9d, 0x92, 0x95, 0x72, 0x99, 0x0d, 0xa1, 0xa1,
+0xa0, 0xc9, 0x9c, 0x99, 0xa8, 0x89, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f,
+0x84, 0x00, 0xa8, 0x34, 0xb6, 0x06, 0xa8, 0x31, 0xa8, 0x32, 0xa8, 0x33, 0x80, 0x06, 0xec, 0x08,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x0d, 0x04, 0x17, 0x83, 0x5a, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x27, 0x83, 0x94, 0x9a, 0x0a,
+0x4e, 0x05, 0x00, 0x07, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7, 0x81, 0x98, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x04, 0x01, 0x84, 0x21, 0xa8, 0x42,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x04, 0x01, 0x84, 0x20, 0xb6, 0x20, 0xdd, 0x9e, 0x92, 0x00,
+0x46, 0x10, 0x04, 0x01, 0x96, 0x00, 0xa8, 0x09, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x04, 0x01,
+0x84, 0x22, 0xa8, 0x42, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x04, 0x01, 0x04, 0x00, 0x81, 0x8a,
+0x96, 0x04, 0xc0, 0x04, 0x84, 0x41, 0x14, 0x20, 0x81, 0x8a, 0xdd, 0x9e, 0x46, 0x20, 0x04, 0x01,
+0xa0, 0x52, 0x56, 0x00, 0x80, 0x04, 0x42, 0x00, 0x08, 0x0b, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc,
+0x46, 0x50, 0x04, 0x00, 0x46, 0x60, 0x04, 0x01, 0x58, 0x63, 0x06, 0x8c, 0x04, 0x82, 0x80, 0x80,
+0xb4, 0x86, 0x46, 0x70, 0x00, 0x04, 0x58, 0x73, 0x83, 0x28, 0x58, 0x02, 0x00, 0x40, 0xb6, 0x06,
+0x44, 0x00, 0x00, 0xff, 0xdd, 0x27, 0x44, 0x00, 0x00, 0xff, 0xdd, 0x27, 0x44, 0x00, 0x00, 0xff,
+0xdd, 0x27, 0x44, 0x00, 0x00, 0xff, 0xdd, 0x27, 0xb4, 0x66, 0x42, 0x11, 0x98, 0x09, 0x54, 0x04,
+0x00, 0x03, 0xb6, 0x26, 0xc8, 0x14, 0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x04, 0xb4, 0x80,
+0x46, 0x3f, 0xf0, 0xff, 0x58, 0x22, 0x00, 0x01, 0xb6, 0x40, 0x05, 0xe0, 0x00, 0x00, 0x58, 0x31,
+0x8f, 0xff, 0x50, 0x10, 0x00, 0x08, 0x40, 0x2f, 0x0c, 0x02, 0xd5, 0x19, 0x84, 0xa1, 0xd8, 0x1c,
+0x46, 0x00, 0x04, 0x00, 0x58, 0x00, 0x02, 0x04, 0xb4, 0xa0, 0x42, 0x42, 0x80, 0x09, 0xb6, 0x80,
+0x46, 0x3f, 0xf0, 0xff, 0xb4, 0x40, 0x58, 0x31, 0x8f, 0xff, 0x41, 0xe1, 0x0c, 0x02, 0x15, 0xe0,
+0x00, 0x00, 0xb4, 0xa0, 0x50, 0x10, 0x00, 0x08, 0x42, 0x22, 0xd0, 0x08, 0xb6, 0x40, 0xb4, 0x41,
+0x58, 0x01, 0x03, 0x00, 0xb6, 0x01, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x9c, 0x3c,
+0x96, 0xd8, 0x96, 0x90, 0xcb, 0x15, 0x54, 0x21, 0x00, 0xfc, 0xd5, 0x0f, 0x38, 0x41, 0x84, 0x02,
+0x9c, 0xdc, 0x40, 0x52, 0x60, 0x09, 0x40, 0x72, 0x20, 0x09, 0x40, 0x62, 0x40, 0x09, 0xa9, 0xc1,
+0xa9, 0x82, 0xa9, 0x43, 0xb6, 0x80, 0x8c, 0x10, 0x4c, 0x31, 0x7f, 0xf2, 0xd5, 0x0c, 0x84, 0xa1,
+0xdb, 0x0a, 0x84, 0x60, 0xd5, 0x05, 0xa3, 0xc9, 0x38, 0x71, 0x80, 0x08, 0x9c, 0xd9, 0x97, 0x18,
+0xe2, 0x82, 0xe9, 0xfa, 0x3a, 0x6f, 0x9c, 0x04, 0xdd, 0x9e, 0x92, 0x00, 0x96, 0x01, 0x96, 0x89,
+0xe2, 0x02, 0xe8, 0x02, 0x80, 0x20, 0x96, 0x09, 0xdd, 0x9e, 0x92, 0x00, 0x96, 0x00, 0x96, 0x88,
+0xe2, 0x02, 0xe8, 0x02, 0x80, 0x20, 0x96, 0x08, 0xdd, 0x9e, 0x92, 0x00, 0xd5, 0x03, 0x92, 0x00,
+0x9e, 0x01, 0x96, 0x00, 0xc8, 0xfd, 0xdd, 0x9e, 0xd5, 0x08, 0x44, 0x10, 0x00, 0xff, 0x92, 0x00,
+0x9e, 0x49, 0x96, 0x48, 0xc9, 0xfd, 0x9e, 0x01, 0x96, 0x00, 0xc8, 0xf8, 0xdd, 0x9e, 0x92, 0x00,
+0x46, 0x20, 0x00, 0x0d, 0x58, 0x21, 0x0d, 0x78, 0xb4, 0x22, 0xc1, 0x08, 0xd5, 0x09, 0x84, 0x2a,
+0x92, 0x00, 0x9e, 0xc9, 0x96, 0x58, 0xc9, 0xfd, 0x9e, 0x01, 0xc8, 0xfa, 0xd5, 0x0b, 0x8c, 0x1f,
+0x92, 0x05, 0xd5, 0x07, 0x84, 0x28, 0x92, 0x00, 0x9f, 0x09, 0x96, 0x60, 0xc9, 0xfd, 0x9e, 0x01,
+0xc8, 0xfa, 0xdd, 0x9e, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0xbc, 0x96, 0x00, 0x54, 0xa0,
+0x80, 0xff, 0x46, 0x10, 0x00, 0x0b, 0x58, 0x10, 0x80, 0x20, 0x97, 0xd1, 0x40, 0x80, 0x04, 0x00,
+0x84, 0xc0, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94, 0x8d, 0xc0, 0xd5, 0x09, 0x4b, 0xe0, 0x24, 0x01,
+0x9d, 0xb1, 0x9d, 0xf9, 0x18, 0x04, 0x00, 0x01, 0x97, 0xb0, 0x97, 0xf9, 0x80, 0x07, 0x84, 0x20,
+0xe2, 0xca, 0xe9, 0xf5, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0x00, 0x04, 0x00, 0x04, 0x10, 0x00, 0x09, 0x4e, 0x14, 0x00, 0x04, 0x84, 0x21, 0xd5, 0x02,
+0x84, 0x20, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x17, 0x81, 0x69, 0x44, 0x00, 0x00, 0x11, 0x84, 0x20,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8d, 0xc0, 0xdd, 0x2f, 0x54, 0x30, 0x00, 0x0f, 0x84, 0xa2,
+0xdb, 0x0e, 0x54, 0x40, 0x00, 0x10, 0xc4, 0x09, 0x46, 0x50, 0x04, 0x00, 0x05, 0xe2, 0x80, 0x08,
+0x42, 0x6f, 0x2c, 0x09, 0x14, 0x62, 0x80, 0x08, 0x84, 0x20, 0xd5, 0x02, 0x84, 0x21, 0x46, 0xf0,
+0x00, 0x0b, 0x10, 0x17, 0x81, 0x68, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x68, 0xc8, 0x47,
+0x46, 0x60, 0x00, 0x04, 0x58, 0x63, 0x03, 0x78, 0x84, 0x02, 0x84, 0x21, 0x94, 0x83, 0xdd, 0x26,
+0x84, 0x08, 0x84, 0x26, 0x44, 0x20, 0x00, 0x12, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x24, 0x84, 0x22,
+0x9e, 0x82, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x2a, 0x84, 0x23, 0x94, 0x8b, 0xdd, 0x26, 0x44, 0x00,
+0x00, 0x2e, 0x84, 0x23, 0x44, 0x20, 0x00, 0x1b, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x35, 0x84, 0x21,
+0x44, 0x20, 0x00, 0x1e, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x39, 0x84, 0x21, 0x44, 0x20, 0x00, 0x1f,
+0xdd, 0x26, 0x44, 0x00, 0x00, 0x76, 0x84, 0x21, 0x94, 0x8d, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x7a,
+0x84, 0x21, 0x44, 0x20, 0x00, 0x21, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x78, 0x84, 0x21, 0x44, 0x20,
+0x00, 0x26, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x96, 0x84, 0x21, 0x44, 0x20, 0x00, 0x24, 0xdd, 0x26,
+0x44, 0x00, 0x00, 0x9d, 0x84, 0x21, 0x44, 0x20, 0x00, 0x25, 0xdd, 0x26, 0x3a, 0x6f, 0x98, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xec, 0x46, 0x80, 0x04, 0x01, 0x97, 0x81,
+0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x00, 0x20, 0x97, 0x08, 0x96, 0x92, 0x96, 0xda, 0x58, 0x84,
+0x04, 0x00, 0x40, 0x93, 0x00, 0x00, 0x84, 0xe0, 0x47, 0xc0, 0x00, 0x03, 0x59, 0xce, 0x0d, 0xc0,
+0x85, 0x47, 0xd5, 0x1a, 0xc3, 0x0b, 0xf2, 0x82, 0xf3, 0x81, 0xf4, 0x83, 0x80, 0x06, 0x84, 0x20,
+0xdd, 0x3c, 0xf2, 0x02, 0xf3, 0x01, 0xf4, 0x03, 0xd5, 0x03, 0x00, 0x04, 0x80, 0x00, 0x9c, 0x79,
+0x9d, 0xb1, 0x56, 0x73, 0x80, 0x01, 0xc2, 0x03, 0x40, 0x05, 0x1c, 0x1a, 0x1c, 0x04, 0x00, 0x01,
+0x97, 0xc8, 0x97, 0xb1, 0x8d, 0x21, 0xe2, 0xe4, 0xe9, 0xe6, 0xec, 0x14, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x81, 0xcc, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0b, 0x02, 0x07, 0x80, 0xae, 0xc8, 0x02, 0xd5, 0x03, 0x84, 0xa1,
+0xd8, 0x0b, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x07, 0x81, 0x62, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x81, 0xcc, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xa8, 0xdd, 0x2f,
+0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x0b, 0x00, 0x07, 0x81, 0x65, 0xc8, 0x1c, 0x46, 0xf0, 0x00, 0x0b, 0x02, 0x07, 0x80, 0xae,
+0x84, 0xa1, 0xd8, 0x13, 0x46, 0x40, 0x04, 0x01, 0x04, 0x12, 0x01, 0xa3, 0x46, 0x00, 0x04, 0x10,
+0x59, 0xe0, 0x80, 0x08, 0x54, 0x5f, 0x00, 0xff, 0x14, 0x52, 0x01, 0xa3, 0x58, 0x00, 0x02, 0x38,
+0xb4, 0x60, 0x42, 0x11, 0xc4, 0x08, 0xd5, 0x36, 0x84, 0xa2, 0xd8, 0x50, 0xd5, 0x49, 0x84, 0xa2,
+0xd8, 0x4d, 0x46, 0xf0, 0x00, 0x0b, 0x02, 0x07, 0x80, 0xae, 0xc8, 0x48, 0x46, 0xf0, 0x00, 0x0b,
+0x02, 0x07, 0x80, 0xaf, 0x44, 0x50, 0x00, 0x81, 0xd0, 0x1d, 0x5c, 0xf0, 0x00, 0x82, 0xe8, 0x08,
+0xe6, 0x0a, 0xe8, 0x03, 0xc8, 0x0f, 0xd5, 0x34, 0x9f, 0x69, 0xd8, 0x38, 0xd5, 0x31, 0x9c, 0x6a,
+0x4c, 0x00, 0x80, 0x20, 0xe2, 0x01, 0xe9, 0x18, 0x9d, 0x49, 0xd0, 0x20, 0x9d, 0x4a, 0xd8, 0x2e,
+0xd5, 0x22, 0x97, 0x40, 0x46, 0x40, 0x04, 0x01, 0x94, 0x2d, 0x58, 0x42, 0x00, 0x08, 0x98, 0x04,
+0xd5, 0x05, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x38, 0x05, 0xe0, 0x00, 0x00, 0x58, 0x1f,
+0x00, 0x40, 0xb6, 0x20, 0xd5, 0x15, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x58, 0xd5, 0xf6,
+0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x78, 0xd5, 0xf1, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00,
+0x00, 0x98, 0xd5, 0xec, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0xb8, 0xd5, 0xe7, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x81, 0xa8, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x65, 0xc0, 0x05, 0x84, 0xa2, 0x4c, 0x02,
+0xc0, 0xa3, 0xd5, 0x1a, 0x46, 0xf0, 0x00, 0x0b, 0x02, 0x37, 0x80, 0xae, 0x84, 0xa1, 0x4c, 0x32,
+0xc0, 0x9b, 0x46, 0x30, 0x04, 0x01, 0x04, 0x41, 0x81, 0xa3, 0x46, 0x50, 0x04, 0x10, 0x54, 0x22,
+0x00, 0xf7, 0x14, 0x21, 0x81, 0xa3, 0x04, 0x02, 0x80, 0x8e, 0x43, 0xe0, 0x44, 0x09, 0x15, 0xe2,
+0x80, 0x8e, 0x48, 0x00, 0x00, 0x83, 0x46, 0xf0, 0x00, 0x0b, 0x02, 0x57, 0x80, 0xae, 0x4e, 0x53,
+0x00, 0x83, 0x46, 0x20, 0x00, 0x0b, 0x02, 0x01, 0x00, 0xaf, 0x44, 0x50, 0x00, 0x82, 0xd0, 0x3b,
+0x5c, 0xf0, 0x00, 0x83, 0xe8, 0x07, 0xc0, 0x71, 0xe6, 0x0a, 0xe9, 0x0c, 0x9f, 0x69, 0xd8, 0x6d,
+0xd5, 0x25, 0x9c, 0x6a, 0x4c, 0x00, 0x80, 0x4a, 0xe2, 0x01, 0xe9, 0x3a, 0x9d, 0x49, 0xd8, 0x65,
+0xd5, 0x51, 0x55, 0xe0, 0x00, 0xff, 0x46, 0x50, 0x04, 0x01, 0x58, 0x52, 0x86, 0x88, 0x58, 0x3f,
+0x00, 0x60, 0x15, 0xe2, 0x80, 0x00, 0x40, 0x0f, 0x14, 0x08, 0xb6, 0x65, 0x50, 0x12, 0xf9, 0x80,
+0x41, 0xe0, 0x04, 0x00, 0xb4, 0x7e, 0x42, 0x11, 0x98, 0x09, 0xb6, 0x3e, 0x00, 0x01, 0x01, 0x5e,
+0x58, 0x40, 0x00, 0x60, 0xb6, 0x05, 0xb6, 0x85, 0xd5, 0x48, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00,
+0x06, 0x88, 0x44, 0x30, 0x00, 0x11, 0x44, 0x20, 0x00, 0x71, 0xb6, 0x60, 0x50, 0x10, 0x79, 0xb0,
+0xb6, 0x40, 0xd5, 0x34, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x06, 0x88, 0x44, 0x30, 0x00, 0x12,
+0x44, 0x20, 0x00, 0x72, 0xb6, 0x60, 0x50, 0x10, 0x79, 0xd0, 0xb6, 0x40, 0xd5, 0x27, 0x46, 0x00,
+0x04, 0x01, 0x58, 0x00, 0x06, 0x88, 0x44, 0x30, 0x00, 0x13, 0x44, 0x20, 0x00, 0x73, 0xb6, 0x60,
+0x50, 0x10, 0x79, 0xf0, 0xb6, 0x40, 0xd5, 0x1a, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x06, 0x88,
+0x44, 0x30, 0x00, 0x14, 0x44, 0x20, 0x00, 0x74, 0xb6, 0x60, 0x50, 0x10, 0x7a, 0x10, 0xb6, 0x40,
+0xd5, 0x0d, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x06, 0x88, 0x44, 0x30, 0x00, 0x15, 0x44, 0x20,
+0x00, 0x75, 0xb6, 0x60, 0xb6, 0x40, 0x50, 0x10, 0x7a, 0x30, 0x05, 0xe0, 0x80, 0x00, 0x42, 0x4f,
+0x18, 0x09, 0xb6, 0x81, 0xb6, 0x60, 0xb6, 0x40, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc,
+0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xa8, 0xdd, 0x2f, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x96, 0x92,
+0x97, 0xc1, 0x97, 0x8b, 0xf2, 0x81, 0x47, 0xc0, 0x00, 0x04, 0x59, 0xce, 0x04, 0xb4, 0x46, 0xa0,
+0x00, 0x04, 0x58, 0xa5, 0x01, 0xc0, 0x46, 0x90, 0x00, 0x04, 0x58, 0x94, 0x81, 0xcc, 0xd5, 0x20,
+0x96, 0x30, 0x44, 0x10, 0x00, 0x40, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x0c, 0xdd, 0x2f,
+0x81, 0x00, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xec, 0xdd, 0x2f, 0xc0, 0xfb, 0xf3, 0x01,
+0x80, 0x28, 0x84, 0x40, 0x80, 0x07, 0xdd, 0x3c, 0x50, 0x63, 0x7f, 0xc0, 0x80, 0x08, 0x50, 0x73,
+0x80, 0x40, 0x4b, 0xe0, 0x28, 0x01, 0x97, 0xb3, 0x4b, 0xe0, 0x24, 0x01, 0x97, 0xf9, 0x4e, 0x64,
+0xff, 0xe1, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0xbc,
+0x46, 0xf0, 0x00, 0x0b, 0x00, 0x57, 0x81, 0x64, 0x40, 0x80, 0x00, 0x10, 0x4c, 0x54, 0x40, 0x31,
+0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x00, 0x20, 0x44, 0x40, 0x00, 0x40, 0x84, 0x60, 0x10, 0x30,
+0x00, 0x8e, 0x10, 0x40, 0x00, 0x8d, 0x10, 0x40, 0x00, 0x3e, 0x10, 0x30, 0x00, 0x3f, 0x10, 0x40,
+0x00, 0x45, 0x10, 0x30, 0x00, 0x46, 0x10, 0x40, 0x00, 0x4c, 0x10, 0x30, 0x00, 0x4d, 0x10, 0x40,
+0x00, 0x53, 0x10, 0x30, 0x00, 0x54, 0x10, 0x40, 0x00, 0x5a, 0x10, 0x30, 0x00, 0x5b, 0x10, 0x40,
+0x00, 0x61, 0x10, 0x30, 0x00, 0x62, 0x10, 0x40, 0x00, 0x68, 0x10, 0x30, 0x00, 0x69, 0x10, 0x40,
+0x00, 0x6f, 0x10, 0x30, 0x00, 0x70, 0x10, 0x40, 0x00, 0x86, 0x10, 0x30, 0x00, 0x87, 0x46, 0x60,
+0x00, 0x0b, 0x00, 0x03, 0x01, 0x60, 0x44, 0x10, 0x00, 0x40, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x83, 0x0c, 0xdd, 0x2f, 0x80, 0x20, 0x80, 0x48, 0x84, 0x60, 0x80, 0xe0, 0x44, 0x00, 0x00, 0x28,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x84, 0xb4, 0xdd, 0x2f, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x81, 0xc0, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f,
+0x00, 0x53, 0x01, 0x60, 0x5c, 0xf2, 0x80, 0x41, 0xe9, 0x37, 0x46, 0x60, 0x00, 0x04, 0x58, 0x63,
+0x01, 0xec, 0x4b, 0xe0, 0x18, 0x01, 0xc0, 0xfe, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x67, 0x80, 0x4c,
+0x84, 0xa1, 0x46, 0x00, 0x00, 0x0b, 0x46, 0x20, 0x00, 0x04, 0x58, 0x21, 0x03, 0x0c, 0xde, 0x05,
+0x00, 0x00, 0x01, 0x60, 0x84, 0x2a, 0xd5, 0x05, 0x00, 0x00, 0x01, 0x60, 0x44, 0x10, 0x00, 0x36,
+0x50, 0x00, 0x7f, 0xc0, 0x96, 0x00, 0x4b, 0xe0, 0x08, 0x01, 0x84, 0x40, 0x80, 0x20, 0x80, 0xc0,
+0x80, 0x62, 0x44, 0x00, 0x00, 0x68, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x84, 0xb4, 0xdd, 0x2f,
+0x80, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xc0, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f, 0x46, 0x30, 0x00, 0x0b, 0x58, 0x31, 0x80, 0x20, 0x84, 0x40,
+0x84, 0x82, 0x10, 0x41, 0x80, 0x8e, 0x10, 0x21, 0x80, 0x8d, 0x10, 0x21, 0x80, 0x3e, 0x10, 0x41,
+0x80, 0x3f, 0x10, 0x21, 0x80, 0x45, 0x10, 0x41, 0x80, 0x46, 0x10, 0x21, 0x80, 0x4c, 0x10, 0x41,
+0x80, 0x4d, 0x10, 0x21, 0x80, 0x53, 0x10, 0x41, 0x80, 0x54, 0x10, 0x21, 0x80, 0x5a, 0x10, 0x41,
+0x80, 0x5b, 0x10, 0x21, 0x80, 0x61, 0x10, 0x41, 0x80, 0x62, 0x10, 0x21, 0x80, 0x68, 0x10, 0x41,
+0x80, 0x69, 0x10, 0x21, 0x80, 0x6f, 0x10, 0x41, 0x80, 0x70, 0x10, 0x21, 0x80, 0x86, 0x10, 0x41,
+0x80, 0x87, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x46, 0x80,
+0x00, 0x0b, 0x02, 0x04, 0x00, 0xae, 0x84, 0xa3, 0x40, 0x10, 0x20, 0x09, 0xd1, 0x45, 0xe6, 0x24,
+0xe8, 0x07, 0x84, 0xa1, 0xd1, 0x0d, 0x84, 0xa2, 0x4c, 0x12, 0xc0, 0x98, 0xd5, 0x34, 0x84, 0xa7,
+0xd1, 0x34, 0x84, 0xaf, 0xd1, 0x14, 0x84, 0xa6, 0x4c, 0x12, 0xc0, 0x90, 0xd5, 0x1e, 0x46, 0xf0,
+0x00, 0x0b, 0x00, 0x07, 0x81, 0x60, 0x44, 0x10, 0x00, 0x12, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x83, 0x0c, 0xdd, 0x2f, 0x80, 0x20, 0x84, 0x00, 0x80, 0x40, 0xd5, 0x79, 0x46, 0xf0, 0x00, 0x0b,
+0x00, 0x07, 0x81, 0x60, 0x84, 0x2c, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x0c, 0xdd, 0x2f,
+0x80, 0x20, 0x44, 0x00, 0x00, 0x1c, 0xd5, 0x51, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x60,
+0x84, 0x2a, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x0c, 0xdd, 0x2f, 0x80, 0x20, 0x44, 0x00,
+0x00, 0x12, 0xd5, 0x43, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x88, 0x4c, 0xdd, 0x2f, 0xd5, 0x5f, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x67, 0x81, 0x68, 0xce, 0x03,
+0x96, 0x00, 0xc8, 0x05, 0x44, 0x00, 0x00, 0x9e, 0x84, 0x24, 0xd5, 0x2f, 0x46, 0x70, 0x00, 0x03,
+0x58, 0x73, 0x8d, 0xc0, 0x80, 0x26, 0x50, 0x00, 0x00, 0x27, 0x4b, 0xe0, 0x1c, 0x01, 0x81, 0x20,
+0x80, 0x26, 0x44, 0x00, 0x00, 0x27, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x50, 0x00, 0xff, 0x80, 0x20,
+0xd0, 0x05, 0x00, 0x04, 0x01, 0x5c, 0xe6, 0x0d, 0xe9, 0x1a, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07,
+0x81, 0x5c, 0x84, 0xa1, 0xd8, 0x06, 0x44, 0x00, 0x00, 0xa2, 0x44, 0x10, 0x00, 0x12, 0xd5, 0x0d,
+0x84, 0xa2, 0xd8, 0x06, 0x44, 0x00, 0x00, 0xb4, 0x44, 0x10, 0x00, 0x1c, 0xd5, 0x06, 0x84, 0xa3,
+0xd8, 0x24, 0x44, 0x00, 0x00, 0xd0, 0x84, 0x28, 0x84, 0x40, 0xd5, 0x19, 0x40, 0x00, 0xa0, 0x08,
+0x55, 0xe4, 0x80, 0xff, 0x40, 0x8f, 0x00, 0x04, 0x40, 0x84, 0x00, 0x13, 0x80, 0x26, 0x80, 0x08,
+0x4b, 0xe0, 0x1c, 0x01, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x17, 0x81, 0x60, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x83, 0x0c, 0xdd, 0x2f, 0x80, 0x20, 0x84, 0x41, 0x80, 0x08, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x87, 0xd8, 0xdd, 0x2f, 0xd5, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xa8,
+0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x46, 0x40, 0x04, 0x01, 0x80, 0x64, 0x96, 0x48, 0x96, 0x00, 0x14, 0x02, 0x01, 0x00,
+0x14, 0x11, 0x81, 0x01, 0x96, 0x10, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xc0, 0xdd, 0x2f,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x84, 0x00, 0x80, 0x20, 0x84, 0x41,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8b, 0x3c, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07,
+0x81, 0x62, 0x84, 0x20, 0x84, 0x41, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8b, 0x3c, 0xdd, 0x2f,
+0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0,
+0x00, 0x0b, 0x00, 0x07, 0x81, 0x65, 0x44, 0x50, 0x00, 0x81, 0xd0, 0x50, 0x9d, 0x69, 0xd0, 0x0b,
+0x9f, 0x6a, 0xd8, 0x44, 0x47, 0xe0, 0x04, 0x01, 0x04, 0x5f, 0x01, 0xa3, 0x54, 0x42, 0x80, 0x08,
+0xcc, 0x43, 0xd5, 0x44, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x5e, 0x9f, 0x69, 0xd0, 0x12,
+0x5c, 0xf0, 0x00, 0x82, 0xe8, 0x05, 0xc0, 0x3a, 0xe6, 0x0a, 0xe8, 0x30, 0xd5, 0x24, 0x9c, 0x6a,
+0x4c, 0x00, 0x80, 0x13, 0xe2, 0x01, 0xe9, 0x0b, 0x9d, 0x49, 0xd0, 0x13, 0x9d, 0x4a, 0xd8, 0x26,
+0xd5, 0x15, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x38, 0xd5, 0x1b, 0x46, 0x00, 0x04, 0x01,
+0x58, 0x00, 0x00, 0x58, 0xd5, 0x16, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x78, 0xd5, 0x11,
+0x46, 0x00, 0x04, 0x01, 0x58, 0x00, 0x00, 0x98, 0xd5, 0x0c, 0x46, 0x00, 0x04, 0x01, 0x58, 0x00,
+0x00, 0xb8, 0xd5, 0x07, 0x46, 0x50, 0x04, 0x01, 0x95, 0x05, 0x58, 0x52, 0x80, 0x08, 0x98, 0x25,
+0x05, 0xe0, 0x00, 0x00, 0x42, 0x0f, 0x18, 0x0b, 0xd5, 0x0a, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x81, 0xa8, 0xdd, 0x2f, 0xd5, 0x0b, 0x84, 0x02, 0xd5, 0x02, 0x84, 0x00, 0x84, 0x20, 0x84, 0x42,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8b, 0x3c, 0xdd, 0x2f, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x30, 0x04, 0x01, 0x04, 0x51, 0x81, 0x80, 0x46, 0xf0, 0x00, 0x0b,
+0x10, 0x57, 0x81, 0x65, 0x80, 0x83, 0x04, 0x12, 0x01, 0x81, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x17,
+0x81, 0x66, 0x80, 0xa3, 0x04, 0x21, 0x81, 0x82, 0x04, 0x42, 0x81, 0x83, 0x96, 0x10, 0x96, 0x60,
+0x40, 0x30, 0xa0, 0x08, 0x40, 0x51, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x0b, 0x12, 0x57, 0x80, 0xae,
+0x46, 0x20, 0x04, 0x01, 0x80, 0x02, 0x04, 0x11, 0x01, 0x84, 0x04, 0x30, 0x01, 0x85, 0x97, 0x08,
+0x97, 0x58, 0x40, 0x22, 0xa0, 0x08, 0x40, 0x51, 0x10, 0x04, 0x46, 0xf0, 0x00, 0x0b, 0x12, 0x57,
+0x80, 0xaf, 0x80, 0x20, 0x04, 0x40, 0x81, 0x86, 0x04, 0x30, 0x01, 0x87, 0x96, 0x60, 0x96, 0x18,
+0x40, 0x40, 0x20, 0x08, 0x40, 0x32, 0x04, 0x04, 0x46, 0x00, 0x04, 0x01, 0x46, 0xf0, 0x00, 0x0b,
+0x12, 0x37, 0x80, 0xb0, 0x84, 0x41, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x0b, 0x14, 0x57, 0x80, 0x55,
+0x46, 0xf0, 0x00, 0x0b, 0x10, 0x27, 0x81, 0x63, 0x14, 0x10, 0x01, 0x8c, 0xdd, 0x9e, 0x92, 0x00,
+0x84, 0x20, 0x46, 0xf0, 0x00, 0x0d, 0x10, 0x17, 0x8d, 0x7c, 0xdd, 0x9e, 0x46, 0x30, 0x04, 0x01,
+0x44, 0x50, 0x00, 0xff, 0x80, 0x43, 0x14, 0x51, 0x81, 0x8a, 0x44, 0x30, 0x00, 0x39, 0x46, 0x10,
+0x04, 0x01, 0x14, 0x31, 0x01, 0x98, 0x58, 0x10, 0x86, 0x88, 0x84, 0x80, 0x44, 0x50, 0x00, 0x10,
+0x44, 0x30, 0x00, 0x70, 0x44, 0x20, 0x00, 0x60, 0xb6, 0xa1, 0x50, 0x00, 0x80, 0x18, 0xb6, 0x61,
+0xb6, 0x81, 0xb6, 0x41, 0x44, 0x10, 0x00, 0x31, 0xb6, 0x20, 0x9d, 0x49, 0x9c, 0x4c, 0x9e, 0xca,
+0x9e, 0x89, 0xb6, 0xa0, 0xb6, 0x60, 0xb6, 0x40, 0xb6, 0x20, 0x80, 0x24, 0x50, 0x20, 0x80, 0x21,
+0x84, 0xa9, 0x9c, 0x49, 0xb6, 0x40, 0xd9, 0xfb, 0x46, 0x00, 0x04, 0x01, 0x44, 0x10, 0x00, 0x3f,
+0x14, 0x10, 0x01, 0x8c, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xe4, 0x84, 0x41,
+0x46, 0xf0, 0x00, 0x0b, 0x10, 0x27, 0x81, 0x64, 0x47, 0xe0, 0x04, 0x01, 0x04, 0x1f, 0x01, 0xa3,
+0x46, 0x40, 0x04, 0x00, 0x58, 0x50, 0x80, 0x01, 0x14, 0x5f, 0x01, 0xa3, 0x83, 0x9e, 0x81, 0x5c,
+0x81, 0x2a, 0x04, 0x02, 0x00, 0x8f, 0x15, 0xcf, 0x80, 0x00, 0x14, 0xaf, 0x80, 0x01, 0x14, 0x9f,
+0x80, 0x02, 0xb4, 0x7f, 0xf2, 0x01, 0xf1, 0x02, 0x81, 0x09, 0x80, 0xe8, 0x80, 0xc7, 0x14, 0x8f,
+0x80, 0x03, 0xf7, 0x84, 0xf6, 0x85, 0x58, 0x31, 0x80, 0x38, 0x58, 0x21, 0x00, 0x58, 0x58, 0x10,
+0x80, 0x78, 0xb6, 0x7f, 0xf2, 0x81, 0xf1, 0x82, 0xf3, 0x03, 0xf2, 0x04, 0xf1, 0x05, 0x58, 0x00,
+0x02, 0x00, 0x58, 0x31, 0x80, 0x98, 0x58, 0x21, 0x00, 0xb8, 0x58, 0x10, 0x80, 0x48, 0xf3, 0x83,
+0xf2, 0x84, 0xf1, 0x85, 0x14, 0x02, 0x00, 0x8f, 0x44, 0x00, 0x00, 0x8c, 0xb4, 0x9f, 0x9e, 0x84,
+0xb6, 0x04, 0x9e, 0xd4, 0xf4, 0x01, 0x9e, 0x43, 0xb6, 0x44, 0x83, 0xc6, 0xf0, 0x02, 0x83, 0x86,
+0xb6, 0x60, 0x81, 0x46, 0xf4, 0x03, 0x81, 0x26, 0xb6, 0x24, 0x81, 0x06, 0xf0, 0x04, 0x80, 0xe6,
+0xb6, 0x40, 0xf4, 0x05, 0x80, 0xa6, 0x44, 0x00, 0x00, 0x20, 0xb6, 0x44, 0x14, 0x3f, 0x00, 0x1a,
+0xb9, 0xa2, 0x14, 0x15, 0x00, 0x2a, 0x14, 0x14, 0x80, 0x32, 0x14, 0x14, 0x00, 0x3a, 0x14, 0x23,
+0x80, 0x42, 0x14, 0x13, 0x00, 0x4a, 0x14, 0x02, 0x81, 0x8c, 0xec, 0x1c, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x46, 0x10, 0x04, 0x01, 0x04, 0x60,
+0x81, 0x8c, 0x96, 0x34, 0xc0, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8c, 0x84, 0xdd, 0x2f,
+0x54, 0x23, 0x00, 0x08, 0xc2, 0x17, 0x46, 0x40, 0x04, 0x01, 0x80, 0x64, 0x84, 0x48, 0x84, 0x20,
+0x84, 0x01, 0x14, 0x22, 0x01, 0x8c, 0x14, 0x11, 0x81, 0xa7, 0x46, 0xf0, 0x00, 0x0d, 0x10, 0x07,
+0x8d, 0x7c, 0x46, 0x30, 0x04, 0x00, 0x04, 0x51, 0x80, 0x96, 0x42, 0x42, 0xfc, 0x08, 0x14, 0x41,
+0x80, 0x96, 0x54, 0x53, 0x00, 0x10, 0xc5, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8d, 0x2c,
+0xdd, 0x2f, 0x54, 0x63, 0x00, 0x20, 0xc6, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x8d, 0x98,
+0xdd, 0x2f, 0x46, 0x00, 0x04, 0x01, 0x05, 0xe0, 0x01, 0x8c, 0x15, 0xef, 0x80, 0x01, 0xec, 0x08,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x50, 0x0f,
+0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x01,
+0x44, 0x50, 0x00, 0x80, 0x14, 0x52, 0x01, 0xa8, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x07, 0x81, 0x65,
+0x46, 0x60, 0x00, 0x0b, 0x84, 0x40, 0x54, 0x00, 0x00, 0x60, 0x44, 0x10, 0x00, 0x20, 0x10, 0x23,
+0x01, 0x63, 0x4c, 0x00, 0x80, 0x20, 0x95, 0x49, 0xd0, 0x14, 0xc8, 0x1c, 0x46, 0xf0, 0x00, 0x0b,
+0x00, 0x07, 0x81, 0x66, 0x84, 0x2c, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x0c, 0xdd, 0x2f,
+0x46, 0x10, 0x00, 0x0a, 0x58, 0x10, 0x8e, 0xe8, 0x38, 0x20, 0x82, 0x02, 0xdd, 0x22, 0xd5, 0x0f,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x83, 0xc4, 0xdd, 0x2f, 0x96, 0xc0, 0x10, 0x33, 0x01, 0x63,
+0xd5, 0x06, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xa8, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x01,
+0x84, 0xa0, 0x14, 0x52, 0x01, 0xa8, 0xf0, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84,
+0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xf4, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0xbc, 0xdd, 0x2f, 0x46, 0x50, 0x04, 0x01,
+0x04, 0x02, 0x81, 0xa3, 0x54, 0x00, 0x00, 0x02, 0xc8, 0x66, 0x80, 0xe5, 0xb6, 0xff, 0x80, 0xc5,
+0xb4, 0x3f, 0xf6, 0x81, 0x58, 0x10, 0x80, 0xb8, 0xb6, 0x3f, 0xf1, 0x01, 0x80, 0x45, 0x58, 0x10,
+0x80, 0x88, 0xf1, 0x81, 0x44, 0x10, 0x00, 0x8b, 0x14, 0x11, 0x00, 0x26, 0x83, 0xc2, 0xb4, 0x5f,
+0x83, 0x85, 0xb6, 0x22, 0x81, 0x45, 0xf2, 0x01, 0x81, 0x25, 0x81, 0x05, 0x80, 0xe5, 0xb6, 0x22,
+0x80, 0xc5, 0x44, 0x20, 0x00, 0xff, 0x46, 0x40, 0x04, 0x01, 0x14, 0x1f, 0x00, 0x2a, 0x58, 0x42,
+0x06, 0x88, 0xb9, 0xb2, 0x14, 0x15, 0x00, 0x3a, 0x14, 0x14, 0x80, 0x42, 0x14, 0x14, 0x00, 0x4a,
+0x14, 0x23, 0x81, 0x8a, 0x44, 0x10, 0x00, 0x39, 0x44, 0x20, 0x00, 0x10, 0x14, 0x13, 0x01, 0x98,
+0xb6, 0x44, 0x44, 0x10, 0x00, 0x70, 0x44, 0x20, 0x00, 0x60, 0xb6, 0x24, 0x50, 0x32, 0x00, 0x18,
+0xb6, 0x04, 0x84, 0x22, 0xb6, 0x44, 0x44, 0x20, 0x00, 0x31, 0x14, 0x12, 0x81, 0xa3, 0x9d, 0x12,
+0xb6, 0x43, 0x9c, 0x53, 0x9f, 0x4a, 0x9c, 0x89, 0xb6, 0xa3, 0xb6, 0x83, 0xb6, 0x23, 0xb6, 0x43,
+0x80, 0x23, 0x50, 0x50, 0x00, 0x21, 0x84, 0x69, 0x9c, 0x01, 0xb6, 0xa1, 0x4c, 0x01, 0xff, 0xfb,
+0x80, 0xa6, 0x44, 0x00, 0x00, 0x3f, 0x84, 0x20, 0x14, 0x02, 0x81, 0x8c, 0x46, 0xf0, 0x00, 0x0b,
+0x10, 0x17, 0x81, 0x64, 0x80, 0x05, 0x04, 0x20, 0x01, 0xa3, 0x54, 0x41, 0x00, 0xfe, 0x14, 0x40,
+0x01, 0xa3, 0xd5, 0x38, 0x46, 0x40, 0x04, 0x00, 0x04, 0x32, 0x00, 0x85, 0x80, 0xe5, 0x46, 0x00,
+0x04, 0x01, 0x58, 0x00, 0x06, 0xa0, 0x58, 0x21, 0x80, 0x04, 0x44, 0x60, 0x00, 0x39, 0x45, 0xe0,
+0x00, 0x31, 0x45, 0xc0, 0x00, 0x32, 0x44, 0xa0, 0x00, 0x33, 0x44, 0x90, 0x00, 0x34, 0x44, 0x80,
+0x00, 0x35, 0x14, 0x22, 0x00, 0x85, 0x14, 0x63, 0x81, 0x98, 0x15, 0xe0, 0x00, 0x00, 0x15, 0xc0,
+0x00, 0x00, 0xb7, 0x40, 0xb7, 0x20, 0xb7, 0x00, 0x84, 0x20, 0x50, 0x80, 0x80, 0x21, 0x84, 0xa9,
+0x9c, 0x49, 0xb7, 0x00, 0xd9, 0xfb, 0x81, 0x27, 0x8d, 0x4c, 0x14, 0xa4, 0x81, 0x8c, 0x80, 0x07,
+0x04, 0x10, 0x01, 0xa3, 0x96, 0x4c, 0xc1, 0x02, 0x84, 0x21, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x17,
+0x81, 0x64, 0x46, 0x00, 0x04, 0x01, 0x84, 0xa0, 0x84, 0x40, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x27,
+0x81, 0x6a, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x27, 0x81, 0x63, 0x46, 0xf0, 0x00, 0x0b, 0x14, 0x57,
+0x80, 0x56, 0x14, 0x50, 0x01, 0xa8, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x37, 0x81, 0x64, 0x46, 0xf0,
+0x00, 0x0b, 0x00, 0x07, 0x81, 0x68, 0x46, 0xf0, 0x00, 0x0b, 0x00, 0x47, 0x81, 0x69, 0x40, 0x11,
+0xa4, 0x08, 0x40, 0x00, 0x28, 0x08, 0x40, 0x30, 0x80, 0x04, 0x58, 0x01, 0x80, 0x02, 0x40, 0x12,
+0x2c, 0x08, 0x46, 0x40, 0x04, 0x00, 0x40, 0x20, 0x04, 0x04, 0x46, 0xf0, 0x00, 0x0b, 0x10, 0x57,
+0x81, 0x67, 0x14, 0x22, 0x00, 0x8f, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x60, 0x00, 0x04, 0x58, 0x63, 0x01, 0xd8, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x81, 0xb4, 0xdd, 0x2f, 0x4b, 0xe0, 0x18, 0x01, 0xc0, 0xfe, 0x46, 0x00, 0x04, 0x01,
+0xb4, 0x40, 0x46, 0x00, 0x04, 0x01, 0x96, 0x90, 0x58, 0x00, 0x05, 0x00, 0x84, 0x20, 0xd5, 0x05,
+0xa3, 0x01, 0x96, 0xe0, 0x18, 0x30, 0x80, 0x01, 0xe0, 0x22, 0xe9, 0xfb, 0x47, 0xe0, 0x00, 0x0b,
+0x02, 0x3f, 0x00, 0xb0, 0x84, 0x20, 0x9a, 0x1a, 0x97, 0x41, 0x40, 0x00, 0x94, 0x06, 0x12, 0x5f,
+0x00, 0xb0, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x60, 0x00, 0x04,
+0x58, 0x63, 0x01, 0xd8, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xb4, 0xdd, 0x2f, 0x4b, 0xe0,
+0x18, 0x01, 0xc0, 0xfe, 0x47, 0xe0, 0x04, 0x01, 0xb4, 0xde, 0x97, 0xb0, 0x46, 0xf0, 0x00, 0x0b,
+0x04, 0x07, 0x80, 0x55, 0x46, 0x10, 0x04, 0x01, 0x80, 0x46, 0x58, 0x10, 0x85, 0x00, 0x84, 0x61,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x82, 0xac, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x0b, 0x02, 0x40,
+0x80, 0xb0, 0x84, 0x00, 0x9a, 0xe6, 0x96, 0x99, 0x40, 0x00, 0x08, 0x06, 0x12, 0x20, 0x80, 0xb0,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa0, 0xbc, 0x46, 0x60, 0x00, 0x0b,
+0x58, 0x63, 0x01, 0x60, 0xa4, 0x30, 0x44, 0x10, 0x00, 0x40, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x82, 0xfc, 0xdd, 0x2f, 0x46, 0x80, 0x00, 0x0b, 0x58, 0x84, 0x01, 0x54, 0x97, 0xc0, 0xb4, 0x28,
+0x46, 0x00, 0x04, 0x01, 0x80, 0x47, 0x58, 0x00, 0x04, 0x00, 0x84, 0x60, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x82, 0xac, 0xdd, 0x2f, 0xb4, 0x68, 0x80, 0x07, 0x98, 0xbb, 0xb6, 0x48, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x81, 0xc0, 0xdd, 0x2f, 0xa4, 0x70, 0x84, 0x00, 0x9b, 0xcf, 0x97, 0xf9,
+0x40, 0x00, 0x1c, 0x06, 0xad, 0xf0, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xf4, 0x96, 0x02, 0xf0, 0x81, 0x84, 0xc0, 0x46, 0xa0, 0x00, 0x04, 0x58, 0xa5, 0x02, 0xfc,
+0x46, 0x70, 0x00, 0x0b, 0x58, 0x73, 0x81, 0x54, 0x46, 0x90, 0x00, 0x03, 0x58, 0x94, 0x8d, 0xc0,
+0xd5, 0x12, 0x00, 0x83, 0x80, 0x01, 0xa7, 0x78, 0x40, 0x44, 0x20, 0x08, 0x40, 0x02, 0x14, 0x04,
+0xb6, 0x7f, 0x4b, 0xe0, 0x24, 0x01, 0xb4, 0x7f, 0x9d, 0xb1, 0xb6, 0x03, 0x97, 0xb0, 0xb4, 0x47,
+0x9c, 0x51, 0xb6, 0x27, 0x46, 0xf0, 0x00, 0x0b, 0x02, 0x07, 0x80, 0xb0, 0x44, 0x10, 0x00, 0x40,
+0x4b, 0xe0, 0x28, 0x01, 0x46, 0x10, 0x01, 0x00, 0x58, 0x10, 0x85, 0x00, 0x98, 0xb1, 0x46, 0x80,
+0x00, 0x0b, 0xf1, 0x01, 0x94, 0xd2, 0xe2, 0xc0, 0xe9, 0xdd, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x04,
+0x58, 0xf7, 0x81, 0xc0, 0xdd, 0x2f, 0x02, 0x34, 0x00, 0xb0, 0x84, 0x00, 0x9b, 0x9e, 0x97, 0xb1,
+0x40, 0x00, 0x18, 0x06, 0x12, 0x64, 0x00, 0xb0, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xf4, 0x46, 0x70, 0x00, 0x04, 0x58, 0x73, 0x81, 0xd8, 0x97, 0x82,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xb4, 0xdd, 0x2f, 0x4b, 0xe0, 0x1c, 0x01, 0xc0, 0xfe,
+0x46, 0x20, 0x04, 0x01, 0xb5, 0x22, 0x85, 0x00, 0x44, 0x10, 0x00, 0xfc, 0x40, 0x04, 0x18, 0x1b,
+0x40, 0x00, 0x98, 0x1a, 0x46, 0x70, 0x04, 0x01, 0xf0, 0x81, 0x54, 0x94, 0x80, 0xff, 0x58, 0x73,
+0x85, 0x00, 0x47, 0xc0, 0x00, 0x03, 0x59, 0xce, 0x0e, 0x9c, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63,
+0x01, 0x54, 0x46, 0xa0, 0x00, 0x03, 0x58, 0xa5, 0x0e, 0x20, 0xd5, 0x15, 0xdd, 0x3c, 0xa7, 0x31,
+0xf2, 0x01, 0xa6, 0x70, 0x40, 0x31, 0x10, 0x04, 0xa3, 0x79, 0x40, 0x01, 0xa0, 0x08, 0x40, 0x00,
+0x04, 0x04, 0x96, 0x68, 0x4b, 0xe0, 0x28, 0x01, 0xb4, 0x86, 0x8d, 0x01, 0x9c, 0xe1, 0xb6, 0x66,
+0x54, 0x84, 0x00, 0xff, 0xe3, 0x09, 0xe9, 0xeb, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8e, 0x6c,
+0xdd, 0x2f, 0x46, 0x30, 0x00, 0x0b, 0x02, 0x41, 0x80, 0xb0, 0x84, 0x20, 0x40, 0x02, 0x24, 0x01,
+0x97, 0x41, 0x40, 0x00, 0x94, 0x06, 0x12, 0x51, 0x80, 0xb0, 0xec, 0x0c, 0x3a, 0x6f, 0xaa, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x66,
+0xa6, 0x00, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63, 0x01, 0x6a, 0x84, 0x40, 0x44, 0x10, 0x00, 0x26,
+0xae, 0xb0, 0x4c, 0x00, 0x81, 0xde, 0x5c, 0xf0, 0x00, 0x27, 0xe8, 0x35, 0x84, 0x68, 0x4c, 0x01,
+0x82, 0x45, 0xe6, 0x09, 0xe8, 0x15, 0x84, 0x83, 0x4c, 0x02, 0x01, 0x7b, 0xe6, 0x04, 0xe8, 0x08,
+0x84, 0xa1, 0xd0, 0x6e, 0x87, 0xc2, 0x4c, 0x0f, 0x42, 0x5f, 0x48, 0x00, 0x01, 0x5c, 0x84, 0x26,
+0x4c, 0x00, 0x81, 0x67, 0x84, 0x47, 0x4c, 0x01, 0x42, 0x57, 0x48, 0x00, 0x01, 0x6a, 0x84, 0x6b,
+0x4c, 0x01, 0x82, 0x35, 0xe6, 0x0c, 0xe8, 0x09, 0x84, 0x89, 0x4c, 0x02, 0x02, 0x30, 0x84, 0xaa,
+0x4c, 0x02, 0xc2, 0x4a, 0x48, 0x00, 0x02, 0x24, 0x45, 0xe0, 0x00, 0x22, 0x4c, 0x0f, 0x01, 0xa1,
+0x44, 0x10, 0x00, 0x23, 0x4c, 0x00, 0x81, 0xb8, 0x44, 0x20, 0x00, 0x20, 0x4c, 0x01, 0x42, 0x3c,
+0x48, 0x00, 0x01, 0x89, 0x44, 0x30, 0x00, 0x43, 0x4c, 0x01, 0x81, 0x79, 0x5c, 0xf0, 0x00, 0x44,
+0xe8, 0x20, 0x44, 0x40, 0x00, 0x33, 0x4c, 0x02, 0x01, 0xcc, 0x5c, 0xf0, 0x00, 0x34, 0xe8, 0x0b,
+0x44, 0x50, 0x00, 0x27, 0x4c, 0x02, 0x81, 0xa0, 0x45, 0xe0, 0x00, 0x32, 0x4c, 0x0f, 0x42, 0x24,
+0x48, 0x00, 0x01, 0xaa, 0x44, 0x10, 0x00, 0x37, 0x4c, 0x00, 0x81, 0xbb, 0x44, 0x20, 0x00, 0x42,
+0x4c, 0x01, 0x01, 0x3c, 0x44, 0x30, 0x00, 0x36, 0x4c, 0x01, 0xc2, 0x16, 0x48, 0x00, 0x01, 0xa9,
+0x44, 0x40, 0x00, 0x52, 0x4c, 0x02, 0x01, 0xb9, 0x5c, 0xf0, 0x00, 0x53, 0xe8, 0x0b, 0x44, 0x50,
+0x00, 0x46, 0x4c, 0x02, 0x81, 0x3c, 0x45, 0xe0, 0x00, 0x47, 0x4c, 0x0f, 0x42, 0x05, 0x48, 0x00,
+0x01, 0x46, 0x44, 0x10, 0x00, 0x56, 0x4c, 0x00, 0x81, 0xb6, 0x44, 0x20, 0x00, 0x57, 0x4c, 0x01,
+0x01, 0xbb, 0x44, 0x30, 0x00, 0x53, 0x4c, 0x01, 0xc1, 0xf7, 0x48, 0x00, 0x01, 0xb5, 0x46, 0x00,
+0x00, 0x0b, 0x58, 0x00, 0x01, 0x5c, 0xa6, 0x00, 0x84, 0x88, 0x4c, 0x02, 0x00, 0x8b, 0xe6, 0x09,
+0xe8, 0x07, 0x84, 0xa1, 0xd0, 0x0f, 0x87, 0xc2, 0x4c, 0x0f, 0x41, 0xec, 0xd5, 0x76, 0x44, 0x10,
+0x00, 0x10, 0x4c, 0x00, 0x80, 0x89, 0x44, 0x20, 0x00, 0x12, 0x4c, 0x01, 0x41, 0xe3, 0x48, 0x00,
+0x00, 0xa3, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x00,
+0x58, 0x42, 0x02, 0x0c, 0xb4, 0x44, 0x84, 0x20, 0x58, 0x31, 0x00, 0x10, 0xb6, 0x64, 0x92, 0x00,
+0x84, 0x07, 0x9c, 0x49, 0x4c, 0x10, 0x7f, 0xfd, 0x44, 0x1f, 0xff, 0xef, 0x46, 0x00, 0x04, 0x00,
+0x40, 0x21, 0x04, 0x02, 0x58, 0x00, 0x02, 0x0c, 0xb6, 0x40, 0x47, 0xe0, 0x04, 0x00, 0x59, 0xef,
+0x02, 0x00, 0xb4, 0xbe, 0x54, 0x12, 0x80, 0x03, 0xc9, 0x12, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10,
+0x82, 0x04, 0x05, 0xe0, 0x80, 0x00, 0x46, 0x3f, 0xf0, 0xff, 0x58, 0x5f, 0x00, 0x01, 0xb6, 0xa1,
+0x58, 0x31, 0x8f, 0xff, 0xb4, 0x81, 0x40, 0x22, 0x0c, 0x02, 0xd5, 0x31, 0x84, 0x41, 0x4c, 0x11,
+0x40, 0x18, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x04, 0xb4, 0x41, 0x84, 0x9e, 0x41, 0xe1,
+0x10, 0x02, 0x15, 0xe0, 0x80, 0x00, 0x46, 0x3f, 0xf0, 0xff, 0xb4, 0xa1, 0x58, 0x31, 0x8f, 0xff,
+0x40, 0x42, 0x8c, 0x02, 0xb6, 0x81, 0x46, 0x30, 0x01, 0x00, 0xb4, 0x41, 0xd5, 0x16, 0x46, 0x10,
+0x04, 0x00, 0x58, 0x10, 0x82, 0x04, 0xb4, 0x81, 0x84, 0xbe, 0x40, 0x22, 0x14, 0x02, 0xb6, 0x41,
+0x46, 0x3f, 0xf0, 0xff, 0x05, 0xe0, 0x80, 0x00, 0x58, 0x31, 0x8f, 0xff, 0x40, 0x5f, 0x0c, 0x02,
+0xb6, 0xa1, 0x46, 0x30, 0x05, 0x00, 0xb4, 0x41, 0x40, 0x21, 0x0c, 0x04, 0xb6, 0x41, 0xb4, 0x20,
+0x58, 0x10, 0x83, 0x00, 0x48, 0x00, 0x00, 0xca, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xfc, 0xdd, 0x2f, 0x48, 0x00, 0x01, 0x6a,
+0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x04, 0x00, 0x05, 0xe0, 0x00, 0x00, 0x58, 0x1f, 0x0c, 0x00,
+0x48, 0x00, 0x00, 0xb4, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xec, 0xdd, 0x2f, 0xc8, 0x09,
+0x84, 0x61, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x6a, 0xae, 0xc0, 0x48, 0x00, 0x01, 0x52,
+0x46, 0x50, 0x00, 0x0a, 0x58, 0x52, 0x8e, 0xe4, 0xa7, 0x28, 0x46, 0x20, 0x04, 0x01, 0x58, 0x21,
+0x04, 0x00, 0xb6, 0x82, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xc0, 0xdd, 0x2f,
+0x48, 0x00, 0x01, 0x40, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f, 0x46, 0x40,
+0x04, 0x01, 0x58, 0x42, 0x06, 0x60, 0x84, 0xa0, 0xb6, 0xa4, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x81, 0x60, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x0b, 0x58, 0x10, 0x81, 0x6a, 0xae, 0x08, 0x46, 0x40,
+0x04, 0x00, 0x58, 0x42, 0x02, 0x04, 0xb4, 0x44, 0x44, 0x3f, 0x00, 0xff, 0x40, 0x01, 0x0c, 0x02,
+0x58, 0x50, 0x44, 0x00, 0xb6, 0xa4, 0x46, 0x0f, 0xf0, 0xff, 0xb4, 0x44, 0x58, 0x00, 0x0f, 0xff,
+0x58, 0x31, 0x00, 0x01, 0xb6, 0x64, 0x46, 0x10, 0x04, 0x00, 0xb4, 0xa4, 0x58, 0x10, 0x82, 0x0c,
+0x40, 0x22, 0x80, 0x02, 0xb6, 0x44, 0xb4, 0x61, 0x58, 0x01, 0x83, 0x00, 0xb6, 0x01, 0x48, 0x00,
+0x01, 0x09, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x47, 0xe0, 0x00, 0x0b, 0x59, 0xef,
+0x01, 0x5c, 0x46, 0x30, 0x04, 0x10, 0xb4, 0x20, 0x02, 0x2f, 0x00, 0x00, 0xd5, 0x22, 0x46, 0x00,
+0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x20, 0x04, 0x10, 0xb4, 0x20, 0xd5, 0x26, 0x46, 0x00,
+0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x30, 0x04, 0x10, 0xb4, 0x20, 0x46, 0x60, 0x00, 0x0b,
+0x58, 0x63, 0x01, 0x6a, 0x48, 0x00, 0x00, 0xab, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54,
+0x46, 0x20, 0x00, 0x0b, 0x58, 0x21, 0x01, 0x5c, 0x46, 0x30, 0x04, 0x00, 0xb4, 0x20, 0xa4, 0x90,
+0x98, 0x4b, 0xb6, 0x20, 0xac, 0x88, 0x48, 0x00, 0x00, 0xd5, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00,
+0x01, 0x54, 0x46, 0x20, 0x04, 0x00, 0xb4, 0x20, 0x98, 0xca, 0xb6, 0x60, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x81, 0xb8, 0xdd, 0x2f, 0x48, 0x00, 0x00, 0xbd, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00,
+0x01, 0x54, 0x46, 0x30, 0x04, 0x00, 0xb4, 0x20, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63, 0x01, 0x6a,
+0xd5, 0x7d, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0xb4, 0x80, 0x46, 0x00, 0x00, 0x0b,
+0x58, 0x00, 0x01, 0x58, 0x40, 0x12, 0x40, 0x08, 0xb6, 0x20, 0x48, 0x00, 0x00, 0xab, 0x46, 0x00,
+0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x47, 0xe0, 0x00, 0x0b, 0x59, 0xef, 0x01, 0x58, 0x46, 0x50,
+0x00, 0x0b, 0x58, 0x52, 0x81, 0x5c, 0xb4, 0x3e, 0xb4, 0x60, 0xa4, 0xa8, 0xd5, 0xc2, 0x46, 0x20,
+0x00, 0x0b, 0x58, 0x21, 0x01, 0x58, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0xb4, 0x22,
+0xb4, 0x40, 0xd5, 0xc3, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63, 0x01, 0x58, 0x46, 0x00, 0x00, 0x0b,
+0x58, 0x00, 0x01, 0x54, 0xb4, 0x26, 0xb4, 0x60, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63, 0x01, 0x6a,
+0x98, 0x4b, 0xd5, 0x45, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x40, 0x00, 0x0b,
+0x58, 0x42, 0x01, 0x5c, 0x46, 0x30, 0x04, 0x20, 0xb4, 0x20, 0xa4, 0xa0, 0xd5, 0x9a, 0x46, 0x00,
+0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x20, 0x04, 0x20, 0xb4, 0x20, 0xd5, 0x9e, 0x46, 0x00,
+0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x30, 0x04, 0x20, 0xb4, 0x20, 0x46, 0x60, 0x00, 0x0b,
+0x58, 0x63, 0x01, 0x6a, 0xd5, 0x23, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x50,
+0x00, 0x0b, 0x58, 0x52, 0x81, 0x5c, 0x46, 0x30, 0x05, 0x00, 0xb4, 0x20, 0xa4, 0xa8, 0x48, 0xff,
+0xff, 0x79, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x20, 0x05, 0x00, 0xb4, 0x20,
+0x48, 0xff, 0xff, 0x7c, 0x46, 0x00, 0x00, 0x0b, 0x58, 0x00, 0x01, 0x54, 0x46, 0x30, 0x05, 0x00,
+0xb4, 0x20, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63, 0x01, 0x6a, 0x98, 0x4b, 0xb6, 0x20, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x81, 0xec, 0xdd, 0x2f, 0xc8, 0x02, 0xd5, 0x1a, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x82, 0x18, 0xdd, 0x2f, 0xd5, 0x25, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x83, 0x10, 0xdd, 0x2f, 0xd5, 0x1c, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x81, 0xec, 0xdd, 0x2f, 0x46, 0x60, 0x00, 0x0b, 0x58, 0x63, 0x01, 0x6a, 0xc8, 0x03, 0x84, 0x01,
+0xd5, 0x10, 0x46, 0x20, 0x00, 0x0b, 0x58, 0x21, 0x01, 0x66, 0x01, 0xe1, 0x00, 0x00, 0x56, 0x0f,
+0x00, 0x0b, 0x5c, 0x00, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x82, 0x7c, 0xdd, 0x2f,
+0xae, 0x30, 0xd5, 0x07, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xa8, 0xdd, 0x2f, 0xd5, 0x06,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0xcc, 0xdd, 0x2f, 0x46, 0x10, 0x00, 0x0b, 0x58, 0x10,
+0x81, 0x6a, 0x20, 0x00, 0x80, 0x00, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x81, 0x84, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x00, 0x58, 0xf7,
+0x84, 0x48, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x10, 0x04, 0x62, 0x02, 0x01, 0x40, 0x53, 0x20, 0x08,
+0x92, 0xa8, 0x14, 0x52, 0x02, 0x01, 0x84, 0x0a, 0x46, 0x10, 0x00, 0x05, 0x58, 0x10, 0x8c, 0x60,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x08, 0xdd, 0x2f, 0x46, 0x30, 0x04, 0x00, 0xb4, 0x43,
+0x44, 0x50, 0x76, 0x10, 0x40, 0x01, 0x40, 0x09, 0xd8, 0x07, 0x04, 0x01, 0x80, 0x41, 0x43, 0xe0,
+0x50, 0x0b, 0x4f, 0xe2, 0x00, 0x0c, 0x84, 0x02, 0x46, 0x10, 0x00, 0x04, 0x58, 0x10, 0x8e, 0x74,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8c, 0x3c, 0xdd, 0x2f, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x0c, 0x3c, 0x84, 0x01, 0x46, 0x10, 0x00, 0x03, 0x58, 0x10, 0x82, 0x2c, 0x4b, 0xe0, 0x18, 0x01,
+0x84, 0x0c, 0x46, 0x10, 0x00, 0x03, 0x58, 0x10, 0x8e, 0xe0, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x10,
+0x00, 0x01, 0x58, 0x10, 0x87, 0xec, 0x84, 0x0f, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x00, 0x00, 0x0e,
+0x58, 0x00, 0x01, 0x78, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0xe4, 0xdd, 0x2f, 0x84, 0x20,
+0x80, 0x81, 0x46, 0x20, 0x00, 0x0a, 0x58, 0x21, 0x06, 0xe0, 0x44, 0x30, 0x08, 0x00, 0x46, 0x00,
+0x00, 0x05, 0x58, 0x00, 0x0a, 0x9c, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0x98, 0xdd, 0x2f,
+0x84, 0x00, 0x46, 0x10, 0x00, 0x0a, 0x58, 0x10, 0x85, 0x7c, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8b, 0x5c, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x00, 0x84, 0xa1, 0x14, 0x52, 0x00, 0x8c, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8a, 0x58, 0xdd, 0x2f, 0x84, 0x00, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0xf0, 0x00, 0x0b, 0x04, 0x07, 0x80, 0x48, 0xdd, 0x20,
+0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x46, 0x20, 0x00, 0x0b, 0x58, 0x21, 0x00, 0xf8,
+0x94, 0xc2, 0x98, 0x1a, 0xb6, 0x20, 0xdd, 0x9e, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00,
+0xdd, 0x9e, 0x92, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x01, 0x54,
+0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x81, 0x5c, 0xb6, 0x20, 0x48, 0xff, 0xd3, 0x07, 0xdd, 0x9e,
+0x64, 0x12, 0x00, 0x02, 0x96, 0x4c, 0x64, 0x02, 0x00, 0x43, 0x64, 0x00, 0x00, 0x08, 0xb6, 0x20,
+0xdd, 0x9e, 0x92, 0x00, 0x64, 0x12, 0x00, 0x02, 0x42, 0x10, 0x80, 0x09, 0x40, 0x10, 0x80, 0x04,
+0x64, 0x12, 0x00, 0x03, 0x64, 0x00, 0x00, 0x08, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x64, 0x12, 0x00, 0x43, 0x64, 0x00, 0x00, 0x08, 0x46, 0x60, 0x00, 0x0e, 0x58, 0x63, 0x01, 0x54,
+0x04, 0x03, 0x00, 0x0b, 0xc0, 0x02, 0xdd, 0x20, 0x04, 0x03, 0x00, 0x0c, 0xc0, 0x02, 0xdd, 0x20,
+0x04, 0x23, 0x00, 0x08, 0x44, 0x10, 0x03, 0x00, 0x54, 0x01, 0x03, 0x00, 0x4c, 0x00, 0xff, 0xf2,
+0x64, 0x00, 0x00, 0x00, 0xd5, 0xee, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x80, 0xc0,
+0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f, 0x46, 0xf0,
+0x00, 0x0e, 0x04, 0x37, 0x80, 0x5d, 0x40, 0x43, 0x18, 0x05, 0x40, 0x22, 0x0c, 0x02, 0xf0, 0x01,
+0x46, 0xf0, 0x00, 0x0e, 0x14, 0x27, 0x80, 0x5d, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84,
+0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0xef, 0xf8, 0x80, 0xc0, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70,
+0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0e, 0x04, 0x37, 0x80, 0x5d, 0xf0, 0x01, 0x40, 0x23, 0x0c, 0x04,
+0x46, 0xf0, 0x00, 0x0e, 0x14, 0x27, 0x80, 0x5d, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84,
+0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x80, 0xc1, 0x46, 0xf0, 0x00, 0x0e, 0x14, 0x07, 0x80, 0x60, 0x46, 0xf0, 0x00, 0x0e, 0x14, 0x67,
+0x80, 0x61, 0xc8, 0x08, 0x44, 0x00, 0x01, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0x1c,
+0xdd, 0x2f, 0xce, 0x08, 0x44, 0x00, 0x02, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0x1c,
+0xdd, 0x2f, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa8, 0xbc, 0x44, 0x50, 0x00, 0x14,
+0x46, 0x60, 0x00, 0x0e, 0x58, 0x63, 0x01, 0x5c, 0x42, 0x60, 0x94, 0x73, 0x80, 0xe0, 0x81, 0x43,
+0x50, 0x03, 0x00, 0x0c, 0xa8, 0x71, 0x84, 0x20, 0x81, 0x22, 0x81, 0x04, 0xa8, 0x72, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8b, 0xe4, 0xdd, 0x2f, 0x50, 0x35, 0x7f, 0xb8, 0x40, 0x24, 0x8c, 0x00,
+0x58, 0x44, 0x00, 0x08, 0x84, 0x0a, 0xb6, 0x46, 0xa9, 0xd1, 0xb6, 0x82, 0xa8, 0x12, 0x3a, 0x6f,
+0xa8, 0x84, 0xdd, 0x9e, 0xa8, 0x01, 0xb6, 0x00, 0xdd, 0x9e, 0x92, 0x00, 0xa0, 0x81, 0xb6, 0x01,
+0xa8, 0x89, 0xb6, 0x22, 0xa8, 0x41, 0xdd, 0x9e, 0xb4, 0x20, 0x4c, 0x10, 0x40, 0x04, 0x84, 0x20,
+0xd5, 0x07, 0xa0, 0xc9, 0xb4, 0x81, 0xb6, 0x83, 0xb4, 0x01, 0xa0, 0x89, 0xa8, 0x81, 0x80, 0x01,
+0xdd, 0x9e, 0x92, 0x00, 0x46, 0x20, 0x00, 0x0b, 0x04, 0x11, 0x00, 0x54, 0x98, 0x01, 0x14, 0x01,
+0x00, 0x54, 0x80, 0x01, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x10, 0x00, 0x0e, 0x58, 0x10, 0x81, 0x94,
+0x46, 0xf0, 0x00, 0x0b, 0x14, 0x17, 0x80, 0x54, 0xdd, 0x9e, 0x92, 0x00, 0x46, 0x50, 0x00, 0x0d,
+0x58, 0x52, 0x8d, 0x80, 0x38, 0x12, 0x82, 0x0a, 0x46, 0x10, 0x04, 0x00, 0x58, 0x10, 0x82, 0x00,
+0xa0, 0x8d, 0x84, 0x61, 0x40, 0x41, 0x80, 0x0c, 0x40, 0x02, 0x08, 0x04, 0xa8, 0x0d, 0xdd, 0x9e,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x46, 0x30, 0x04, 0x00, 0x58, 0x31, 0x82, 0x00, 0xa0, 0x5c,
+0x46, 0xf0, 0x00, 0x0d, 0x00, 0x07, 0x8e, 0x3a, 0xc0, 0x0e, 0x47, 0xe0, 0x04, 0x00, 0x46, 0x08,
+0x00, 0x00, 0x58, 0x00, 0x03, 0xe8, 0x84, 0xa1, 0x14, 0x0f, 0x00, 0x22, 0x46, 0xf0, 0x00, 0x0d,
+0x10, 0x57, 0x8e, 0x3b, 0x96, 0x08, 0x54, 0x20, 0x00, 0x08, 0xc2, 0x07, 0x46, 0xf0, 0x00, 0x0d,
+0x04, 0x07, 0x83, 0x63, 0x48, 0x00, 0x00, 0x84, 0x54, 0x30, 0x00, 0x10, 0xc3, 0x06, 0x46, 0xf0,
+0x00, 0x0d, 0x04, 0x07, 0x83, 0x64, 0xd5, 0x7b, 0x54, 0x50, 0x00, 0x20, 0xc5, 0x06, 0x46, 0xf0,
+0x00, 0x0d, 0x04, 0x07, 0x83, 0x65, 0xd5, 0x73, 0x54, 0x20, 0x00, 0x02, 0xc2, 0x06, 0x46, 0xf0,
+0x00, 0x0d, 0x04, 0x07, 0x83, 0x61, 0xd5, 0x6b, 0x96, 0xc4, 0xc3, 0x06, 0x46, 0xf0, 0x00, 0x0d,
+0x04, 0x07, 0x83, 0x60, 0xd5, 0x64, 0x54, 0x40, 0x00, 0x04, 0xc4, 0x06, 0x46, 0xf0, 0x00, 0x0d,
+0x04, 0x07, 0x83, 0x62, 0xd5, 0x5c, 0x40, 0x20, 0xa0, 0x09, 0x96, 0x10, 0x55, 0xe0, 0x00, 0x01,
+0x4f, 0xe2, 0x00, 0x07, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x68, 0xd5, 0x50, 0x54, 0x30,
+0x00, 0x02, 0xc3, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x69, 0xd5, 0x48, 0x54, 0x40,
+0x00, 0x04, 0xc4, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x6a, 0xd5, 0x40, 0x55, 0xe0,
+0x00, 0x08, 0x4f, 0xe2, 0x00, 0x07, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x6b, 0xd5, 0x37,
+0x54, 0x30, 0x00, 0x10, 0xc3, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x6c, 0xd5, 0x2f,
+0x54, 0x40, 0x00, 0x20, 0xc4, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x6d, 0xd5, 0x27,
+0x54, 0x50, 0x00, 0x40, 0xc5, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x6e, 0xd5, 0x1f,
+0x54, 0x20, 0x00, 0x80, 0xc2, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x6f, 0xd5, 0x17,
+0x40, 0x40, 0xc0, 0x09, 0x96, 0x60, 0x96, 0x0c, 0xc0, 0x02, 0xd5, 0x04, 0x54, 0x10, 0x80, 0x02,
+0xc1, 0x06, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x70, 0xd5, 0x09, 0x47, 0xe0, 0x04, 0x00,
+0x04, 0x3f, 0x00, 0x8d, 0x9c, 0x99, 0x14, 0x2f, 0x00, 0x8d, 0xd5, 0x02, 0xdd, 0x20, 0xec, 0x04,
+0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa8, 0x3c, 0xef, 0xf4, 0x46, 0x30,
+0x04, 0x10, 0x54, 0x80, 0x00, 0x0f, 0x58, 0x31, 0x85, 0x00, 0x40, 0x84, 0x38, 0x08, 0x84, 0x80,
+0x54, 0x70, 0x80, 0x3f, 0xb4, 0xa3, 0xf5, 0x81, 0x00, 0x5f, 0x80, 0x07, 0x54, 0x52, 0x80, 0x80,
+0x97, 0x68, 0xcd, 0x3c, 0xf5, 0x81, 0x00, 0x9f, 0x80, 0x07, 0x42, 0x94, 0x98, 0x09, 0x00, 0x6f,
+0x80, 0x05, 0x92, 0xc6, 0x95, 0xb6, 0x44, 0xaf, 0xff, 0x80, 0x40, 0x94, 0xa8, 0x04, 0x40, 0x63,
+0x1c, 0x04, 0x10, 0x9f, 0x80, 0x07, 0x10, 0x6f, 0x80, 0x05, 0x44, 0x9c, 0x3f, 0xff, 0xf6, 0x01,
+0x40, 0x63, 0x24, 0x02, 0x40, 0x63, 0x20, 0x04, 0xf6, 0x81, 0xb6, 0xc3, 0xb4, 0xc3, 0x9d, 0x69,
+0xf6, 0x81, 0x00, 0x6f, 0x80, 0x07, 0x54, 0x63, 0x00, 0x80, 0xc6, 0x05, 0x44, 0xa0, 0x00, 0x64,
+0x4c, 0x55, 0x7f, 0xf6, 0x00, 0x5f, 0x80, 0x07, 0x54, 0x52, 0x80, 0x80, 0xcd, 0x0f, 0x00, 0x5f,
+0x80, 0x05, 0x54, 0x52, 0x80, 0x3f, 0xd9, 0x0a, 0xf5, 0x01, 0x92, 0xae, 0x54, 0x52, 0x80, 0x0f,
+0xd8, 0x05, 0x00, 0x0f, 0x80, 0x04, 0xb6, 0x02, 0xd5, 0x05, 0x9d, 0x21, 0x44, 0x50, 0x00, 0x64,
+0xdc, 0xba, 0xf1, 0x01, 0x40, 0x00, 0xfc, 0x09, 0xec, 0x0c, 0x3a, 0x6f, 0xa8, 0x04, 0xdd, 0x9e,
+0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x46, 0x30, 0x04, 0x10, 0x84, 0x80, 0x05, 0xe1, 0x81, 0x40,
+0x9d, 0x21, 0x15, 0xef, 0x80, 0x01, 0x00, 0x6f, 0x80, 0x07, 0x54, 0x53, 0x00, 0x80, 0xc5, 0x04,
+0x44, 0x50, 0x00, 0x64, 0xdc, 0xf4, 0x00, 0x5f, 0x80, 0x07, 0x44, 0x3f, 0xff, 0xc0, 0x41, 0xe2,
+0x8c, 0x04, 0x11, 0xef, 0x80, 0x07, 0x54, 0x40, 0x00, 0x0f, 0xf3, 0x01, 0x44, 0x6c, 0x3f, 0xff,
+0x40, 0x52, 0x38, 0x08, 0x41, 0xe1, 0x98, 0x02, 0x40, 0x3f, 0x14, 0x04, 0xf3, 0x81, 0x01, 0xef,
+0x80, 0x05, 0x54, 0x40, 0x80, 0x3f, 0x40, 0x6f, 0x18, 0x09, 0x95, 0xb6, 0x40, 0x33, 0x10, 0x04,
+0x10, 0x2f, 0x80, 0x04, 0x10, 0x3f, 0x80, 0x05, 0x46, 0x20, 0x04, 0x10, 0xf6, 0x01, 0x14, 0x61,
+0x01, 0x40, 0x80, 0x5f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0x84, 0x01,
+0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0xef, 0xf8, 0x46, 0x00, 0x04, 0x11, 0x58, 0x00,
+0x00, 0x1c, 0x84, 0x60, 0xb4, 0x80, 0xf4, 0x81, 0x00, 0x5f, 0x80, 0x06, 0x54, 0x42, 0x80, 0x02,
+0x97, 0x20, 0xcc, 0x23, 0xf4, 0x81, 0x10, 0x1f, 0x80, 0x05, 0x00, 0x5f, 0x80, 0x06, 0x58, 0x52,
+0x80, 0x03, 0x10, 0x5f, 0x80, 0x06, 0xf5, 0x01, 0xb6, 0xa0, 0xb4, 0xa0, 0x9d, 0x21, 0xf5, 0x81,
+0x00, 0x5f, 0x80, 0x06, 0x54, 0x52, 0x80, 0x02, 0xc5, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdc, 0xf6,
+0x00, 0x5f, 0x80, 0x06, 0x54, 0x42, 0x80, 0x02, 0xcc, 0x08, 0x00, 0x5f, 0x80, 0x05, 0xd9, 0x05,
+0x00, 0x0f, 0x80, 0x04, 0xb6, 0x02, 0xd5, 0x05, 0x9c, 0xd9, 0x44, 0x50, 0x00, 0x64, 0xdb, 0xd3,
+0xf1, 0x01, 0x42, 0x00, 0xc4, 0x0b, 0xec, 0x08, 0xdd, 0x9e, 0x92, 0x00, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xf4, 0x46, 0x30, 0x04, 0x11, 0x84, 0x80, 0xa1, 0x5f, 0x9d, 0x21, 0xf5, 0x81, 0x01, 0xef,
+0x80, 0x06, 0x54, 0x5f, 0x00, 0x02, 0xc5, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdc, 0xf6, 0x84, 0xa0,
+0x84, 0x82, 0xf5, 0x81, 0x10, 0x2f, 0x80, 0x04, 0x10, 0x4f, 0x80, 0x06, 0x10, 0x1f, 0x80, 0x05,
+0x80, 0x43, 0xf3, 0x01, 0xa8, 0xd7, 0x80, 0x5f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8,
+0xdd, 0x2f, 0x84, 0x01, 0xec, 0x0c, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa8, 0xbc,
+0xef, 0xf8, 0x46, 0x10, 0x04, 0x10, 0x46, 0x00, 0x04, 0x10, 0x46, 0x20, 0x00, 0xff, 0x58, 0x10,
+0x85, 0x0c, 0x58, 0x00, 0x05, 0x04, 0x44, 0x40, 0xe0, 0x10, 0x58, 0x21, 0x0f, 0xf8, 0xb5, 0x21,
+0xb5, 0x00, 0xb6, 0x81, 0xb6, 0x40, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0d, 0xb8, 0x84, 0x21,
+0x50, 0x2f, 0x80, 0x04, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x64, 0x80, 0x43, 0x84, 0x05, 0x84, 0x21,
+0xb6, 0x7f, 0x81, 0x46, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x80, 0xdf,
+0xd5, 0x0a, 0x84, 0x00, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x01, 0xd8, 0xfd, 0x84, 0x05, 0x84, 0x21,
+0x80, 0x5f, 0xdd, 0x2a, 0xb4, 0xff, 0x54, 0x73, 0x80, 0x04, 0xcf, 0xf4, 0xf2, 0x01, 0x84, 0x21,
+0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x46, 0x30, 0x04, 0x10,
+0x46, 0x00, 0x04, 0x10, 0x58, 0x31, 0x85, 0x04, 0x58, 0x00, 0x05, 0x0c, 0xb6, 0xe3, 0xb7, 0x20,
+0xb7, 0x03, 0xec, 0x08, 0x3a, 0x6f, 0xa8, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x84, 0x21, 0x80, 0x40,
+0x44, 0x00, 0x02, 0x58, 0x40, 0x51, 0x00, 0x97, 0x9c, 0x49, 0x96, 0x48, 0x84, 0x6b, 0x98, 0x28,
+0x92, 0x01, 0x4c, 0x11, 0xff, 0xf9, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xf4, 0x46, 0x20,
+0x04, 0x11, 0x80, 0x80, 0x84, 0x60, 0x05, 0xe1, 0x00, 0x07, 0x9c, 0xd9, 0x15, 0xef, 0x80, 0x01,
+0x00, 0x5f, 0x80, 0x06, 0x54, 0x02, 0x80, 0x02, 0xc0, 0x04, 0x44, 0x50, 0x00, 0x64, 0xdb, 0xf4,
+0x84, 0x62, 0x84, 0x00, 0xf0, 0x81, 0x10, 0x3f, 0x80, 0x06, 0x10, 0x1f, 0x80, 0x04, 0x10, 0x4f,
+0x80, 0x05, 0xf1, 0x01, 0xa8, 0x57, 0x80, 0x24, 0x80, 0x5f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0x84, 0x01, 0xec, 0x0c, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xa4, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8d, 0xb8, 0x84, 0x22,
+0x50, 0x2f, 0x80, 0x50, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x1c, 0x50, 0x2f, 0x80, 0x4c,
+0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x1d, 0x50, 0x2f, 0x80, 0x48, 0x84, 0x04, 0xdd, 0x27,
+0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x44, 0x84, 0x04, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x11,
+0x50, 0x2f, 0x80, 0x40, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f, 0x80, 0x3c,
+0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x38, 0x84, 0x05, 0xdd, 0x27,
+0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x34, 0x84, 0x05, 0xdd, 0x27, 0x46, 0x00, 0x04, 0x10,
+0x58, 0x00, 0x00, 0x80, 0xb4, 0x80, 0x46, 0x10, 0x04, 0x10, 0xf4, 0x87, 0x58, 0x10, 0x84, 0x00,
+0xb4, 0x41, 0x46, 0xa0, 0x04, 0x11, 0xf2, 0x86, 0x58, 0xa5, 0x02, 0x04, 0xb4, 0x6a, 0x46, 0x90,
+0x04, 0x10, 0xf3, 0x85, 0x58, 0x94, 0x85, 0x0c, 0xb4, 0xa9, 0x46, 0x60, 0x04, 0x10, 0xf5, 0x84,
+0x58, 0x63, 0x05, 0x04, 0xb4, 0x86, 0x47, 0xcf, 0xf0, 0x00, 0x46, 0x80, 0x00, 0x80, 0x84, 0x43,
+0x59, 0xce, 0x00, 0x03, 0x58, 0x84, 0x0c, 0x00, 0xf4, 0x83, 0x15, 0xc0, 0x00, 0x00, 0xb7, 0x01,
+0xb6, 0x4a, 0x47, 0xc0, 0x00, 0x03, 0x59, 0xce, 0x0f, 0x74, 0x84, 0x01, 0xdd, 0x3c, 0x46, 0x50,
+0x18, 0xca, 0x44, 0x30, 0x00, 0x1f, 0x58, 0x52, 0x80, 0x0f, 0x84, 0x9f, 0x44, 0xa0, 0x00, 0x17,
+0xb7, 0x49, 0xb6, 0x66, 0xb6, 0xa9, 0xb6, 0x86, 0x44, 0x10, 0x00, 0x11, 0x50, 0x2f, 0x80, 0x30,
+0x84, 0x00, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f, 0x80, 0x2c, 0x84, 0x00, 0xdd, 0x27,
+0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x28, 0x84, 0x00, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x14,
+0x50, 0x2f, 0x80, 0x24, 0x84, 0x00, 0xdd, 0x27, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x20, 0x84, 0x00,
+0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x0e, 0x70, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20,
+0x00, 0x99, 0x84, 0x00, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0x99, 0x84, 0x00,
+0xdd, 0x28, 0x44, 0x10, 0x00, 0x13, 0x84, 0x49, 0x84, 0x00, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x14,
+0x44, 0x20, 0x00, 0x51, 0x84, 0x00, 0xdd, 0x28, 0x84, 0x24, 0x44, 0x20, 0x00, 0x8e, 0x84, 0x00,
+0xdd, 0x28, 0x84, 0x21, 0x80, 0x41, 0x84, 0x05, 0xdd, 0x28, 0x84, 0x01, 0xdd, 0x3c, 0x46, 0x06,
+0x00, 0x42, 0x58, 0x00, 0x00, 0x3f, 0xb6, 0x09, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x27,
+0x84, 0x04, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x28,
+0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xf1, 0x84, 0x05, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x13,
+0x44, 0x20, 0x00, 0xa1, 0x84, 0x05, 0xdd, 0x28, 0x84, 0x41, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05,
+0xdd, 0x28, 0x46, 0x10, 0x00, 0x82, 0x58, 0x10, 0x80, 0x3f, 0xb6, 0x29, 0x46, 0x60, 0x00, 0x06,
+0x58, 0x63, 0x00, 0x78, 0x80, 0x0a, 0x84, 0x24, 0xdd, 0x26, 0x84, 0x2a, 0x44, 0x00, 0x00, 0xf1,
+0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0xf2, 0xdd, 0x26, 0x84, 0x20, 0x84, 0x04, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x31, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x26, 0x46, 0x20, 0x04, 0x10, 0xf2, 0x82,
+0x84, 0x01, 0x84, 0x24, 0xdd, 0x26, 0xf3, 0x02, 0x85, 0x40, 0x58, 0x31, 0x80, 0x7c, 0xf3, 0x82,
+0x14, 0xaf, 0x80, 0x01, 0x83, 0x8a, 0x50, 0x9f, 0x80, 0x54, 0x05, 0xef, 0x80, 0x01, 0x54, 0x75,
+0x00, 0x07, 0x41, 0xe3, 0x9c, 0x1a, 0x54, 0x85, 0x00, 0xff, 0x15, 0xef, 0x80, 0x01, 0x41, 0xc3,
+0x9c, 0x1a, 0xe7, 0x08, 0xe8, 0x19, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2b, 0x84, 0x04, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf0, 0x15, 0x44, 0x10, 0x00, 0x2b, 0x54, 0x50,
+0x00, 0xf8, 0x40, 0x25, 0x14, 0x04, 0x84, 0x04, 0xf5, 0x95, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0x70, 0xdd, 0x2f, 0xd5, 0x19, 0x44, 0x10, 0x00, 0x11, 0x80, 0x49, 0x84, 0x04, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf2, 0x15, 0x94, 0x7b, 0x54, 0x31, 0x00, 0xc7,
+0x40, 0x20, 0x8c, 0x04, 0x84, 0x04, 0x44, 0x10, 0x00, 0x11, 0xf3, 0x95, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x84, 0x21, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x9b, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x84, 0x20, 0xd5, 0x0b, 0x92, 0x00, 0x84, 0x87,
+0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd, 0x9c, 0x49, 0x45, 0xe0, 0x01, 0x2c, 0x4c, 0x1f, 0x00, 0x04,
+0x84, 0x00, 0xd5, 0xf5, 0x84, 0x21, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x84, 0x20, 0xd5, 0x09,
+0x92, 0x00, 0x84, 0xa7, 0x9c, 0x01, 0xd8, 0xfd, 0x9c, 0x49, 0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04,
+0x84, 0x00, 0xd5, 0xf7, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xba,
+0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x10, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26,
+0xf3, 0x02, 0xb4, 0x23, 0x40, 0x00, 0xc0, 0x09, 0x4e, 0x14, 0x00, 0x05, 0x44, 0x2f, 0x00, 0x00,
+0x98, 0x02, 0x45, 0xe0, 0x80, 0x00, 0x40, 0x40, 0xf8, 0x02, 0x96, 0x49, 0xc4, 0x04, 0x44, 0x5f,
+0x00, 0x00, 0x98, 0x4d, 0x42, 0x00, 0x00, 0x24, 0x42, 0x00, 0x84, 0x73, 0xf1, 0x01, 0xe2, 0x20,
+0xe8, 0x04, 0xf0, 0x81, 0x55, 0xc4, 0x00, 0x07, 0x84, 0x07, 0x4c, 0x70, 0x40, 0x6a, 0x4c, 0x83,
+0xc0, 0x4b, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2b, 0x84, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8d, 0xb8, 0xdd, 0x2f, 0xf5, 0x15, 0x44, 0x10, 0x00, 0x2b, 0x54, 0x22, 0x80, 0xf8, 0x40, 0x4e,
+0x08, 0x04, 0x80, 0x44, 0x84, 0x04, 0xf4, 0x95, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70,
+0xdd, 0x2f, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2c, 0x84, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8d, 0xb8, 0xdd, 0x2f, 0xf3, 0x15, 0x44, 0x10, 0x00, 0x2c, 0x54, 0x01, 0x80, 0xf8, 0x40, 0x5e,
+0x00, 0x04, 0x80, 0x45, 0x84, 0x04, 0xf5, 0x95, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70,
+0xdd, 0x2f, 0x80, 0x49, 0x44, 0x10, 0x00, 0x2d, 0x84, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8d, 0xb8, 0xdd, 0x2f, 0xf4, 0x15, 0x44, 0x10, 0x00, 0x2d, 0x54, 0x22, 0x00, 0xf8, 0x40, 0x3e,
+0x08, 0x04, 0x80, 0x43, 0x84, 0x04, 0xf3, 0x95, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70,
+0xdd, 0x2f, 0xd5, 0x1e, 0x87, 0xcf, 0x4c, 0x8f, 0x40, 0x1c, 0x44, 0x10, 0x00, 0x11, 0x80, 0x49,
+0x84, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf4, 0x15, 0x40, 0x1e,
+0x0c, 0x08, 0x54, 0x02, 0x00, 0xc7, 0x40, 0x30, 0x80, 0x04, 0x80, 0x43, 0x84, 0x04, 0x44, 0x10,
+0x00, 0x11, 0xf3, 0x95, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x8d, 0x41,
+0x44, 0x20, 0x00, 0x10, 0x4c, 0xa1, 0x7e, 0xfb, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78,
+0x84, 0x20, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0x84, 0x20, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x26,
+0x84, 0x00, 0xd5, 0x09, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x49, 0xd9, 0xfd, 0x9c, 0x01, 0x87, 0xca,
+0x4c, 0x0f, 0x00, 0x04, 0x84, 0x20, 0xd5, 0xf7, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf2, 0x0c, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x0e, 0x70, 0x44, 0x10, 0x00, 0x11, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x0b, 0x44, 0x10, 0x00, 0x12,
+0x84, 0x00, 0xdd, 0x26, 0xf2, 0x0a, 0x44, 0x10, 0x00, 0x13, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x09,
+0x44, 0x10, 0x00, 0x14, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x08, 0x84, 0x24, 0x84, 0x00, 0xdd, 0x26,
+0xf2, 0x11, 0x44, 0x10, 0x00, 0x13, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x10, 0x44, 0x10, 0x00, 0x11,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0f, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0e,
+0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0d, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05,
+0xdd, 0x26, 0xf5, 0x07, 0x46, 0x40, 0x04, 0x10, 0x58, 0x42, 0x00, 0x80, 0xb6, 0xa4, 0x46, 0x30,
+0x04, 0x10, 0xf4, 0x06, 0x58, 0x31, 0x84, 0x00, 0xb6, 0x83, 0x46, 0x20, 0x04, 0x11, 0xf5, 0x05,
+0x58, 0x21, 0x02, 0x04, 0xb6, 0xa2, 0x46, 0x10, 0x04, 0x10, 0xf4, 0x03, 0x58, 0x10, 0x85, 0x04,
+0xb6, 0x81, 0x46, 0x00, 0x04, 0x10, 0xf3, 0x04, 0x58, 0x00, 0x05, 0x0c, 0xb6, 0x60, 0xec, 0x5c,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xc4, 0x46, 0x40,
+0x04, 0x11, 0x58, 0x42, 0x00, 0x04, 0xb4, 0xa4, 0x84, 0xc0, 0xf5, 0x81, 0x46, 0x20, 0x04, 0x10,
+0xb6, 0xc4, 0x44, 0x30, 0x18, 0x30, 0x58, 0x21, 0x05, 0x04, 0x05, 0xc1, 0x00, 0x00, 0x46, 0x00,
+0x04, 0x10, 0xb6, 0x62, 0x58, 0x00, 0x05, 0x0c, 0x44, 0x10, 0x20, 0x00, 0xb5, 0x40, 0xb6, 0x20,
+0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x0d, 0xb8, 0x50, 0x2f, 0x80, 0x34, 0x84, 0x24, 0x84, 0x05,
+0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0x70, 0xdd, 0x28, 0x84, 0x24, 0x44, 0x20, 0x00, 0x27,
+0x84, 0x05, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x30, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x28,
+0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x2c,
+0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0x83,
+0x84, 0x05, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x28, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x28,
+0x50, 0x2f, 0x80, 0x24, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x28, 0x80, 0x46, 0x44, 0x10,
+0x00, 0x13, 0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x14, 0x44, 0x20, 0x00, 0x20, 0x84, 0x05,
+0xdd, 0x27, 0x50, 0x2f, 0x80, 0x20, 0x80, 0x06, 0x84, 0x21, 0xdd, 0x28, 0x80, 0x46, 0x80, 0x06,
+0x84, 0x21, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x1c, 0x80, 0x06, 0x44, 0x10, 0x00, 0x22, 0xdd, 0x28,
+0x80, 0x06, 0x44, 0x10, 0x00, 0x22, 0x44, 0x20, 0x00, 0x13, 0xdd, 0x27, 0x50, 0x2f, 0x80, 0x18,
+0x80, 0x06, 0x44, 0x10, 0x00, 0x23, 0xdd, 0x28, 0x80, 0x46, 0x80, 0x06, 0x44, 0x10, 0x00, 0x23,
+0xdd, 0x27, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x8e, 0xf8, 0x50, 0x2f, 0x80, 0x14, 0x44, 0x10,
+0x00, 0x2f, 0x80, 0x06, 0x4b, 0xe0, 0x24, 0x01, 0x46, 0x80, 0x00, 0x06, 0x58, 0x84, 0x00, 0x78,
+0x84, 0x24, 0x44, 0x00, 0x00, 0x2f, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x16,
+0xdd, 0x28, 0x84, 0x01, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x74, 0xdd, 0x2f, 0x50, 0x2f,
+0x80, 0x10, 0x80, 0x06, 0x44, 0x10, 0x00, 0x31, 0x4b, 0xe0, 0x24, 0x01, 0x80, 0x26, 0x44, 0x00,
+0x00, 0x16, 0x04, 0x9f, 0x80, 0x04, 0xdd, 0x28, 0x80, 0x06, 0x44, 0x10, 0x00, 0x23, 0x84, 0x41,
+0xdd, 0x27, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x16, 0xdd, 0x28, 0xd5, 0x0b, 0x92, 0x00,
+0x87, 0xc7, 0x9c, 0x49, 0x4c, 0x1f, 0x7f, 0xfd, 0x9d, 0xb1, 0x44, 0x70, 0x00, 0x3c, 0x4c, 0x63,
+0x80, 0x04, 0x84, 0x20, 0xd5, 0xf5, 0x44, 0x10, 0x00, 0x31, 0x50, 0x2f, 0x80, 0x10, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x20, 0x7f, 0x80, 0x10, 0x40, 0x54,
+0x80, 0x10, 0x9a, 0xfd, 0x44, 0x40, 0x03, 0xe8, 0x42, 0x01, 0x90, 0x24, 0x44, 0x20, 0x00, 0x2b,
+0x40, 0x00, 0x08, 0x36, 0x84, 0x2a, 0x40, 0x20, 0x04, 0xd6, 0xe4, 0xc5, 0xe9, 0x02, 0x8c, 0x0a,
+0x87, 0xca, 0x40, 0x20, 0x78, 0x16, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0x84, 0x27,
+0x84, 0x00, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x16, 0xdd, 0x27, 0x84, 0x21, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x27, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x15, 0xdd, 0x27, 0xf2, 0x0d, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0c, 0x44, 0x10,
+0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x0b, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x0a, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x09, 0x44, 0x10, 0x00, 0x14,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x08, 0x84, 0x21, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x07, 0x44, 0x10,
+0x00, 0x22, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x06, 0x44, 0x10, 0x00, 0x23, 0x84, 0x00, 0xdd, 0x26,
+0xf1, 0x05, 0x44, 0x00, 0x00, 0x2f, 0xdd, 0x27, 0xf3, 0x01, 0x46, 0x20, 0x04, 0x11, 0x46, 0x10,
+0x04, 0x10, 0x46, 0x00, 0x04, 0x10, 0x58, 0x21, 0x00, 0x04, 0x58, 0x10, 0x85, 0x04, 0x58, 0x00,
+0x05, 0x0c, 0xb6, 0x62, 0x15, 0xc0, 0x80, 0x00, 0xb7, 0x40, 0x84, 0x27, 0x50, 0x2f, 0x80, 0x0c,
+0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xec, 0x3c, 0x3a, 0x6f,
+0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc, 0xef, 0xf8, 0x84, 0x21, 0x96, 0x00, 0x50, 0x2f,
+0x80, 0x04, 0x46, 0x30, 0x00, 0x05, 0x58, 0x31, 0x8d, 0xb8, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x0e, 0x70, 0x4c, 0x00, 0xc0, 0x10, 0x84, 0x23, 0x84, 0x05, 0x4b, 0xe0, 0x0c, 0x01, 0xf2, 0x01,
+0x40, 0x31, 0x14, 0x09, 0x94, 0xdd, 0x58, 0x31, 0x80, 0x11, 0x84, 0x23, 0x80, 0x43, 0x84, 0x05,
+0xd5, 0x0e, 0x84, 0x23, 0x84, 0x05, 0x4b, 0xe0, 0x0c, 0x01, 0xf7, 0x01, 0x40, 0x53, 0x94, 0x09,
+0x95, 0x6d, 0x58, 0x32, 0x80, 0x08, 0x84, 0x05, 0x80, 0x43, 0x84, 0x23, 0xf3, 0x81, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x8e, 0xf8, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x5f, 0x44, 0x10, 0x00, 0x2f,
+0x84, 0x00, 0x4b, 0xe0, 0x1c, 0x01, 0xb4, 0x5f, 0x44, 0x0f, 0xff, 0x9f, 0x40, 0x31, 0x00, 0x02,
+0x58, 0x51, 0x80, 0x40, 0xb6, 0xbf, 0x80, 0x25, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78,
+0x44, 0x00, 0x00, 0x2f, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x20, 0x44, 0x00, 0x00, 0x3a, 0x4b, 0xe0,
+0x18, 0x01, 0x80, 0x5f, 0x44, 0x10, 0x00, 0x2f, 0x84, 0x00, 0x4b, 0xe0, 0x1c, 0x01, 0xb4, 0x9f,
+0x40, 0x22, 0x1c, 0x09, 0x94, 0x97, 0x58, 0x31, 0x00, 0x50, 0xb6, 0x7f, 0x80, 0x23, 0x44, 0x00,
+0x00, 0x2f, 0x81, 0x1f, 0x4b, 0xe0, 0x18, 0x01, 0xec, 0x08, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x84, 0x80, 0x84, 0x24, 0x40, 0x2f, 0x84, 0x00, 0x97, 0x80,
+0x80, 0x04, 0xf4, 0x81, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf0, 0x01,
+0x44, 0x3f, 0xff, 0xe7, 0x84, 0x41, 0x40, 0x10, 0x0c, 0x02, 0x4c, 0x61, 0x00, 0x06, 0xc6, 0x09,
+0x84, 0xa3, 0xde, 0x07, 0xd5, 0x04, 0x58, 0x10, 0x80, 0x10, 0xd5, 0x03, 0x58, 0x10, 0x80, 0x08,
+0x4c, 0x10, 0x00, 0x08, 0x84, 0x04, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x84, 0x01, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xec, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x10, 0x00, 0x10, 0x81, 0x20,
+0x84, 0x04, 0xdd, 0x26, 0x44, 0x00, 0x00, 0xba, 0x84, 0x21, 0xdd, 0x26, 0x84, 0xe0, 0x80, 0x66,
+0x50, 0xaf, 0x80, 0x0c, 0x84, 0xc3, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce, 0x0e, 0xf8, 0xf3, 0x81,
+0x80, 0x26, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x23, 0x44, 0x10, 0x00, 0xbc, 0x84, 0x00, 0x80, 0x4a,
+0xdd, 0x3c, 0xf1, 0x03, 0x9d, 0xb4, 0x44, 0x50, 0x00, 0x2f, 0x99, 0xf9, 0x46, 0x80, 0x00, 0x06,
+0x58, 0x84, 0x00, 0x78, 0xf3, 0x01, 0xde, 0xec, 0x9e, 0x6c, 0x44, 0x00, 0x00, 0xbb, 0x4b, 0xe0,
+0x20, 0x01, 0x80, 0x4a, 0x44, 0x10, 0x00, 0xbc, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0xf6, 0x03, 0x84, 0x20, 0x84, 0x04, 0x4b, 0xe0, 0x20, 0x01, 0x44, 0x50,
+0x00, 0x37, 0x42, 0x33, 0x14, 0x24, 0x84, 0x96, 0x40, 0x21, 0x90, 0x36, 0x99, 0xfa, 0xe1, 0x27,
+0xe8, 0x03, 0x84, 0x00, 0xd5, 0x05, 0x5e, 0x73, 0xff, 0xf6, 0x56, 0x03, 0x80, 0x01, 0xec, 0x14,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x2c, 0x46, 0x40,
+0x00, 0x0a, 0x58, 0x42, 0x0f, 0xa8, 0xf0, 0x81, 0x3a, 0x02, 0x0c, 0x04, 0x50, 0x8f, 0x80, 0x80,
+0x84, 0xc0, 0x47, 0xc0, 0x04, 0x11, 0x3a, 0x04, 0x0c, 0x24, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73,
+0x80, 0x78, 0x80, 0x26, 0x44, 0x00, 0x00, 0xba, 0xb4, 0x64, 0x40, 0x91, 0xc0, 0x09, 0x12, 0x34,
+0x00, 0x00, 0x10, 0x9f, 0x80, 0x92, 0xf6, 0xb2, 0x81, 0x5c, 0x05, 0xee, 0x00, 0x01, 0x15, 0xef,
+0x80, 0x0f, 0x50, 0x8f, 0x80, 0xcc, 0xdd, 0x27, 0x80, 0x26, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x27,
+0x80, 0x26, 0x44, 0x00, 0x00, 0xbc, 0xdd, 0x27, 0x04, 0x55, 0x00, 0xca, 0x80, 0x26, 0xf5, 0x8e,
+0x44, 0x00, 0x00, 0x1b, 0xdd, 0x27, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x8e, 0xf8, 0x80, 0x48,
+0x44, 0x10, 0x00, 0x41, 0x80, 0x06, 0xdd, 0x29, 0xf4, 0x33, 0x80, 0x48, 0xf4, 0x8d, 0x44, 0x10,
+0x00, 0x42, 0x80, 0x06, 0xdd, 0x29, 0xf3, 0x33, 0x44, 0x10, 0x00, 0x8c, 0xf3, 0x8c, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x27, 0x80, 0x48, 0x44, 0x10, 0x00, 0x9f, 0x80, 0x06, 0xdd, 0x29, 0xf2, 0x33,
+0x84, 0x23, 0xf2, 0x8b, 0x44, 0x00, 0x00, 0x9e, 0x47, 0xc0, 0x04, 0x10, 0xdd, 0x27, 0x80, 0x48,
+0x44, 0x10, 0x00, 0x9f, 0x80, 0x06, 0xdd, 0x29, 0x04, 0xae, 0x01, 0x41, 0x46, 0x90, 0x04, 0x10,
+0x14, 0xaf, 0x80, 0x0a, 0x04, 0x84, 0x81, 0x43, 0x46, 0x58, 0x1f, 0xff, 0x58, 0x52, 0x8e, 0x7f,
+0x46, 0x30, 0xa0, 0x00, 0x46, 0x00, 0x80, 0x00, 0x40, 0x74, 0x14, 0x02, 0xf4, 0x33, 0x40, 0x13,
+0x8c, 0x04, 0x40, 0x23, 0x80, 0x04, 0x14, 0x8f, 0x80, 0x06, 0xf6, 0x83, 0xf7, 0x84, 0xf4, 0x89,
+0xf6, 0x85, 0xf6, 0x82, 0xf1, 0x87, 0xf2, 0x88, 0x44, 0x00, 0x00, 0x9f, 0x44, 0x10, 0x00, 0x60,
+0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x46, 0x50, 0x04, 0x10, 0x04, 0xa2,
+0x81, 0x41, 0x47, 0xc0, 0x00, 0xc0, 0x59, 0xce, 0x00, 0x80, 0x40, 0x65, 0x70, 0x04, 0x14, 0x62,
+0x81, 0x41, 0xf0, 0x02, 0xc8, 0x13, 0x05, 0xef, 0x80, 0x01, 0x5e, 0xff, 0x01, 0x5f, 0xe9, 0x03,
+0xf3, 0x07, 0xd5, 0x1d, 0x04, 0x9f, 0x80, 0x01, 0x5e, 0xf4, 0xff, 0x06, 0xe8, 0x05, 0xf2, 0x04,
+0x42, 0x31, 0x68, 0x08, 0xd5, 0x14, 0xf3, 0x08, 0xd5, 0x12, 0xf3, 0x01, 0x5e, 0xf1, 0x81, 0x5f,
+0xe9, 0x07, 0xf4, 0x04, 0x46, 0x80, 0xc0, 0x00, 0x40, 0x32, 0x20, 0x04, 0xd5, 0x08, 0xf0, 0x01,
+0xf3, 0x08, 0xf7, 0x07, 0x5e, 0x10, 0x7f, 0x06, 0x40, 0x33, 0x84, 0x1a, 0x80, 0x85, 0x46, 0x20,
+0x04, 0x11, 0x51, 0xee, 0x7f, 0xa0, 0x14, 0x32, 0x01, 0x43, 0x15, 0xe1, 0x00, 0xca, 0x46, 0x90,
+0x00, 0x05, 0x58, 0x94, 0x8d, 0xb8, 0x84, 0x21, 0x50, 0x2f, 0x80, 0xc4, 0x84, 0x05, 0xdd, 0x29,
+0x84, 0x21, 0x50, 0x2f, 0x80, 0xc0, 0x84, 0x00, 0xdd, 0x29, 0x84, 0x20, 0x50, 0x2f, 0x80, 0xbc,
+0x84, 0x04, 0xdd, 0x29, 0x84, 0x2b, 0x50, 0x2f, 0x80, 0xb8, 0x84, 0x04, 0xdd, 0x29, 0x84, 0x2d,
+0x50, 0x2f, 0x80, 0xb4, 0x84, 0x04, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0xb0,
+0x84, 0x04, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0xac, 0x84, 0x04, 0xdd, 0x29,
+0x44, 0x10, 0x00, 0x16, 0x50, 0x2f, 0x80, 0xa8, 0x84, 0x04, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x11,
+0x50, 0x2f, 0x80, 0xa4, 0x84, 0x05, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f, 0x80, 0xa0,
+0x84, 0x05, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x9c, 0x84, 0x05, 0xdd, 0x29,
+0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x98, 0x84, 0x05, 0xdd, 0x29, 0x84, 0x21, 0x47, 0xc0,
+0x00, 0x05, 0x59, 0xce, 0x0e, 0x70, 0x80, 0x41, 0x84, 0x05, 0xdd, 0x3c, 0x84, 0x21, 0x44, 0x20,
+0x00, 0xe1, 0x84, 0x00, 0xdd, 0x3c, 0x84, 0x20, 0x44, 0x20, 0x00, 0x83, 0x84, 0x04, 0xdd, 0x3c,
+0x84, 0x2b, 0x44, 0x20, 0x00, 0x51, 0x84, 0x04, 0xdd, 0x3c, 0x84, 0x2d, 0x44, 0x20, 0x00, 0x3c,
+0x84, 0x04, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x24, 0x84, 0x04, 0xdd, 0x3c,
+0x44, 0x10, 0x00, 0x15, 0x9e, 0x8b, 0x84, 0x04, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x16, 0x44, 0x20,
+0x00, 0xa1, 0x84, 0x04, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xf1, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10,
+0x00, 0x13, 0x44, 0x20, 0x00, 0xa1, 0x84, 0x05, 0xdd, 0x3c, 0x84, 0x41, 0x44, 0x10, 0x00, 0x14,
+0x84, 0x05, 0xdd, 0x3c, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x10, 0x00, 0x10,
+0x9c, 0x0f, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x6d, 0xdd, 0x26, 0x46, 0xa0, 0x04, 0x11,
+0x84, 0x20, 0x44, 0x00, 0x00, 0x6e, 0xdd, 0x26, 0x84, 0xa8, 0x14, 0x55, 0x00, 0x01, 0x44, 0x10,
+0x00, 0x8c, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x40, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x1b, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x39, 0x44, 0x00,
+0x00, 0x41, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0x8c, 0xdd, 0x26, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x8e, 0xf8, 0x84, 0xc0, 0x84, 0x00, 0x44, 0x10, 0x00, 0x8c, 0x50, 0x2f,
+0x80, 0xcc, 0x4b, 0xe0, 0x1c, 0x01, 0xf3, 0x33, 0x9d, 0xb1, 0xc3, 0x05, 0x44, 0x80, 0x00, 0x64,
+0x4c, 0x64, 0x7f, 0xf4, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x84, 0x20, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x22, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x84, 0x2a, 0x44, 0x00,
+0x00, 0xbc, 0xdd, 0x26, 0x84, 0x23, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x41,
+0x44, 0x00, 0x00, 0xbc, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00, 0x00, 0xf1, 0xdd, 0x26, 0x84, 0x20,
+0x44, 0x00, 0x00, 0xf2, 0xdd, 0x26, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0xf8, 0x84, 0x00,
+0x84, 0x24, 0x50, 0x2f, 0x80, 0xc8, 0x4b, 0xe0, 0x1c, 0x01, 0x81, 0x06, 0x85, 0x40, 0x85, 0x25,
+0x87, 0x88, 0x50, 0x7f, 0x80, 0x94, 0x84, 0x20, 0x44, 0x00, 0x00, 0x1b, 0xdd, 0x28, 0x50, 0x5f,
+0x80, 0x80, 0x38, 0x12, 0xa4, 0x00, 0x44, 0x00, 0x00, 0x42, 0xdd, 0x28, 0xf1, 0x32, 0x54, 0x00,
+0x80, 0x10, 0xc8, 0x05, 0x58, 0x10, 0x80, 0x10, 0x84, 0x04, 0xdd, 0x28, 0x44, 0x10, 0x00, 0x11,
+0x44, 0x00, 0x00, 0xf4, 0xdd, 0x28, 0x84, 0x21, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x28, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x15, 0xdd, 0x28, 0x84, 0x20, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x28, 0x84, 0x21,
+0x44, 0x00, 0x00, 0xbb, 0xdd, 0x28, 0xf1, 0x02, 0xc9, 0x06, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00,
+0x00, 0xbc, 0xd5, 0x05, 0x44, 0x00, 0x00, 0xbc, 0x44, 0x10, 0x00, 0x81, 0xdd, 0x28, 0x84, 0x01,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x8f, 0x74, 0xdd, 0x2f, 0x84, 0xc0, 0x50, 0x2f, 0x80, 0xcc,
+0x84, 0x00, 0x44, 0x10, 0x00, 0xbc, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f,
+0xf4, 0x33, 0x9d, 0xb1, 0x54, 0x22, 0x00, 0x80, 0xc2, 0x04, 0x44, 0x50, 0x00, 0x64, 0xde, 0xef,
+0xf1, 0x32, 0x84, 0x04, 0xdd, 0x28, 0x84, 0x20, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x28, 0x84, 0x21,
+0x44, 0x00, 0x00, 0x15, 0xdd, 0x28, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0xdd, 0x28, 0x84, 0x21,
+0x44, 0x00, 0x00, 0xba, 0xdd, 0x28, 0x44, 0x10, 0x00, 0xff, 0x44, 0x00, 0x00, 0xbb, 0xdd, 0x28,
+0x44, 0x10, 0x00, 0xbc, 0x84, 0x00, 0x80, 0x47, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8,
+0xdd, 0x2f, 0xf1, 0x25, 0x5c, 0xf0, 0x80, 0xb4, 0xe8, 0x05, 0x8d, 0x21, 0xe5, 0x33, 0xe9, 0x8c,
+0xd5, 0x1f, 0x5c, 0xf0, 0x80, 0xf6, 0xe9, 0x05, 0x8f, 0x21, 0x4e, 0x94, 0xff, 0x86, 0xd5, 0x18,
+0x84, 0x05, 0x40, 0x25, 0x00, 0xd6, 0x84, 0xa4, 0xde, 0x03, 0x51, 0xce, 0x00, 0x0a, 0x84, 0xa5,
+0x4c, 0xa2, 0x80, 0x0f, 0x80, 0x1c, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x89, 0x8c, 0xdd, 0x2f,
+0x84, 0xa1, 0xd8, 0x03, 0x85, 0x00, 0xd5, 0x05, 0x8d, 0x41, 0x48, 0xff, 0xff, 0x6e, 0x85, 0x01,
+0xf3, 0x32, 0x54, 0x71, 0x80, 0x10, 0xcf, 0x09, 0x58, 0x11, 0x80, 0x10, 0x84, 0x04, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78,
+0x84, 0x24, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26,
+0x84, 0x2f, 0x44, 0x00, 0x00, 0xbd, 0xdd, 0x26, 0x84, 0x25, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26,
+0x84, 0x25, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x2f, 0x44, 0x00, 0x00, 0xbd, 0xdd, 0x26,
+0x84, 0x26, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x26, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26,
+0x84, 0x2f, 0x44, 0x00, 0x00, 0xbd, 0xdd, 0x26, 0x84, 0x27, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26,
+0x84, 0x27, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x44, 0x00, 0x00, 0xbd, 0x84, 0x2f, 0xdd, 0x26,
+0xf2, 0x02, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0xf8, 0xca, 0x30, 0x84, 0x22, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x84, 0x22, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0xf0, 0x02, 0x50, 0x2f,
+0x80, 0xcc, 0x44, 0x10, 0x00, 0xbd, 0x4b, 0xe0, 0x1c, 0x01, 0xf3, 0x33, 0xf4, 0x01, 0x40, 0x21,
+0x98, 0x09, 0x94, 0x96, 0x5e, 0xf2, 0x01, 0x5f, 0xe9, 0x04, 0x58, 0x21, 0x00, 0x14, 0xd5, 0x0b,
+0x05, 0xef, 0x80, 0x01, 0x5e, 0xff, 0x7f, 0x06, 0xe8, 0x04, 0x58, 0x21, 0x00, 0x08, 0xd5, 0x03,
+0x58, 0x21, 0x00, 0x10, 0xf2, 0xb3, 0x84, 0x22, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78,
+0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x22, 0xd5, 0x2e, 0x84, 0x23, 0x44, 0x00, 0x00, 0xba,
+0xdd, 0x26, 0x84, 0x23, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x44, 0x10, 0x00, 0xbd, 0x50, 0x2f,
+0x80, 0xcc, 0x84, 0x00, 0x4b, 0xe0, 0x1c, 0x01, 0xf5, 0x33, 0xf0, 0x01, 0x40, 0x22, 0x98, 0x09,
+0x94, 0x96, 0x5e, 0xf0, 0x01, 0x5f, 0xe9, 0x04, 0x58, 0x21, 0x00, 0x18, 0xd5, 0x0a, 0xf7, 0x01,
+0x5e, 0xf3, 0xff, 0x06, 0xe8, 0x04, 0x58, 0x21, 0x00, 0x10, 0xd5, 0x03, 0x58, 0x21, 0x00, 0x14,
+0xf2, 0xb3, 0x84, 0x23, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x00, 0x00, 0xba,
+0xdd, 0x26, 0x84, 0x23, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0xf1, 0x33, 0x44, 0x00, 0x00, 0xbd,
+0xdd, 0x26, 0x84, 0xa1, 0x4c, 0x82, 0xc0, 0x27, 0xf4, 0x02, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63,
+0x00, 0x78, 0xcc, 0x11, 0x84, 0x22, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x22, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x44, 0x00, 0x00, 0xbd, 0x84, 0x2f, 0xdd, 0x26, 0x14, 0x8f, 0x80, 0x05,
+0x48, 0x00, 0x00, 0x90, 0x84, 0x23, 0x44, 0x00, 0x00, 0xba, 0xdd, 0x26, 0x84, 0x23, 0x44, 0x00,
+0x00, 0xba, 0xdd, 0x26, 0x44, 0x00, 0x00, 0xbd, 0x84, 0x2f, 0xdd, 0x26, 0x14, 0x8f, 0x80, 0x03,
+0xd5, 0x03, 0xf3, 0x02, 0xc3, 0x7e, 0xf7, 0x05, 0x84, 0xa1, 0xdf, 0x03, 0xf5, 0x03, 0xd7, 0x79,
+0x46, 0xa0, 0x00, 0x0a, 0x58, 0xa5, 0x0f, 0x68, 0x81, 0x0a, 0x3a, 0x04, 0x0c, 0x04, 0x50, 0x9f,
+0x80, 0x40, 0x85, 0x40, 0x47, 0xc0, 0x00, 0x06, 0x59, 0xce, 0x00, 0x78, 0x3a, 0x04, 0x8c, 0x24,
+0x3a, 0x04, 0x0c, 0x04, 0x3a, 0x04, 0x8c, 0x24, 0x3a, 0x04, 0x0c, 0x04, 0x3a, 0x04, 0x8c, 0x24,
+0x3a, 0x04, 0x0c, 0x00, 0x3a, 0x04, 0x8c, 0x20, 0x44, 0x00, 0x00, 0xba, 0x50, 0x15, 0x00, 0x02,
+0xdd, 0x3c, 0x50, 0x7f, 0x80, 0x40, 0x84, 0xc3, 0x85, 0x0a, 0x80, 0x26, 0x44, 0x00, 0x00, 0xbb,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0xbc, 0x50, 0x2f, 0x80, 0xcc, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf0, 0x33, 0x50, 0x00, 0x7f, 0x80, 0x4e, 0x06, 0x00, 0x05,
+0x44, 0x10, 0x00, 0x80, 0xd5, 0x08, 0xa6, 0xb8, 0x42, 0x10, 0x08, 0x24, 0x40, 0x40, 0xa0, 0x56,
+0x50, 0x12, 0x00, 0x80, 0x44, 0x00, 0x00, 0xbc, 0xdd, 0x3c, 0x9d, 0xb4, 0x44, 0x50, 0x01, 0x03,
+0x9d, 0xf9, 0x46, 0x90, 0x00, 0x06, 0x58, 0x94, 0x80, 0x78, 0xde, 0xd8, 0x8d, 0x41, 0x84, 0xa2,
+0x4c, 0xa2, 0xff, 0xcc, 0x84, 0x20, 0x44, 0x00, 0x00, 0xba, 0x4b, 0xe0, 0x24, 0x01, 0x44, 0x00,
+0x00, 0xbb, 0x84, 0x24, 0x4b, 0xe0, 0x24, 0x01, 0xf6, 0x01, 0x5e, 0xf3, 0x7f, 0x06, 0xe8, 0x05,
+0x84, 0x2e, 0x44, 0x00, 0x00, 0xbc, 0xd5, 0x05, 0x44, 0x00, 0x00, 0xbc, 0x44, 0x10, 0x00, 0x1c,
+0x4b, 0xe0, 0x24, 0x01, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78, 0x84, 0x20, 0x44, 0x00,
+0x00, 0xbb, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x00, 0x00, 0xbc, 0x9c, 0x44, 0x4b, 0xe0, 0x1c, 0x01,
+0xf6, 0x0e, 0x47, 0xe0, 0x04, 0x11, 0x14, 0x6f, 0x00, 0xca, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73,
+0x80, 0x78, 0xf1, 0x32, 0x84, 0x04, 0xdd, 0x27, 0x84, 0x20, 0x44, 0x00, 0x00, 0x1b, 0xdd, 0x27,
+0xf1, 0x0d, 0x44, 0x00, 0x00, 0x41, 0xdd, 0x27, 0xf1, 0x0c, 0x44, 0x00, 0x00, 0x42, 0xdd, 0x27,
+0x44, 0x10, 0x00, 0x8c, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x27, 0xf1, 0x0b, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x27, 0xf2, 0x31, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0x84, 0x21, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x30, 0x84, 0x21, 0x84, 0x00, 0xdd, 0x26, 0xf2, 0x2f, 0x84, 0x20, 0x84, 0x04,
+0xdd, 0x26, 0xf2, 0x2e, 0x84, 0x2b, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x2d, 0x84, 0x2d, 0x84, 0x04,
+0xdd, 0x26, 0xf2, 0x2c, 0x44, 0x10, 0x00, 0x13, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x2b, 0x44, 0x10,
+0x00, 0x15, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x2a, 0x44, 0x10, 0x00, 0x16, 0x84, 0x04, 0xdd, 0x26,
+0xf2, 0x29, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x28, 0x44, 0x10, 0x00, 0x12,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x27, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x26,
+0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0xf3, 0x0f, 0x46, 0x20, 0x04, 0x11, 0xa8, 0xd1,
+0x84, 0x23, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x27, 0xf1, 0x09, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27,
+0xf4, 0x0a, 0x46, 0x10, 0x04, 0x10, 0x14, 0x40, 0x81, 0x41, 0x80, 0xa1, 0xf0, 0x06, 0x14, 0x02,
+0x81, 0x43, 0xf7, 0x02, 0xcf, 0x06, 0x87, 0x81, 0x15, 0xcf, 0x80, 0x02, 0x48, 0xff, 0xfc, 0x66,
+0xec, 0xd4, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x8c, 0x96, 0x48,
+0x97, 0xd0, 0x54, 0xa0, 0x00, 0xff, 0xf1, 0x83, 0x4e, 0x73, 0x05, 0x5a, 0x84, 0x24, 0x50, 0x2f,
+0x80, 0x40, 0x80, 0x07, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0d, 0xb8, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x64, 0x84, 0x05, 0xdd, 0x26,
+0x84, 0x24, 0x50, 0x2f, 0x80, 0x60, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x80, 0x20, 0x50, 0x2f,
+0x80, 0x5c, 0xdd, 0x26, 0x80, 0x27, 0x50, 0x2f, 0x80, 0x58, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x26,
+0x50, 0x2f, 0x80, 0x54, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x84, 0x27, 0x50, 0x2f, 0x80, 0x50,
+0xdd, 0x26, 0x81, 0x26, 0x44, 0x80, 0x00, 0x25, 0x50, 0x6f, 0x80, 0x18, 0x80, 0x28, 0x80, 0x46,
+0x84, 0x05, 0xdd, 0x29, 0x8d, 0x01, 0x44, 0x00, 0x00, 0x2f, 0x9d, 0xb4, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x8d, 0xb8, 0x4c, 0x80, 0x7f, 0xf4, 0x44, 0x10, 0x00, 0x3a, 0x50, 0x2f, 0x80, 0x48,
+0x84, 0x05, 0xdd, 0x27, 0x44, 0x10, 0x00, 0x3b, 0x50, 0x2f, 0x80, 0x44, 0x84, 0x05, 0xdd, 0x27,
+0x50, 0x9f, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x17, 0x50, 0x2f, 0x80, 0x4c, 0x84, 0x00, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x84, 0x20, 0x80, 0x49, 0x84, 0x05, 0xdd, 0x27,
+0xf4, 0x1b, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x0e, 0x70, 0x58, 0x22, 0x00, 0x03, 0x84, 0x20,
+0x84, 0x05, 0x4b, 0xe0, 0x20, 0x01, 0x84, 0x21, 0x80, 0x49, 0x84, 0x05, 0xdd, 0x27, 0xf3, 0x1b,
+0x84, 0x05, 0x58, 0x21, 0x80, 0x01, 0x84, 0x21, 0x4b, 0xe0, 0x20, 0x01, 0x84, 0xc0, 0x81, 0x09,
+0x84, 0x00, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0x47, 0x9c, 0x49, 0x4c, 0x11, 0x7f, 0xfd, 0x9c, 0x01,
+0x44, 0x50, 0x00, 0x64, 0xd0, 0x03, 0x84, 0x20, 0xd5, 0xf6, 0x84, 0x21, 0x84, 0x05, 0x80, 0x48,
+0xdd, 0x27, 0xf1, 0x1b, 0x9d, 0xb1, 0x96, 0x0c, 0x45, 0xc0, 0x00, 0x28, 0xf0, 0x9b, 0x4c, 0x6e,
+0x00, 0x03, 0xc8, 0xe7, 0x51, 0xef, 0x80, 0x6c, 0x80, 0x5e, 0x84, 0x20, 0x84, 0x05, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf0, 0x1b, 0x85, 0x1c, 0x40, 0x60, 0x20, 0x02,
+0x58, 0x23, 0x00, 0x01, 0x84, 0x20, 0x50, 0x7f, 0x80, 0x68, 0x84, 0x05, 0xf6, 0x9b, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x80, 0x47, 0x44, 0x10, 0x00, 0x17, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf5, 0x1a, 0x45, 0xcf, 0xff, 0xe0,
+0x40, 0x92, 0xf0, 0x02, 0x58, 0x14, 0x80, 0x10, 0x44, 0x00, 0x00, 0x17, 0x14, 0x9f, 0x80, 0x1a,
+0x85, 0x09, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x44, 0x30, 0x00, 0x31,
+0x84, 0x82, 0x44, 0x00, 0x00, 0x27, 0x40, 0x64, 0x28, 0x1b, 0x40, 0x60, 0x28, 0x1a, 0x40, 0x22,
+0x28, 0x1b, 0x40, 0x21, 0xa8, 0x1a, 0x85, 0x20, 0xf2, 0x84, 0xf6, 0x85, 0x81, 0x09, 0x83, 0x89,
+0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8d, 0xb8, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70,
+0x4e, 0x93, 0x00, 0x56, 0x84, 0x28, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01,
+0xf3, 0x1b, 0x84, 0x28, 0x54, 0x21, 0x80, 0xfb, 0x84, 0x05, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10,
+0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x80, 0x09, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8,
+0xdd, 0x2f, 0xf2, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x58, 0x11, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x06,
+0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf1, 0x05, 0xf1, 0x82, 0x80, 0x29, 0xd5, 0x09, 0x92, 0x00,
+0x84, 0x87, 0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0xaa, 0xd1, 0x03, 0x84, 0x00,
+0xd5, 0xf7, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0xf7, 0x1a, 0x84, 0x04, 0x54, 0x13, 0x80, 0xe7, 0x46, 0xf0, 0x00, 0x06,
+0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01,
+0x4c, 0x03, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6,
+0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0xd5, 0x58, 0x84, 0x28, 0x50, 0x2f,
+0x80, 0x6c, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0xf3, 0x1b, 0x84, 0x28, 0x58, 0x21, 0x80, 0x04,
+0x84, 0x05, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf2, 0x1a, 0x44, 0x00, 0x00, 0x15,
+0x58, 0x11, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf1, 0x04,
+0xf1, 0x82, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0x8a, 0x4c, 0x12, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x84, 0x24, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf7, 0x1a,
+0x84, 0x04, 0x54, 0x53, 0x80, 0xe7, 0x58, 0x12, 0x80, 0x10, 0xf5, 0x9a, 0x46, 0xf0, 0x00, 0x06,
+0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01,
+0x4c, 0x03, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6,
+0x44, 0x10, 0x00, 0x15, 0x84, 0x00, 0x50, 0x2f, 0x80, 0x68, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0xf1, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x54, 0x10, 0x80, 0xfe, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8d, 0xb8,
+0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0x4e, 0xa2, 0x00, 0x7a, 0x46, 0x20, 0x04, 0x10,
+0x47, 0xe0, 0x04, 0x10, 0x59, 0xef, 0x05, 0x04, 0x44, 0x30, 0x00, 0x10, 0x58, 0x21, 0x05, 0x0c,
+0x44, 0x10, 0x00, 0x18, 0xb6, 0x62, 0xb6, 0x3e, 0x50, 0x2f, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x11,
+0x84, 0x05, 0xdd, 0x27, 0x05, 0xcf, 0x80, 0x1b, 0x44, 0x10, 0x00, 0x11, 0x58, 0x2e, 0x00, 0x80,
+0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xc1, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x20, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x14,
+0x84, 0x42, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27,
+0xf0, 0x1b, 0x44, 0x5f, 0xff, 0xc0, 0x40, 0x40, 0x14, 0x02, 0xf4, 0x9b, 0x58, 0x22, 0x00, 0x3f,
+0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27,
+0xf2, 0x1b, 0x44, 0x3f, 0xff, 0xc0, 0x41, 0xc1, 0x0c, 0x02, 0x15, 0xcf, 0x80, 0x1b, 0x58, 0x2e,
+0x00, 0x3f, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x80, 0x20, 0x44, 0x20, 0x00, 0x31,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x3a, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf0, 0x1b,
+0x44, 0x5f, 0xff, 0x80, 0x40, 0x40, 0x14, 0x02, 0xf4, 0x9b, 0x80, 0x44, 0x44, 0x10, 0x00, 0x3a,
+0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x3b, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27,
+0xf2, 0x1b, 0x44, 0x3f, 0xff, 0x80, 0x41, 0xc1, 0x0c, 0x02, 0x15, 0xcf, 0x80, 0x1b, 0x80, 0x5c,
+0x84, 0x05, 0x44, 0x10, 0x00, 0x3b, 0xdd, 0x26, 0x87, 0x80, 0xd5, 0x6c, 0x46, 0x10, 0x04, 0x10,
+0x47, 0xe0, 0x04, 0x10, 0x59, 0xef, 0x05, 0x04, 0x84, 0x88, 0x44, 0x80, 0x00, 0x18, 0x58, 0x10,
+0x85, 0x0c, 0xb6, 0x81, 0xb7, 0x1e, 0x44, 0x10, 0x00, 0x11, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05,
+0xdd, 0x27, 0xf3, 0x1b, 0x44, 0x10, 0x00, 0x11, 0x58, 0x21, 0x80, 0x80, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xf1, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x48, 0x44, 0x10,
+0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x14, 0x44, 0x20, 0x00, 0xc2, 0x84, 0x05,
+0xdd, 0x26, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf2, 0x1b, 0x44, 0x0f,
+0xff, 0xc0, 0x40, 0x51, 0x00, 0x02, 0xf5, 0x9b, 0x58, 0x22, 0x80, 0x34, 0x84, 0x23, 0x84, 0x05,
+0xdd, 0x26, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf4, 0x1b, 0x44, 0x8f,
+0xff, 0xc0, 0x40, 0x32, 0x20, 0x02, 0xf3, 0x9b, 0x58, 0x21, 0x80, 0x34, 0x84, 0x24, 0x84, 0x05,
+0xdd, 0x26, 0x84, 0x26, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf2, 0x1b, 0x44, 0x0f,
+0xff, 0x80, 0x40, 0x51, 0x00, 0x02, 0xf5, 0x9b, 0x80, 0x45, 0x84, 0x26, 0x84, 0x05, 0xdd, 0x26,
+0x84, 0x27, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0xdd, 0x27, 0xf7, 0x1b, 0x44, 0x4f, 0xff, 0x80,
+0x40, 0x83, 0x90, 0x02, 0x14, 0x8f, 0x80, 0x1b, 0x80, 0x48, 0x84, 0x05, 0x84, 0x27, 0xdd, 0x26,
+0x81, 0x0a, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01, 0x4c, 0x03, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0xea, 0x4c, 0x13, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x46, 0x60, 0x00, 0x06,
+0x58, 0x63, 0x00, 0x78, 0x84, 0x22, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x70,
+0x00, 0x05, 0x58, 0x73, 0x8e, 0xf8, 0x50, 0x2f, 0x80, 0x68, 0x44, 0x10, 0x00, 0x9f, 0x84, 0x00,
+0x4b, 0xe0, 0x1c, 0x01, 0xf3, 0x1a, 0x84, 0x59, 0x40, 0x11, 0x88, 0x02, 0x44, 0x00, 0x00, 0x9f,
+0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x4b, 0xe0,
+0x1c, 0x01, 0xf5, 0x1a, 0x44, 0x00, 0x00, 0x15, 0x58, 0x12, 0x80, 0x01, 0x4b, 0xe0, 0x18, 0x01,
+0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x9c, 0x49,
+0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf1, 0x1a,
+0x44, 0x00, 0x00, 0x15, 0x54, 0x10, 0x80, 0xfe, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78,
+0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0xca, 0x4c, 0x13, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x46, 0x70, 0x00, 0x06,
+0x58, 0x73, 0x80, 0x78, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x00,
+0x00, 0x9f, 0x44, 0x10, 0x00, 0x82, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0xc0, 0x46, 0x70, 0x00, 0x05,
+0x58, 0x73, 0x8e, 0xf8, 0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x01, 0xd8, 0xfd,
+0x9c, 0x49, 0x44, 0x30, 0x00, 0x64, 0x4c, 0x11, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x44, 0x10, 0x00, 0x9f, 0x4b, 0xe0, 0x1c, 0x01, 0xf2, 0x1a, 0x84, 0x02,
+0x4c, 0x20, 0x00, 0x08, 0x45, 0xe0, 0x00, 0x14, 0x4c, 0x6f, 0x00, 0x04, 0x9d, 0xb1, 0xd5, 0xe3,
+0x44, 0x10, 0x00, 0x39, 0x44, 0x00, 0x00, 0x9e, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78,
+0xdd, 0x2f, 0x44, 0x10, 0x00, 0x9f, 0x84, 0x00, 0x50, 0x2f, 0x80, 0x68, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x00, 0x1f, 0x80, 0x68, 0x54, 0x10, 0x80, 0x7f, 0xf1, 0x81,
+0x5e, 0xf0, 0x80, 0x40, 0xe9, 0x06, 0x44, 0x6f, 0xff, 0x80, 0x40, 0x40, 0x98, 0x04, 0xf4, 0x81,
+0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78, 0x84, 0x22, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0,
+0x1c, 0x01, 0x46, 0x30, 0x00, 0x05, 0x58, 0x31, 0x8e, 0xf8, 0x44, 0x10, 0x00, 0x9f, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x4b, 0xe0, 0x0c, 0x01, 0xf5, 0x1a, 0x44, 0x00, 0x00, 0x9f, 0x58, 0x12,
+0x80, 0x06, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0x70, 0x4e, 0xa2,
+0x00, 0x2a, 0x50, 0x2f, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf0, 0x1b, 0x44, 0x10, 0x00, 0x3a, 0x54, 0x40, 0x00, 0x80,
+0xf4, 0x9b, 0x40, 0x2e, 0x10, 0x00, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0x50, 0x2f, 0x80, 0x6c,
+0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f,
+0xf2, 0x1b, 0x44, 0x10, 0x00, 0x3b, 0x54, 0x31, 0x00, 0x80, 0x40, 0x2e, 0x0c, 0x00, 0x84, 0x00,
+0xd5, 0x24, 0x84, 0x26, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8d, 0xb8, 0xdd, 0x2f, 0xf5, 0x1b, 0x84, 0x26, 0x54, 0x62, 0x80, 0x80, 0xf6, 0x9b, 0x40, 0x24,
+0x18, 0x00, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x27, 0x50, 0x2f, 0x80, 0x6c, 0x84, 0x05,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf1, 0x1b, 0x84, 0x05, 0x54, 0x30,
+0x80, 0x80, 0x40, 0x24, 0x0c, 0x00, 0x84, 0x27, 0xf3, 0x9b, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x20,
+0xd5, 0x0a, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x9c, 0x49, 0x84, 0x6a,
+0x4c, 0x11, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x68,
+0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf2, 0x1a, 0x44, 0x00,
+0x00, 0x15, 0x58, 0x11, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd, 0x9c, 0x49,
+0x84, 0x0a, 0x4c, 0x10, 0x00, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f,
+0x80, 0x68, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf1, 0x1a,
+0x44, 0x00, 0x00, 0x15, 0x54, 0x10, 0x80, 0xfe, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78,
+0xdd, 0x2f, 0x84, 0x20, 0xd5, 0x09, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01, 0x4c, 0x03, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0xaa, 0xd1, 0x03, 0x84, 0x00, 0xd5, 0xf7, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63,
+0x00, 0x78, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x00, 0x00, 0x9f,
+0x44, 0x10, 0x00, 0x82, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0xc0, 0x84, 0x20, 0xd5, 0x0b, 0x92, 0x00,
+0x87, 0xc7, 0x9c, 0x01, 0x4c, 0x0f, 0x7f, 0xfd, 0x9c, 0x49, 0x44, 0x30, 0x00, 0x64, 0x4c, 0x11,
+0x80, 0x04, 0x84, 0x00, 0xd5, 0xf5, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x00, 0x44, 0x10, 0x00, 0x9f,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf2, 0x1a, 0x84, 0x82, 0x4c, 0x22,
+0x00, 0x08, 0x44, 0x00, 0x00, 0x14, 0x4c, 0x60, 0x00, 0x04, 0x9d, 0xb1, 0xd5, 0xdf, 0x44, 0x10,
+0x00, 0x39, 0x44, 0x00, 0x00, 0x9e, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x44, 0x10, 0x00, 0x9f, 0x84, 0x00, 0x50, 0x2f, 0x80, 0x68, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0x00, 0x1f, 0x80, 0x68, 0x54, 0x10, 0x80, 0x7f, 0x5e, 0xf0, 0x80, 0x40,
+0xe9, 0x05, 0x44, 0x5f, 0xff, 0x80, 0x40, 0x10, 0x94, 0x04, 0x05, 0xef, 0x80, 0x01, 0xf6, 0x02,
+0x40, 0x1f, 0x04, 0x01, 0x40, 0x2e, 0x28, 0x1b, 0x40, 0x24, 0x28, 0x1a, 0xe0, 0xc1, 0xe8, 0x22,
+0xca, 0x2d, 0x4e, 0x93, 0x00, 0x12, 0x4e, 0xa2, 0x00, 0x09, 0x46, 0x70, 0x00, 0x0d, 0x58, 0x73,
+0x8e, 0x1d, 0x10, 0x93, 0x80, 0x00, 0xd5, 0x4e, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94, 0x8e, 0x1c,
+0x10, 0xa4, 0x80, 0x00, 0xd5, 0x47, 0x4e, 0xa2, 0x00, 0x07, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10,
+0x8e, 0x1f, 0xd5, 0x4a, 0x46, 0x30, 0x00, 0x0d, 0x58, 0x31, 0x8e, 0x1e, 0x10, 0xa1, 0x80, 0x00,
+0xd5, 0x4b, 0x5e, 0xf1, 0x00, 0x3f, 0xe8, 0x0a, 0x4e, 0xa2, 0x00, 0x06, 0x51, 0xce, 0x00, 0x01,
+0x48, 0xff, 0xfe, 0xdf, 0x8d, 0x01, 0x48, 0xff, 0xfe, 0xdc, 0xf4, 0x02, 0xe0, 0x24, 0xe8, 0x19,
+0x44, 0x00, 0x00, 0x3f, 0x4c, 0x20, 0x40, 0x16, 0x4e, 0x93, 0x00, 0x0b, 0x4e, 0xa2, 0x00, 0x1d,
+0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8e, 0x1d, 0x11, 0xc0, 0x80, 0x00, 0xd5, 0x1b, 0x4e, 0xa2,
+0x00, 0x26, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8e, 0x1f, 0x11, 0xc2, 0x80, 0x00, 0xd5, 0x24,
+0x4e, 0x93, 0x00, 0x14, 0x4e, 0xa2, 0x00, 0x09, 0x47, 0xe0, 0x00, 0x0d, 0x59, 0xef, 0x0e, 0x1d,
+0x11, 0xcf, 0x00, 0x00, 0xd5, 0x07, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94, 0x8e, 0x1c, 0x10, 0x84,
+0x80, 0x00, 0x85, 0x21, 0x48, 0xff, 0xfc, 0x26, 0x4e, 0xa2, 0x00, 0x09, 0x46, 0x10, 0x00, 0x0d,
+0x58, 0x10, 0x8e, 0x1f, 0x80, 0x5c, 0xae, 0x88, 0xd5, 0x07, 0x46, 0x30, 0x00, 0x0d, 0x58, 0x31,
+0x8e, 0x1e, 0x10, 0x81, 0x80, 0x00, 0x8d, 0x21, 0x84, 0x82, 0x4c, 0x92, 0x7c, 0x13, 0x46, 0x20,
+0x04, 0x10, 0x46, 0x10, 0x04, 0x10, 0x85, 0x00, 0x58, 0x21, 0x05, 0x0c, 0x58, 0x10, 0x85, 0x04,
+0xb7, 0x02, 0xb7, 0x01, 0x50, 0x2f, 0x80, 0x6c, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0x46, 0xf0,
+0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf0, 0x1b, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63,
+0x0e, 0x70, 0x54, 0x20, 0x00, 0x7f, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x12, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13, 0x80, 0x48, 0x84, 0x05,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x14, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x19, 0x84, 0x23,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x18, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0xf2, 0x17,
+0x80, 0x20, 0xdd, 0x26, 0xf2, 0x16, 0x80, 0x28, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x15, 0x84, 0x26,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x14, 0x84, 0x05, 0x84, 0x27, 0xdd, 0x26, 0x50, 0x9f, 0x80, 0x18,
+0x44, 0x70, 0x00, 0x25, 0x0c, 0x24, 0x80, 0x01, 0x80, 0x27, 0x84, 0x05, 0xdd, 0x26, 0x9d, 0xf9,
+0x44, 0x50, 0x00, 0x2f, 0x46, 0x80, 0x00, 0x05, 0x58, 0x84, 0x0e, 0x70, 0xdf, 0xf4, 0xf2, 0x12,
+0x44, 0x10, 0x00, 0x3a, 0x84, 0x05, 0x4b, 0xe0, 0x20, 0x01, 0xf2, 0x11, 0x44, 0x10, 0x00, 0x3b,
+0x84, 0x05, 0x4b, 0xe0, 0x20, 0x01, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x50, 0x8f,
+0x80, 0x68, 0x84, 0x22, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94,
+0x8e, 0xf8, 0x80, 0x48, 0x44, 0x10, 0x00, 0x9f, 0x84, 0x00, 0x4b, 0xe0, 0x24, 0x01, 0xf3, 0x1a,
+0x44, 0x00, 0x00, 0x9f, 0x54, 0x11, 0x80, 0xf9, 0xdd, 0x26, 0x80, 0x48, 0x84, 0x24, 0x84, 0x00,
+0x4b, 0xe0, 0x24, 0x01, 0xf7, 0x1a, 0x84, 0x04, 0x54, 0x13, 0x80, 0xf3, 0xdd, 0x26, 0xf1, 0x13,
+0x44, 0x00, 0x00, 0x17, 0xdd, 0x26, 0xf1, 0x10, 0x84, 0x04, 0xdd, 0x26, 0x05, 0xef, 0x80, 0x03,
+0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8d, 0xb8, 0x50, 0x8f, 0x80, 0x6c, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x0e, 0x70, 0x4f, 0xe3, 0x00, 0x4c, 0x80, 0x48, 0x84, 0x26, 0x84, 0x05, 0xdd, 0x27,
+0xf4, 0x1b, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94, 0x8e, 0x1c, 0x54, 0x52, 0x00, 0xc0, 0x00, 0x14,
+0x80, 0x00, 0xf5, 0x9b, 0x98, 0x8d, 0x84, 0x05, 0x84, 0x26, 0xdd, 0x26, 0x80, 0x48, 0x84, 0x27,
+0x84, 0x05, 0xdd, 0x27, 0xf3, 0x1b, 0x00, 0x04, 0x80, 0x00, 0x54, 0x91, 0x80, 0xc0, 0x14, 0x9f,
+0x80, 0x1b, 0x40, 0x20, 0x24, 0x00, 0x84, 0x27, 0x84, 0x05, 0xdd, 0x26, 0x80, 0x48, 0x44, 0x10,
+0x00, 0x3a, 0x84, 0x05, 0xdd, 0x27, 0xf2, 0x1b, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94, 0x8e, 0x1d,
+0x54, 0x51, 0x00, 0xc0, 0x00, 0x44, 0x80, 0x00, 0xf5, 0x9b, 0x98, 0xa5, 0x44, 0x10, 0x00, 0x3a,
+0x84, 0x05, 0xdd, 0x26, 0x80, 0x48, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x27, 0xf1, 0x1b,
+0x00, 0x04, 0x80, 0x00, 0x54, 0x40, 0x80, 0xc0, 0xf4, 0x9b, 0x98, 0x84, 0x44, 0x10, 0x00, 0x3b,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x03, 0x84, 0x28, 0x84, 0x05, 0xd5, 0x49, 0x84, 0x26, 0x80, 0x48,
+0x84, 0x05, 0xdd, 0x27, 0xf1, 0x1b, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94, 0x8e, 0x1e, 0x54, 0x50,
+0x80, 0xc0, 0x00, 0x04, 0x80, 0x00, 0xf5, 0x9b, 0x98, 0x85, 0x84, 0x26, 0x84, 0x05, 0xdd, 0x26,
+0x84, 0x27, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x27, 0xf3, 0x1b, 0x00, 0x24, 0x80, 0x00, 0x54, 0x91,
+0x80, 0xc0, 0x14, 0x9f, 0x80, 0x1b, 0x88, 0x49, 0x84, 0x27, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x3a, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x27, 0xf4, 0x1b, 0x46, 0x90, 0x00, 0x0d, 0x58, 0x94,
+0x8e, 0x1f, 0x54, 0x52, 0x00, 0xc0, 0x00, 0x14, 0x80, 0x00, 0xf5, 0x9b, 0x98, 0x8d, 0x84, 0x05,
+0x44, 0x10, 0x00, 0x3a, 0xdd, 0x26, 0x80, 0x48, 0x44, 0x10, 0x00, 0x3b, 0x84, 0x05, 0xdd, 0x27,
+0xf0, 0x1b, 0x00, 0x24, 0x80, 0x00, 0x54, 0x30, 0x00, 0xc0, 0xf3, 0x9b, 0x98, 0x93, 0x44, 0x10,
+0x00, 0x3b, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x05, 0x84, 0x28, 0x84, 0x44, 0xdd, 0x26, 0xec, 0x74,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x84, 0x40,
+0xf2, 0x81, 0x46, 0xf0, 0x00, 0x0d, 0x00, 0x97, 0x8e, 0x28, 0x54, 0x80, 0x00, 0xff, 0x46, 0x60,
+0x00, 0x0a, 0x58, 0x63, 0x0f, 0x20, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0x70, 0xa7, 0x70,
+0x4c, 0x54, 0x40, 0x16, 0xa6, 0xb1, 0x44, 0x10, 0x00, 0x11, 0x84, 0x00, 0xdd, 0x27, 0xa6, 0xb2,
+0x44, 0x10, 0x00, 0x12, 0x84, 0x00, 0xdd, 0x27, 0xa6, 0xb3, 0x44, 0x10, 0x00, 0x13, 0x84, 0x00,
+0xdd, 0x27, 0xa6, 0xb4, 0x84, 0x00, 0x44, 0x10, 0x00, 0x14, 0xdd, 0x27, 0x9d, 0xb5, 0x46, 0x50,
+0x00, 0x0a, 0x58, 0x52, 0x8f, 0x66, 0xde, 0xe4, 0x46, 0x50, 0x04, 0x11, 0x05, 0xe2, 0x80, 0xec,
+0x44, 0x1f, 0xc0, 0xc0, 0x54, 0x74, 0x80, 0x3f, 0x40, 0x6f, 0x04, 0x02, 0x40, 0x43, 0x98, 0x04,
+0x14, 0x42, 0x80, 0xec, 0xe7, 0x0f, 0xe8, 0x1a, 0x46, 0xf0, 0x00, 0x0d, 0x04, 0x27, 0x83, 0x8b,
+0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x52, 0x71, 0x00, 0x37, 0x80, 0x27, 0x44, 0x00,
+0x00, 0x3e, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x27, 0x44, 0x00, 0x00, 0x3f, 0x4b, 0xe0, 0x18, 0x01,
+0x80, 0x27, 0x44, 0x00, 0x00, 0x40, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x24, 0x40, 0x2f, 0x84, 0x00,
+0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8d, 0xb8, 0xdd, 0x2f, 0xf1, 0x01, 0x84, 0x00,
+0x58, 0x50, 0x80, 0x80, 0x80, 0x45, 0x84, 0x24, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x20,
+0xf5, 0x81, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0xa7, 0x32, 0x40, 0x32,
+0x04, 0x09, 0x54, 0x71, 0x80, 0x07, 0x80, 0x07, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x89, 0x30,
+0xdd, 0x2f, 0xc7, 0x06, 0x84, 0xa1, 0x4c, 0x72, 0xc1, 0x3a, 0x48, 0x00, 0x00, 0x86, 0x00, 0x83,
+0x00, 0x01, 0x84, 0xa4, 0x54, 0x84, 0x00, 0x0e, 0x4c, 0x82, 0xc0, 0x07, 0x46, 0x60, 0x00, 0x06,
+0x58, 0x63, 0x00, 0x78, 0xd5, 0x4a, 0x84, 0xa2, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78,
+0x4c, 0x82, 0xc0, 0x44, 0x44, 0x10, 0x00, 0x12, 0x44, 0x00, 0x00, 0x45, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x5e, 0x44, 0x00, 0x00, 0x4b, 0xdd, 0x26, 0x84, 0x27, 0x44, 0x00, 0x00, 0x5b, 0xdd, 0x26,
+0x80, 0x28, 0x44, 0x00, 0x00, 0x5c, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x23, 0x44, 0x00, 0x00, 0xc3,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x17, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x24,
+0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x84, 0x26, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x81, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x00, 0x00, 0xc4,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x83, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x17,
+0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x88, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x5e, 0x48, 0x00, 0x00, 0xb0, 0x44, 0x10, 0x00, 0x12, 0x44, 0x00, 0x00, 0x45,
+0xdd, 0x26, 0x84, 0x27, 0x44, 0x00, 0x00, 0x5b, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x23, 0x44, 0x00,
+0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x17, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x24, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x84, 0x26, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x81, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x00,
+0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x83, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x17, 0x48, 0x00, 0x00, 0x81, 0xa6, 0xf1, 0x84, 0x04, 0x54, 0x81, 0x80, 0x0e, 0x4c, 0x80,
+0x40, 0x34, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x10, 0x00, 0x15, 0x44, 0x00,
+0x00, 0x45, 0xdd, 0x26, 0x80, 0x28, 0x44, 0x00, 0x00, 0x5b, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x23,
+0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x24, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x84, 0x28, 0x44, 0x00, 0x00, 0xc4,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x81, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x15,
+0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x83, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x16, 0xd5, 0x48, 0x84, 0xa2, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78,
+0x4c, 0x82, 0xc0, 0x45, 0x44, 0x10, 0x00, 0x15, 0x44, 0x00, 0x00, 0x45, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x5c, 0x44, 0x00, 0x00, 0x4b, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00, 0x00, 0x5b, 0xdd, 0x26,
+0x84, 0x23, 0x44, 0x00, 0x00, 0x5c, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x23, 0x44, 0x00, 0x00, 0xc3,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x10, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x24,
+0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x84, 0x28, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10,
+0x00, 0x81, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x15, 0x44, 0x00, 0x00, 0xc4,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x83, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x16,
+0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x88, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x5b, 0x44, 0x00, 0x00, 0xc4, 0xd5, 0x30, 0x44, 0x10, 0x00, 0x15, 0x44, 0x00,
+0x00, 0x45, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x00, 0x00, 0x5b, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x23,
+0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x24, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x84, 0x28, 0x44, 0x00, 0x00, 0xc4,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x81, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x15,
+0x44, 0x00, 0x00, 0xc4, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x83, 0x44, 0x00, 0x00, 0xc3, 0xdd, 0x26,
+0x44, 0x00, 0x00, 0xc4, 0x44, 0x10, 0x00, 0x16, 0xdd, 0x26, 0x84, 0x01, 0x80, 0x40, 0x80, 0x27,
+0x46, 0x60, 0x00, 0x07, 0x58, 0x63, 0x02, 0x78, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x27, 0x84, 0x00,
+0x84, 0x41, 0x4b, 0xe0, 0x18, 0x01, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00,
+0x3b, 0xff, 0xfc, 0xbc, 0xef, 0xfc, 0x96, 0x49, 0xe6, 0x38, 0xe9, 0x36, 0x80, 0x60, 0xa2, 0x59,
+0x47, 0xe0, 0x00, 0x0d, 0x14, 0x1f, 0x03, 0x88, 0xb4, 0xa3, 0x50, 0x20, 0x00, 0x08, 0x46, 0xf0,
+0x00, 0x0d, 0x14, 0x57, 0x83, 0x89, 0xb4, 0x62, 0x50, 0x20, 0x00, 0x0c, 0x46, 0xf0, 0x00, 0x0d,
+0x14, 0x37, 0x83, 0x8a, 0xb4, 0xa2, 0x50, 0x20, 0x00, 0x10, 0x46, 0xf0, 0x00, 0x0d, 0x14, 0x57,
+0x83, 0x8b, 0x50, 0x50, 0x00, 0x14, 0xb4, 0x82, 0x46, 0xf0, 0x00, 0x0d, 0x14, 0x47, 0x83, 0x8c,
+0x00, 0x0f, 0x0e, 0x20, 0xb4, 0x65, 0x46, 0xf0, 0x00, 0x0d, 0x14, 0x37, 0x83, 0x8d, 0x5c, 0xf0,
+0x00, 0x37, 0xe8, 0x0a, 0x42, 0x10, 0xa0, 0x0b, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x8e, 0x88,
+0xdd, 0x2f, 0x84, 0x00, 0xd5, 0x02, 0x84, 0x01, 0xec, 0x04, 0x3b, 0xff, 0xfc, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xfc, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x54, 0x90,
+0x00, 0xff, 0x54, 0x80, 0x80, 0xff, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0xb0, 0x97, 0xd0,
+0x4b, 0xe0, 0x18, 0x01, 0x80, 0x29, 0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x4e, 0x83,
+0x00, 0x07, 0x44, 0x10, 0x00, 0xb1, 0x44, 0x00, 0x00, 0x9e, 0xd5, 0x05, 0x44, 0x00, 0x00, 0x9e,
+0x44, 0x10, 0x00, 0xb2, 0x4b, 0xe0, 0x18, 0x01, 0x80, 0x27, 0x44, 0x00, 0x00, 0x9f, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xec, 0x04, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e,
+0x3a, 0x6f, 0xa4, 0xbc, 0xef, 0xf4, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x54, 0x90,
+0x00, 0xff, 0x97, 0xc8, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0xb0, 0x81, 0x02, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x30, 0x00, 0xb2, 0x44, 0x40,
+0x00, 0xb1, 0x40, 0x12, 0x24, 0x1a, 0x40, 0x11, 0xa4, 0x1b, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0x80, 0x27, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x26,
+0x84, 0x00, 0x92, 0x00, 0x84, 0x27, 0x9c, 0x01, 0x4c, 0x00, 0xff, 0xfd, 0x46, 0x60, 0x00, 0x06,
+0x58, 0x63, 0x00, 0x78, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x00, 0x00, 0x9f, 0x44, 0x10, 0x00, 0x9b,
+0x4b, 0xe0, 0x18, 0x01, 0x44, 0x00, 0x00, 0x9b, 0xf0, 0x81, 0x84, 0xe0, 0x50, 0x6f, 0x80, 0x04,
+0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x8e, 0xf8, 0xd5, 0x27, 0x44, 0x20, 0x00, 0x65, 0x4c, 0x71,
+0x00, 0x04, 0x84, 0x00, 0xd5, 0x18, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x84, 0x20,
+0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0,
+0x18, 0x01, 0xd5, 0x17, 0x92, 0x00, 0x84, 0xa7, 0x9c, 0x49, 0xd9, 0xfd, 0x9c, 0x01, 0x87, 0xca,
+0x4c, 0x0f, 0x00, 0x04, 0x84, 0x20, 0xd5, 0xf7, 0x84, 0x00, 0x44, 0x10, 0x00, 0x9f, 0x80, 0x46,
+0x9d, 0xf9, 0x4b, 0xe0, 0x24, 0x01, 0xf4, 0x01, 0x44, 0x30, 0x00, 0x9b, 0x4c, 0x41, 0xbf, 0xd7,
+0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x10, 0x00, 0xba, 0x44, 0x00, 0x00, 0x9e,
+0x4b, 0xe0, 0x18, 0x01, 0x84, 0x2a, 0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x10,
+0x04, 0x10, 0x58, 0x10, 0x80, 0x7c, 0xb4, 0x01, 0x40, 0x10, 0x40, 0x09, 0x4e, 0x04, 0x00, 0x05,
+0x44, 0x2f, 0x00, 0x00, 0x98, 0x4a, 0x45, 0xe0, 0x80, 0x00, 0x40, 0x50, 0x78, 0x02, 0x96, 0x01,
+0xc5, 0x04, 0x44, 0x4f, 0x00, 0x00, 0x98, 0x04, 0x42, 0x30, 0x84, 0x24, 0x42, 0x30, 0x00, 0x73,
+0xb6, 0x68, 0xec, 0x0c, 0x3a, 0x6f, 0xa4, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0x6c, 0x96, 0x00, 0xf0, 0x82, 0xc0, 0x08, 0x84, 0x20, 0xf1, 0x84, 0xf1, 0x89, 0xf1, 0x8a,
+0xf1, 0x8b, 0x48, 0x00, 0x02, 0x7f, 0x46, 0x30, 0x04, 0x11, 0x58, 0x31, 0x80, 0x04, 0xb5, 0x23,
+0x47, 0xe0, 0x04, 0x11, 0x14, 0x9f, 0x80, 0x0b, 0x59, 0xef, 0x03, 0xb8, 0xb4, 0x5e, 0x46, 0x70,
+0x04, 0x10, 0xf2, 0x8a, 0x58, 0x73, 0x85, 0x04, 0xb4, 0x87, 0x46, 0x80, 0x04, 0x10, 0xf4, 0x89,
+0x58, 0x84, 0x05, 0x0c, 0xb4, 0x28, 0xf0, 0x02, 0x44, 0xa0, 0x00, 0x10, 0xf1, 0x84, 0xb6, 0x03,
+0xb7, 0x5e, 0x50, 0x2f, 0x80, 0x48, 0xf0, 0x02, 0x84, 0x24, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0xf5, 0x12, 0x46, 0x90, 0x00, 0x06, 0x58, 0x94, 0x80, 0x78, 0x54, 0x12,
+0x80, 0xe7, 0x84, 0x04, 0x4b, 0xe0, 0x24, 0x01, 0xf0, 0x02, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce,
+0x0d, 0xb8, 0x84, 0x21, 0x50, 0x2f, 0x80, 0x7c, 0xdd, 0x3c, 0xf0, 0x02, 0x84, 0x22, 0x50, 0x2f,
+0x80, 0x78, 0xdd, 0x3c, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x23, 0x50, 0x2f, 0x80, 0x74, 0xdd, 0x3c,
+0xf0, 0x02, 0x44, 0x10, 0x00, 0x2a, 0x50, 0x2f, 0x80, 0x70, 0xdd, 0x3c, 0xf1, 0x02, 0x50, 0x2f,
+0x80, 0x6c, 0x84, 0x04, 0xdd, 0x3c, 0x84, 0x22, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x04, 0xdd, 0x3c,
+0x44, 0x10, 0x00, 0x22, 0x50, 0x2f, 0x80, 0x64, 0x84, 0x04, 0xdd, 0x3c, 0x84, 0x23, 0x50, 0x2f,
+0x80, 0x60, 0x84, 0x05, 0xdd, 0x3c, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x5c, 0x84, 0x05, 0xdd, 0x3c,
+0x44, 0x10, 0x00, 0x11, 0x50, 0x2f, 0x80, 0x58, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x12,
+0x50, 0x2f, 0x80, 0x54, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x50,
+0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x4c, 0x84, 0x05, 0xdd, 0x3c,
+0xf0, 0x02, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0x84, 0x21, 0x44, 0x20, 0x00, 0x21,
+0xdd, 0x26, 0xf0, 0x02, 0x80, 0x4a, 0x84, 0x22, 0xdd, 0x26, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x23,
+0x80, 0x40, 0xdd, 0x26, 0xf0, 0x02, 0x44, 0x10, 0x00, 0x2a, 0x44, 0x20, 0x00, 0x1b, 0xdd, 0x26,
+0xf1, 0x02, 0x44, 0x20, 0x00, 0x81, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x22, 0x44, 0x20, 0x00, 0x81,
+0x84, 0x04, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x22, 0x44, 0x20, 0x00, 0xee, 0x84, 0x04, 0xdd, 0x26,
+0x84, 0x23, 0x44, 0x20, 0x00, 0x30, 0x84, 0x05, 0xdd, 0x26, 0x84, 0x24, 0x44, 0x20, 0x00, 0x30,
+0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xd7, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13,
+0x44, 0x20, 0x00, 0xa2, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x20, 0x00, 0x20, 0x44, 0x10, 0x00, 0x14,
+0x84, 0x05, 0xdd, 0x26, 0xf1, 0x02, 0x44, 0x00, 0x00, 0x17, 0x4b, 0xe0, 0x24, 0x01, 0xf2, 0x02,
+0x46, 0x30, 0x00, 0xcf, 0x58, 0x31, 0x88, 0xb0, 0x44, 0x45, 0x20, 0x00, 0xb6, 0x47, 0xb6, 0x88,
+0xb6, 0x67, 0xf3, 0x02, 0x92, 0x00, 0x84, 0xe7, 0x9c, 0xd9, 0x4c, 0x33, 0xff, 0xfd, 0x46, 0x80,
+0x04, 0x10, 0x58, 0x84, 0x05, 0x0c, 0x44, 0x65, 0x20, 0x1e, 0xb6, 0xc8, 0x84, 0x60, 0x92, 0x00,
+0x85, 0x47, 0x9c, 0xd9, 0x4c, 0x35, 0x7f, 0xfd, 0x47, 0xc0, 0x04, 0x10, 0x59, 0xce, 0x05, 0x0c,
+0x44, 0x55, 0x20, 0x3e, 0xb6, 0xbc, 0x84, 0x60, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0xd9, 0x4c, 0x3f,
+0x7f, 0xfd, 0x46, 0x90, 0x00, 0x06, 0x58, 0x94, 0x80, 0x78, 0x84, 0x20, 0x44, 0x00, 0x00, 0x17,
+0xdd, 0x29, 0x44, 0x10, 0x00, 0xaa, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x9f, 0xdd, 0x29, 0x44, 0x10, 0x00, 0xab, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x84, 0x2a,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x29, 0x44, 0x10, 0x00, 0xac, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29,
+0x44, 0x10, 0x00, 0x3f, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x29, 0x44, 0x10, 0x00, 0xad, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x3f, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x29, 0x44, 0x10,
+0x00, 0x40, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x29, 0x50, 0x2f, 0x80, 0x88, 0x44, 0x10, 0x00, 0x1f,
+0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf7, 0x22, 0x44, 0x00,
+0x00, 0x1f, 0x58, 0x23, 0x80, 0x60, 0xf2, 0xa2, 0x80, 0x22, 0xdd, 0x29, 0x84, 0x25, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x29, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x29, 0x46, 0x40, 0x00, 0x0d,
+0x58, 0x42, 0x0e, 0x00, 0x22, 0x12, 0x00, 0x00, 0x46, 0x30, 0x00, 0x0d, 0x58, 0x31, 0x8e, 0x10,
+0x84, 0x00, 0xf1, 0x88, 0xf3, 0x86, 0xf0, 0x83, 0x46, 0x80, 0x00, 0x0a, 0x58, 0x84, 0x0f, 0xd8,
+0x3a, 0x04, 0x04, 0x00, 0x46, 0x70, 0x00, 0x0a, 0x58, 0x73, 0x8f, 0xd0, 0xf0, 0x90, 0x12, 0x1f,
+0x80, 0x22, 0xf1, 0x03, 0x50, 0x0f, 0x80, 0x40, 0x38, 0x20, 0x04, 0x00, 0x44, 0x31, 0x20, 0x3e,
+0x40, 0x91, 0x64, 0x08, 0x3a, 0x03, 0x84, 0x00, 0x46, 0x40, 0x04, 0x10, 0x41, 0xe4, 0x8c, 0x04,
+0x58, 0x42, 0x05, 0x0c, 0x51, 0xcf, 0x80, 0x38, 0xb6, 0x1c, 0x12, 0x1f, 0x80, 0x1e, 0x15, 0xe2,
+0x00, 0x00, 0x46, 0xa0, 0x00, 0x06, 0x58, 0xa5, 0x00, 0x78, 0xf5, 0x03, 0x44, 0x00, 0x00, 0x17,
+0x38, 0x1e, 0x14, 0x00, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0xb0, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a,
+0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0xb2, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x2a, 0x44, 0x00, 0x00, 0x9f, 0x84, 0x20, 0xdd, 0x2a, 0xf6, 0x03, 0x54, 0x83,
+0x00, 0xff, 0x4e, 0x83, 0x00, 0x3b, 0x46, 0x80, 0x2e, 0xba, 0x58, 0x84, 0x0e, 0x3f, 0x44, 0x70,
+0x00, 0x12, 0x47, 0xc0, 0x00, 0x0a, 0x59, 0xce, 0x0f, 0xbc, 0x46, 0xa0, 0x00, 0x05, 0x58, 0xa5,
+0x0e, 0x70, 0x46, 0x90, 0x00, 0x08, 0x58, 0x94, 0x83, 0x00, 0xd5, 0x22, 0xf5, 0x08, 0x9f, 0xfa,
+0x38, 0x6e, 0x14, 0x00, 0x80, 0x46, 0x4b, 0xe0, 0x28, 0x01, 0x80, 0x46, 0x84, 0x24, 0x84, 0x05,
+0x4b, 0xe0, 0x28, 0x01, 0x84, 0x00, 0x80, 0x20, 0x50, 0x2f, 0x80, 0x84, 0x4b, 0xe0, 0x24, 0x01,
+0x84, 0x00, 0x44, 0x10, 0x00, 0x21, 0x50, 0x2f, 0x80, 0x80, 0x4b, 0xe0, 0x24, 0x01, 0xf6, 0x21,
+0xe3, 0x06, 0xe9, 0x05, 0x05, 0xef, 0x80, 0x20, 0xe3, 0x1e, 0xe8, 0x07, 0x97, 0xf9, 0x97, 0x3b,
+0x84, 0x23, 0x84, 0x05, 0xf4, 0x88, 0xcf, 0xdb, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78,
+0x44, 0x10, 0x00, 0xb1, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x00, 0x00, 0x9f,
+0x84, 0x20, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x90, 0x00, 0x20, 0x84, 0x60, 0x85, 0x40, 0x87, 0x85,
+0x14, 0x9f, 0x80, 0x05, 0x10, 0x3f, 0x80, 0x8d, 0x10, 0x3f, 0x80, 0x8c, 0x15, 0xcf, 0x80, 0x07,
+0x81, 0x2a, 0xd5, 0x63, 0x81, 0x49, 0xf1, 0x05, 0xa7, 0x98, 0x44, 0x80, 0x00, 0x20, 0x9a, 0xb1,
+0x54, 0x71, 0x00, 0x3f, 0x80, 0x1c, 0x80, 0x27, 0x50, 0x2f, 0x80, 0x84, 0x4c, 0x64, 0x40, 0x06,
+0x14, 0x9f, 0x80, 0x21, 0x80, 0xe6, 0xd5, 0x08, 0xf3, 0x81, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7,
+0x83, 0x00, 0xdd, 0x2f, 0xf3, 0x01, 0x05, 0xef, 0x80, 0x0c, 0x80, 0x1c, 0x40, 0x5f, 0x18, 0x00,
+0x54, 0x82, 0x80, 0x3f, 0x80, 0x28, 0x50, 0x2f, 0x80, 0x80, 0xf3, 0x81, 0x46, 0xf0, 0x00, 0x08,
+0x58, 0xf7, 0x83, 0x00, 0xdd, 0x2f, 0x04, 0x9f, 0x80, 0x21, 0xf5, 0x20, 0x40, 0x04, 0xa8, 0x06,
+0xf1, 0x0d, 0x56, 0x20, 0x00, 0x01, 0x40, 0x31, 0x04, 0x02, 0x40, 0x45, 0x14, 0x06, 0x40, 0x01,
+0x90, 0x02, 0xf3, 0x01, 0xc0, 0x04, 0xaf, 0x98, 0x81, 0x2a, 0xd5, 0x08, 0xe3, 0x25, 0xe8, 0x03,
+0xaf, 0xd8, 0xd5, 0x04, 0x10, 0x81, 0x80, 0x00, 0x81, 0x25, 0x08, 0x21, 0x80, 0x01, 0x80, 0x3c,
+0x84, 0x00, 0x51, 0xce, 0x00, 0x01, 0x84, 0xc2, 0xf3, 0x81, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7,
+0x82, 0xa0, 0xdd, 0x2f, 0xf3, 0x01, 0x4d, 0xc3, 0x7f, 0xaf, 0xf3, 0x07, 0x84, 0xff, 0x50, 0x81,
+0xff, 0xff, 0x40, 0xa4, 0x00, 0x10, 0x14, 0xaf, 0x80, 0x07, 0x4c, 0xa3, 0x80, 0x18, 0xf4, 0x05,
+0x41, 0xc2, 0x04, 0x09, 0x15, 0xcf, 0x80, 0x05, 0xf6, 0x07, 0x87, 0x80, 0xf0, 0x05, 0x56, 0x23,
+0x00, 0x05, 0x87, 0xc0, 0x80, 0x3c, 0x40, 0x5f, 0x08, 0x06, 0x40, 0x10, 0x08, 0x1b, 0xf5, 0x8d,
+0x50, 0x3f, 0x80, 0x8c, 0x81, 0x49, 0xf1, 0x8c, 0xd5, 0x8f, 0x04, 0x8f, 0x80, 0x06, 0xf1, 0x03,
+0x00, 0x4f, 0x80, 0x8c, 0x00, 0x3f, 0x80, 0x8d, 0x50, 0x90, 0x80, 0x01, 0x50, 0x74, 0x00, 0x02,
+0x85, 0x43, 0x14, 0x9f, 0x80, 0x03, 0x10, 0x44, 0x00, 0x00, 0x10, 0x34, 0x00, 0x01, 0xf7, 0x86,
+0x4c, 0x95, 0x7e, 0xdc, 0xf2, 0x08, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x00, 0xac, 0x80,
+0x85, 0x20, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78, 0xd5, 0x37, 0x44, 0x10, 0x00, 0xb0,
+0x44, 0x00, 0x00, 0x9e, 0xdd, 0x27, 0x80, 0x2a, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0x00, 0x24,
+0x00, 0x00, 0x44, 0x10, 0x00, 0xb1, 0x54, 0x41, 0x00, 0x3f, 0xf4, 0xa2, 0x44, 0x00, 0x00, 0x9e,
+0xdd, 0x27, 0xf1, 0x22, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0x00, 0x34, 0x00, 0x01, 0x44, 0x10,
+0x00, 0xb2, 0x54, 0x61, 0x80, 0x3f, 0xf6, 0xa2, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x27, 0xf1, 0x22,
+0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0x8d, 0x02, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8e, 0x16,
+0x8d, 0x41, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x4c, 0x82, 0xff, 0xd1, 0x8d, 0x24,
+0x45, 0xe0, 0x00, 0x10, 0x4c, 0x9f, 0x00, 0x08, 0x46, 0x80, 0x00, 0x0d, 0x58, 0x84, 0x0e, 0x10,
+0x81, 0x49, 0xd5, 0xc5, 0xf1, 0x02, 0x4e, 0x13, 0x00, 0x95, 0xf3, 0x0b, 0x46, 0x40, 0x04, 0x11,
+0x58, 0x42, 0x00, 0x04, 0xb6, 0x64, 0x46, 0x50, 0x04, 0x11, 0xf0, 0x0a, 0x58, 0x52, 0x83, 0xb8,
+0xb6, 0x05, 0x44, 0x00, 0x00, 0xf4, 0xf1, 0x02, 0xdd, 0x26, 0xf0, 0x02, 0x50, 0x2f, 0x80, 0x88,
+0x44, 0x10, 0x00, 0x1f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x04, 0x8f,
+0x80, 0x22, 0x44, 0x00, 0x00, 0x1f, 0x54, 0x74, 0x00, 0x9f, 0xf7, 0xa2, 0x80, 0x27, 0xdd, 0x26,
+0x84, 0x28, 0x44, 0x00, 0x00, 0x1f, 0xdd, 0x26, 0xf1, 0x02, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0xf1, 0x02, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x26,
+0xf0, 0x02, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01, 0x4c, 0x03, 0x7f, 0xfd, 0x84, 0x20, 0x46, 0x80,
+0x00, 0x06, 0x58, 0x84, 0x00, 0x78, 0x44, 0x00, 0x00, 0x15, 0x4b, 0xe0, 0x20, 0x01, 0x46, 0x20,
+0x04, 0x10, 0x84, 0xe0, 0x58, 0x21, 0x05, 0x04, 0xb6, 0xe2, 0x46, 0x00, 0x04, 0x10, 0xf5, 0x04,
+0x58, 0x00, 0x05, 0x0c, 0xb6, 0xa0, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0xf1, 0x09,
+0x80, 0x07, 0xb6, 0x22, 0x84, 0x21, 0xf2, 0x1f, 0xdd, 0x26, 0xf2, 0x1e, 0x84, 0x22, 0x80, 0x07,
+0xdd, 0x26, 0xf2, 0x1d, 0x44, 0x10, 0x00, 0x23, 0x80, 0x07, 0xdd, 0x26, 0xf2, 0x1c, 0x44, 0x10,
+0x00, 0x2a, 0x80, 0x07, 0xdd, 0x26, 0xf2, 0x1b, 0x80, 0x27, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x1a,
+0x84, 0x22, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x19, 0x44, 0x10, 0x00, 0x22, 0x84, 0x04, 0xdd, 0x26,
+0xf2, 0x18, 0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x17, 0x84, 0x24, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x16, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x15, 0x44, 0x10, 0x00, 0x12,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x14, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x13,
+0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0xf1, 0x12, 0x84, 0x04, 0x4b, 0xe0, 0x20, 0x01,
+0xec, 0x94, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc, 0xef, 0xf8, 0x84, 0x21,
+0x80, 0xe0, 0x44, 0x00, 0x00, 0x15, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x84, 0x20, 0xd5, 0x0a, 0x92, 0x00, 0x84, 0x07, 0x9c, 0x91, 0x4c, 0x20, 0x7f, 0xfd, 0x9c, 0x49,
+0x84, 0x6a, 0x4c, 0x11, 0x80, 0x04, 0x84, 0x40, 0xd5, 0xf6, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63,
+0x00, 0x78, 0x84, 0x20, 0x44, 0x00, 0x00, 0x15, 0x4b, 0xe0, 0x18, 0x01, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x9b, 0x44, 0x00, 0x00, 0x9f, 0x4b, 0xe0,
+0x18, 0x01, 0x44, 0x10, 0x00, 0x9b, 0xf1, 0x81, 0x50, 0x6f, 0x80, 0x04, 0x46, 0x80, 0x00, 0x05,
+0x58, 0x84, 0x0e, 0xf8, 0xd5, 0x12, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x91, 0x4c, 0x22, 0x7f, 0xfd,
+0x9c, 0x49, 0x84, 0x4a, 0x4c, 0x11, 0x00, 0x04, 0x84, 0x40, 0xd5, 0xf6, 0x84, 0x00, 0x44, 0x10,
+0x00, 0x9f, 0x80, 0x46, 0x4b, 0xe0, 0x20, 0x01, 0xf5, 0x01, 0x45, 0xe0, 0x00, 0x9b, 0x4c, 0x5f,
+0x40, 0x04, 0x84, 0x20, 0xd5, 0xf2, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x10,
+0x00, 0xba, 0x44, 0x00, 0x00, 0x9e, 0x4b, 0xe0, 0x18, 0x01, 0x44, 0x10, 0x00, 0x14, 0x44, 0x00,
+0x00, 0x9f, 0x4b, 0xe0, 0x18, 0x01, 0x46, 0x00, 0x04, 0x10, 0x58, 0x00, 0x00, 0x7c, 0xb4, 0x20,
+0x40, 0x20, 0xc0, 0x09, 0x4e, 0x14, 0x00, 0x05, 0x44, 0x3f, 0x00, 0x00, 0x98, 0x93, 0x44, 0x50,
+0x80, 0x00, 0x40, 0x40, 0x94, 0x02, 0x96, 0x49, 0xc4, 0x04, 0x45, 0xef, 0x00, 0x00, 0x88, 0x3e,
+0x42, 0x21, 0x08, 0x24, 0x42, 0x20, 0x84, 0x73, 0xb6, 0x47, 0xec, 0x08, 0x3a, 0x6f, 0xa0, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0x7c, 0x96, 0x00, 0xf0, 0x83, 0xc0, 0x08,
+0x84, 0x20, 0xf1, 0x87, 0xf1, 0x8a, 0xf1, 0x8b, 0xf1, 0x8c, 0x48, 0x00, 0x03, 0x9d, 0x46, 0x40,
+0x04, 0x11, 0x58, 0x42, 0x00, 0x04, 0xb5, 0x24, 0x46, 0x30, 0x04, 0x11, 0x14, 0x9f, 0x80, 0x0a,
+0x58, 0x31, 0x83, 0xb8, 0xb4, 0x43, 0x46, 0x70, 0x04, 0x10, 0xf2, 0x87, 0x58, 0x73, 0x85, 0x04,
+0xb4, 0x27, 0x46, 0x80, 0x04, 0x10, 0xf1, 0x8c, 0x58, 0x84, 0x05, 0x0c, 0x05, 0xef, 0x80, 0x03,
+0xb4, 0x08, 0x44, 0xa0, 0x00, 0x10, 0xf0, 0x8b, 0x15, 0xe2, 0x00, 0x00, 0xb7, 0x43, 0x50, 0x2f,
+0x80, 0x44, 0xf0, 0x03, 0x84, 0x24, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f,
+0xf5, 0x11, 0x46, 0x90, 0x00, 0x06, 0x58, 0x94, 0x80, 0x78, 0x54, 0x12, 0x80, 0xe7, 0x84, 0x04,
+0x4b, 0xe0, 0x24, 0x01, 0xf0, 0x03, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce, 0x0d, 0xb8, 0x84, 0x21,
+0x50, 0x2f, 0x80, 0x78, 0xdd, 0x3c, 0xf0, 0x03, 0x84, 0x22, 0x50, 0x2f, 0x80, 0x74, 0xdd, 0x3c,
+0xf0, 0x03, 0x44, 0x10, 0x00, 0x23, 0x50, 0x2f, 0x80, 0x70, 0xdd, 0x3c, 0xf0, 0x03, 0x44, 0x10,
+0x00, 0x2a, 0x50, 0x2f, 0x80, 0x6c, 0xdd, 0x3c, 0xf1, 0x03, 0x50, 0x2f, 0x80, 0x68, 0x84, 0x04,
+0xdd, 0x3c, 0x84, 0x22, 0x50, 0x2f, 0x80, 0x64, 0x84, 0x04, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x22,
+0x50, 0x2f, 0x80, 0x60, 0x84, 0x04, 0xdd, 0x3c, 0x84, 0x23, 0x50, 0x2f, 0x80, 0x5c, 0x84, 0x05,
+0xdd, 0x3c, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x58, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x11,
+0x50, 0x2f, 0x80, 0x54, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f, 0x80, 0x50,
+0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x4c, 0x84, 0x05, 0xdd, 0x3c,
+0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x48, 0x84, 0x05, 0xdd, 0x3c, 0xf0, 0x03, 0x46, 0x60,
+0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0x84, 0x21, 0x44, 0x20, 0x00, 0x21, 0xdd, 0x26, 0xf0, 0x03,
+0x80, 0x4a, 0x84, 0x22, 0xdd, 0x26, 0xf0, 0x03, 0x44, 0x10, 0x00, 0x23, 0x80, 0x40, 0xdd, 0x26,
+0xf0, 0x03, 0x44, 0x10, 0x00, 0x2a, 0x44, 0x20, 0x00, 0x1b, 0xdd, 0x26, 0xf1, 0x03, 0x44, 0x20,
+0x00, 0x81, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x22, 0x44, 0x20, 0x00, 0x81, 0x84, 0x04, 0xdd, 0x26,
+0x44, 0x10, 0x00, 0x22, 0x44, 0x20, 0x00, 0xee, 0x84, 0x04, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x11,
+0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x12, 0x44, 0x20, 0x00, 0xd7,
+0x84, 0x05, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0xa2, 0x84, 0x05, 0xdd, 0x26,
+0x44, 0x20, 0x00, 0x20, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0xf1, 0x03, 0x44, 0x00,
+0x00, 0x17, 0x4b, 0xe0, 0x24, 0x01, 0xf2, 0x03, 0x46, 0x30, 0x00, 0xcf, 0x58, 0x31, 0x88, 0xb0,
+0x44, 0x45, 0x20, 0x00, 0xb6, 0x47, 0xb6, 0x88, 0xb6, 0x67, 0xf3, 0x03, 0x92, 0x00, 0x84, 0xe7,
+0x9c, 0xd9, 0x4c, 0x33, 0xff, 0xfd, 0x46, 0x80, 0x04, 0x10, 0x58, 0x84, 0x05, 0x0c, 0x44, 0x65,
+0x20, 0x1e, 0xb6, 0xc8, 0x84, 0x60, 0x92, 0x00, 0x85, 0x47, 0x9c, 0xd9, 0x4c, 0x35, 0x7f, 0xfd,
+0x47, 0xc0, 0x04, 0x10, 0x59, 0xce, 0x05, 0x0c, 0x44, 0x55, 0x20, 0x3e, 0xb6, 0xbc, 0x84, 0x60,
+0x92, 0x00, 0x84, 0x87, 0x9c, 0xd9, 0x4c, 0x32, 0x7f, 0xfd, 0x46, 0x90, 0x00, 0x06, 0x58, 0x94,
+0x80, 0x78, 0x84, 0x24, 0x44, 0x00, 0x00, 0x17, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x14, 0x44, 0x00,
+0x00, 0xf1, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0xf2, 0xdd, 0x29, 0x44, 0x10,
+0x00, 0x31, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x29, 0x44, 0x10, 0x00, 0xb0, 0x44, 0x00, 0x00, 0x9e,
+0xdd, 0x29, 0x44, 0x10, 0x00, 0x80, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x29, 0x46, 0x80, 0x00, 0x05,
+0x58, 0x84, 0x0e, 0xf8, 0x50, 0x2f, 0x80, 0x40, 0x44, 0x10, 0x00, 0x1f, 0x84, 0x00, 0x4b, 0xe0,
+0x20, 0x01, 0xf1, 0x10, 0x44, 0x00, 0x00, 0x1f, 0x58, 0x20, 0x80, 0x60, 0xf2, 0x9f, 0x80, 0x22,
+0xdd, 0x29, 0x84, 0x25, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x84, 0x24, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x29, 0x84, 0x23, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x50, 0x2f, 0x80, 0x7c, 0x44, 0x10,
+0x00, 0x9f, 0x84, 0x00, 0x4b, 0xe0, 0x20, 0x01, 0xf3, 0x1f, 0x44, 0x00, 0x00, 0x9f, 0x58, 0x11,
+0x80, 0x60, 0xdd, 0x29, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0x70, 0x84, 0x23, 0x44, 0x20,
+0x00, 0x3c, 0x84, 0x05, 0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x20, 0x00, 0x3c, 0x84, 0x24, 0x84, 0x05,
+0x4b, 0xe0, 0x1c, 0x01, 0x44, 0x10, 0x00, 0x28, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x44, 0x00,
+0x00, 0x9f, 0x84, 0x20, 0xdd, 0x29, 0x46, 0x30, 0x00, 0x0d, 0x58, 0x31, 0x8e, 0x00, 0x22, 0x41,
+0x80, 0x00, 0x4e, 0x44, 0x00, 0x04, 0x84, 0x80, 0xd5, 0x05, 0xe4, 0x93, 0xe9, 0x42, 0x44, 0x40,
+0x00, 0x12, 0xad, 0x18, 0xd5, 0x3e, 0x46, 0x40, 0x00, 0x0a, 0x58, 0x42, 0x0f, 0xbc, 0x38, 0x22,
+0x08, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x22, 0x54, 0x00, 0x00,
+0x47, 0xe0, 0x00, 0x0a, 0x59, 0xef, 0x0f, 0xbc, 0x38, 0x2f, 0x14, 0x00, 0x84, 0x24, 0x84, 0x05,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0x70, 0xdd, 0x2f, 0x44, 0x10, 0x00, 0x29, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x21, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x29, 0x80, 0x07,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0x29, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x9f, 0xdd, 0x29, 0x80, 0x06, 0xdd, 0x3c, 0xf0, 0x0f, 0xe3, 0x40, 0xe9, 0x24, 0xf3, 0x0e,
+0xe3, 0x43, 0xe9, 0x21, 0x02, 0x14, 0x00, 0x00, 0x9c, 0x8a, 0x12, 0x24, 0x00, 0x00, 0xd5, 0x15,
+0x46, 0xa0, 0x05, 0xf5, 0x58, 0xa5, 0x0e, 0x10, 0x46, 0x80, 0x00, 0x0d, 0x58, 0x84, 0x0e, 0x00,
+0x46, 0x90, 0x00, 0x06, 0x58, 0x94, 0x80, 0x78, 0x50, 0x7f, 0x80, 0x3c, 0x47, 0xc0, 0x00, 0x08,
+0x59, 0xce, 0x0b, 0x18, 0x50, 0x6f, 0x80, 0x38, 0x22, 0x24, 0x00, 0x00, 0x84, 0x23, 0x84, 0x05,
+0xe4, 0x53, 0xe9, 0xaa, 0x85, 0x40, 0x85, 0x25, 0x45, 0xc0, 0x00, 0x20, 0x84, 0x00, 0x46, 0x70,
+0x00, 0x0d, 0x58, 0x73, 0x8e, 0x0c, 0x14, 0x9f, 0x80, 0x05, 0x15, 0xcf, 0x80, 0x06, 0x14, 0xaf,
+0x80, 0x04, 0xae, 0x38, 0x50, 0x2f, 0x80, 0x38, 0x50, 0x5f, 0x80, 0x3c, 0x81, 0x2a, 0x83, 0x8a,
+0x48, 0x00, 0x00, 0xf4, 0x14, 0x9f, 0x80, 0x04, 0x84, 0x61, 0x4c, 0xa1, 0x80, 0x17, 0x05, 0xef,
+0x80, 0x05, 0x5e, 0xff, 0x00, 0x04, 0x4e, 0xf2, 0x00, 0xd7, 0x46, 0x80, 0x00, 0x0d, 0x58, 0x84,
+0x0e, 0x0c, 0x00, 0x94, 0x00, 0x00, 0x04, 0x8f, 0x80, 0x09, 0x54, 0x14, 0x80, 0x0f, 0x56, 0x40,
+0x80, 0x08, 0x40, 0x02, 0x0c, 0x06, 0xd5, 0x09, 0x54, 0x64, 0x80, 0x3f, 0x56, 0x33, 0x00, 0x20,
+0x04, 0x8f, 0x80, 0x08, 0x5c, 0x01, 0x80, 0x01, 0xc0, 0x05, 0x15, 0xcf, 0x80, 0x0f, 0x80, 0xe9,
+0xd5, 0x39, 0xf0, 0x06, 0x40, 0x74, 0x80, 0x01, 0x96, 0xf8, 0x4e, 0xa3, 0x00, 0x12, 0x44, 0x10,
+0x00, 0x28, 0x44, 0x00, 0x00, 0x9e, 0xf2, 0x81, 0xb6, 0xbf, 0x54, 0x71, 0x80, 0x0f, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf, 0xd5, 0x10, 0x44, 0x00,
+0x00, 0x9e, 0x44, 0x10, 0x00, 0x29, 0xf2, 0x81, 0xb6, 0xbf, 0x54, 0x71, 0x80, 0x3f, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xb4, 0xbf, 0xf2, 0x01, 0x80, 0x27, 0x44, 0x00,
+0x00, 0x9f, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0xb4, 0xbf, 0x80, 0x05, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x8b, 0x18, 0xdd, 0x2f, 0xb4, 0xbf,
+0xf2, 0x01, 0xf1, 0x06, 0x84, 0x80, 0x40, 0x40, 0xa0, 0x1a, 0x41, 0xe2, 0x24, 0x00, 0x54, 0x3f,
+0x00, 0xff, 0x4e, 0xa3, 0x00, 0x12, 0x44, 0x10, 0x00, 0x28, 0x44, 0x00, 0x00, 0x9e, 0xf2, 0x81,
+0xb6, 0xbf, 0x54, 0x61, 0x80, 0x0f, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0xf2, 0x01, 0xb4, 0xbf, 0xd5, 0x10, 0x44, 0x00, 0x00, 0x9e, 0x44, 0x10, 0x00, 0x29, 0xf2, 0x81,
+0xb6, 0xbf, 0x54, 0x61, 0x80, 0x3f, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0xb4, 0xbf, 0xf2, 0x01, 0x80, 0x26, 0x44, 0x00, 0x00, 0x9f, 0xb6, 0xbf, 0xf2, 0x81, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf2, 0x01, 0x80, 0x02, 0x46, 0xf0, 0x00, 0x08,
+0x58, 0xf7, 0x8b, 0x18, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf, 0x4e, 0x83, 0x00, 0x09, 0xf3, 0x0f,
+0xe2, 0x7c, 0xe9, 0x05, 0xf0, 0x0e, 0x40, 0xfe, 0x00, 0x06, 0xe9, 0x0a, 0xf3, 0x0f, 0x05, 0xcf,
+0x80, 0x0e, 0xe2, 0x7c, 0xe8, 0x04, 0x83, 0x83, 0x81, 0x27, 0xd5, 0x02, 0x81, 0x26, 0x4e, 0xa3,
+0x00, 0x10, 0x44, 0x10, 0x00, 0x28, 0x44, 0x00, 0x00, 0x9e, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf, 0xd5, 0x0e, 0x44, 0x00,
+0x00, 0x9e, 0x44, 0x10, 0x00, 0x29, 0xf2, 0x81, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7,
+0x80, 0x78, 0xdd, 0x2f, 0xb4, 0xbf, 0xf2, 0x01, 0x44, 0x00, 0x00, 0x9f, 0x80, 0x29, 0xf2, 0x81,
+0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0xf2, 0x01, 0xb4, 0xbf,
+0x4e, 0xa3, 0x00, 0x0a, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x0c, 0x10, 0x93, 0x00, 0x00,
+0x04, 0x9f, 0x80, 0x04, 0x8d, 0x41, 0x54, 0xa5, 0x00, 0xff, 0x84, 0xe2, 0x4c, 0xa3, 0xff, 0x1c,
+0xf1, 0x05, 0x9f, 0x09, 0x41, 0xe2, 0x00, 0x10, 0x15, 0xef, 0x80, 0x05, 0x4f, 0xe2, 0x00, 0x18,
+0xf0, 0x06, 0x40, 0x30, 0x04, 0x09, 0xf3, 0x86, 0x05, 0xef, 0x80, 0x05, 0x14, 0x9f, 0x80, 0x04,
+0x56, 0x4f, 0x00, 0x05, 0x56, 0x7f, 0x00, 0x03, 0x5c, 0xa2, 0x00, 0x01, 0x5c, 0x63, 0x80, 0x01,
+0x14, 0xaf, 0x80, 0x08, 0xf6, 0x89, 0x85, 0x40, 0x48, 0xff, 0xff, 0x00, 0x44, 0x00, 0x00, 0x17,
+0x84, 0x27, 0x14, 0x9f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x46, 0x20, 0x00, 0x0d, 0x58, 0x21, 0x0e, 0x0c, 0xa7, 0x50, 0x80, 0xdc, 0x55, 0xc2, 0x80, 0x08,
+0x54, 0x32, 0x80, 0x0f, 0x4f, 0xc2, 0x00, 0x05, 0x50, 0x11, 0xff, 0xf0, 0x96, 0xca, 0x84, 0x04,
+0x42, 0x31, 0x80, 0x01, 0x5e, 0xf1, 0xff, 0xf9, 0xe8, 0x04, 0x84, 0x78, 0xf3, 0x86, 0xd5, 0x04,
+0x9f, 0x19, 0x97, 0xe2, 0xf7, 0x86, 0x05, 0xcf, 0x80, 0x04, 0x55, 0xee, 0x00, 0x20, 0x54, 0x3e,
+0x00, 0x3f, 0x4f, 0xe2, 0x00, 0x05, 0x50, 0x51, 0xff, 0xc0, 0x96, 0xea, 0x44, 0x20, 0x00, 0x1c,
+0x42, 0x31, 0x88, 0x01, 0x5e, 0xf1, 0xff, 0xe1, 0xe8, 0x04, 0x44, 0x3f, 0xff, 0xe0, 0xd5, 0x03,
+0x9e, 0x59, 0x96, 0xca, 0xf3, 0x85, 0xf3, 0x06, 0xf7, 0x05, 0x87, 0xc0, 0x9d, 0x1b, 0x9c, 0x3b,
+0x15, 0xef, 0x80, 0x08, 0xf4, 0x89, 0xf0, 0x8d, 0x50, 0x2f, 0x80, 0x3c, 0x83, 0x83, 0xd5, 0x5f,
+0xf2, 0x81, 0xf4, 0x82, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x80, 0x2a, 0x44, 0x00, 0x00, 0x9f, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f,
+0x44, 0x10, 0x00, 0x29, 0x44, 0x00, 0x00, 0x9e, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78,
+0xdd, 0x2f, 0x80, 0x26, 0x44, 0x00, 0x00, 0x9f, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0x78,
+0xdd, 0x2f, 0xf5, 0x01, 0x80, 0x05, 0x46, 0xf0, 0x00, 0x08, 0x58, 0xf7, 0x8b, 0x18, 0xdd, 0x2f,
+0xb4, 0xbf, 0xf1, 0x06, 0xf2, 0x01, 0xf4, 0x02, 0xd9, 0x09, 0xf3, 0x05, 0x4c, 0x81, 0xc0, 0x07,
+0x10, 0xa2, 0x00, 0x00, 0xf6, 0x84, 0xf0, 0x0f, 0xd5, 0x0c, 0xf0, 0x0f, 0xe2, 0x09, 0xe9, 0x03,
+0x80, 0x09, 0xd5, 0x07, 0x54, 0x93, 0x80, 0x3f, 0x10, 0xa2, 0x00, 0x00, 0x14, 0x9f, 0x80, 0x04,
+0x8d, 0x01, 0x40, 0x84, 0x00, 0x10, 0x51, 0xce, 0x00, 0x01, 0x81, 0x20, 0x05, 0xef, 0x80, 0x05,
+0x54, 0x74, 0x00, 0xff, 0x40, 0x3e, 0x78, 0x00, 0x05, 0xef, 0x80, 0x0d, 0x44, 0x10, 0x00, 0x28,
+0x44, 0x00, 0x00, 0x9e, 0x54, 0x63, 0x80, 0x3f, 0x40, 0xff, 0x0c, 0x07, 0xe8, 0xaa, 0xf7, 0x08,
+0x9d, 0x29, 0x9c, 0x39, 0xf0, 0x88, 0x80, 0xc9, 0x41, 0xc2, 0x00, 0x10, 0x05, 0xef, 0x80, 0x08,
+0xf3, 0x06, 0xf1, 0x09, 0x40, 0x5f, 0x0c, 0x00, 0xe0, 0x25, 0xe9, 0x0f, 0x54, 0x9e, 0x00, 0x0f,
+0x85, 0x40, 0x80, 0xbc, 0x04, 0x8f, 0x80, 0x05, 0x83, 0x8a, 0x46, 0x40, 0x00, 0x0d, 0x58, 0x42,
+0x0e, 0x0c, 0x81, 0x49, 0x81, 0x26, 0xd5, 0xd3, 0xf6, 0x04, 0x46, 0x20, 0x00, 0x0d, 0x58, 0x21,
+0x0e, 0x0d, 0xaf, 0x90, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x10, 0x00, 0x28,
+0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8e, 0x0c, 0xa7, 0x28,
+0x44, 0x00, 0x00, 0x9f, 0x54, 0x12, 0x00, 0x0f, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x29, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x26, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x0d, 0xa7, 0xc0, 0x44, 0x00,
+0x00, 0x9f, 0x54, 0x13, 0x80, 0x3f, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26,
+0x84, 0x20, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0xf4, 0xdd, 0x26,
+0x44, 0x00, 0x00, 0x15, 0x84, 0x21, 0xdd, 0x26, 0x84, 0x60, 0x92, 0x00, 0x84, 0x27, 0x9c, 0xd9,
+0x4c, 0x30, 0xff, 0xfd, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78, 0x44, 0x00, 0x00, 0x15,
+0x84, 0x20, 0xdd, 0x27, 0xf3, 0x03, 0xcb, 0x6e, 0x05, 0xef, 0x80, 0x0a, 0x46, 0x30, 0x04, 0x11,
+0x58, 0x31, 0x80, 0x04, 0x15, 0xe1, 0x80, 0x00, 0x46, 0x50, 0x04, 0x11, 0xf1, 0x07, 0x58, 0x52,
+0x83, 0xb8, 0xb6, 0x25, 0x46, 0x20, 0x04, 0x10, 0xf0, 0x03, 0x58, 0x21, 0x05, 0x04, 0xb6, 0x02,
+0x46, 0x40, 0x04, 0x10, 0xf6, 0x0b, 0x58, 0x42, 0x05, 0x0c, 0xb6, 0xc4, 0x44, 0x10, 0x00, 0xb0,
+0x05, 0xef, 0x80, 0x0c, 0x44, 0x00, 0x00, 0x9e, 0x15, 0xe1, 0x00, 0x00, 0x46, 0x60, 0x00, 0x05,
+0x58, 0x63, 0x0e, 0x70, 0xdd, 0x27, 0xf1, 0x03, 0x44, 0x00, 0x00, 0x9f, 0xdd, 0x27, 0xf1, 0x10,
+0x44, 0x00, 0x00, 0x1f, 0xdd, 0x27, 0xf2, 0x1e, 0xf0, 0x03, 0x84, 0x21, 0xdd, 0x26, 0xf2, 0x1d,
+0xf0, 0x03, 0x84, 0x22, 0xdd, 0x26, 0xf2, 0x1c, 0xf0, 0x03, 0x44, 0x10, 0x00, 0x23, 0xdd, 0x26,
+0xf2, 0x1b, 0xf0, 0x03, 0x44, 0x10, 0x00, 0x2a, 0xdd, 0x26, 0xf2, 0x1a, 0xf1, 0x03, 0x84, 0x04,
+0xdd, 0x26, 0xf2, 0x19, 0x84, 0x22, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x18, 0x44, 0x10, 0x00, 0x22,
+0x84, 0x04, 0xdd, 0x26, 0xf2, 0x17, 0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x16, 0x84, 0x24,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x15, 0x44, 0x10, 0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x14,
+0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x13, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05,
+0xdd, 0x26, 0xf2, 0x12, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x26, 0xf1, 0x11, 0x84, 0x04,
+0xdd, 0x27, 0xec, 0x84, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0x94, 0x46, 0x60, 0x00, 0x0a, 0x58, 0x63, 0x0f, 0xe0, 0x96, 0x40, 0xf1, 0x82, 0x3a, 0x03,
+0x08, 0x00, 0x50, 0x5f, 0x80, 0x2c, 0x80, 0x65, 0x3a, 0x01, 0x84, 0x24, 0x40, 0x41, 0x40, 0x09,
+0xf0, 0x02, 0xac, 0x98, 0x10, 0x4f, 0x80, 0x36, 0xc0, 0x06, 0x84, 0x40, 0xf2, 0x87, 0xf2, 0x89,
+0x48, 0x00, 0x02, 0x9d, 0x46, 0x70, 0x04, 0x10, 0x58, 0x73, 0x85, 0x0c, 0xb4, 0x87, 0x46, 0x80,
+0x04, 0x10, 0xf4, 0x89, 0x58, 0x84, 0x05, 0x04, 0x05, 0xe4, 0x00, 0x00, 0xf1, 0x02, 0x15, 0xef,
+0x80, 0x07, 0x47, 0xc0, 0x00, 0x05, 0x59, 0xce, 0x0d, 0xb8, 0x50, 0x2f, 0x80, 0x64, 0x84, 0x04,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x60, 0x84, 0x04, 0xdd, 0x3c, 0x44, 0x10,
+0x00, 0x11, 0x50, 0x2f, 0x80, 0x5c, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x12, 0x50, 0x2f,
+0x80, 0x58, 0x84, 0x05, 0xdd, 0x3c, 0x44, 0x10, 0x00, 0x13, 0x50, 0x2f, 0x80, 0x54, 0x84, 0x05,
+0xdd, 0x3c, 0x44, 0x10, 0x00, 0x14, 0x50, 0x2f, 0x80, 0x50, 0x84, 0x05, 0xdd, 0x3c, 0x84, 0x23,
+0x50, 0x2f, 0x80, 0x4c, 0x84, 0x05, 0xdd, 0x3c, 0x84, 0x24, 0x50, 0x2f, 0x80, 0x48, 0x84, 0x05,
+0xdd, 0x3c, 0xf1, 0x02, 0x46, 0xa0, 0x00, 0x05, 0x58, 0xa5, 0x0e, 0x70, 0x44, 0x20, 0x00, 0x87,
+0x84, 0x04, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x24, 0x84, 0x04, 0xdd, 0x2a,
+0x44, 0x10, 0x00, 0x11, 0x44, 0x20, 0x00, 0x80, 0x84, 0x05, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x12,
+0x44, 0x20, 0x00, 0xc1, 0x84, 0x05, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x13, 0x44, 0x20, 0x00, 0x60,
+0x84, 0x05, 0xdd, 0x2a, 0xf2, 0x02, 0x44, 0x10, 0x00, 0x14, 0x84, 0x05, 0xdd, 0x2a, 0x84, 0x23,
+0x44, 0x20, 0x00, 0x3c, 0x84, 0x05, 0xdd, 0x2a, 0x84, 0x24, 0x44, 0x20, 0x00, 0x3c, 0x84, 0x05,
+0xdd, 0x2a, 0xf0, 0x02, 0x46, 0x90, 0x00, 0x05, 0x58, 0x94, 0x8e, 0xf8, 0x44, 0x10, 0x00, 0x17,
+0x50, 0x2f, 0x80, 0x40, 0x4b, 0xe0, 0x24, 0x01, 0xf0, 0x02, 0x50, 0x2f, 0x80, 0x44, 0x84, 0x24,
+0x4b, 0xe0, 0x24, 0x01, 0xf1, 0x02, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x84, 0x04,
+0x4b, 0xe0, 0x18, 0x01, 0xf1, 0x02, 0x44, 0x00, 0x00, 0x17, 0x4b, 0xe0, 0x18, 0x01, 0x47, 0xc0,
+0x00, 0x92, 0xf0, 0x02, 0x46, 0xa0, 0x00, 0xdf, 0x46, 0x90, 0x00, 0x92, 0x58, 0xa5, 0x08, 0x38,
+0x58, 0x94, 0x80, 0x10, 0xb6, 0x08, 0x15, 0xc3, 0x80, 0x00, 0xb7, 0x48, 0xb7, 0x27, 0xf3, 0x02,
+0x92, 0x00, 0x84, 0xa7, 0x9c, 0xd9, 0xdb, 0xfd, 0x46, 0x30, 0x04, 0x10, 0x46, 0x10, 0x00, 0x92,
+0x58, 0x31, 0x85, 0x0c, 0x58, 0x10, 0x80, 0x30, 0xb6, 0x23, 0x84, 0x60, 0x92, 0x00, 0x84, 0x47,
+0x9c, 0xd9, 0x4c, 0x31, 0x7f, 0xfd, 0x46, 0x70, 0x04, 0x10, 0x46, 0x80, 0x00, 0x92, 0x58, 0x73,
+0x85, 0x0c, 0x58, 0x84, 0x00, 0x38, 0xb7, 0x07, 0x84, 0x60, 0x92, 0x00, 0x84, 0x07, 0x9c, 0xd9,
+0x4c, 0x30, 0x7f, 0xfd, 0x46, 0x90, 0x00, 0x06, 0x58, 0x94, 0x80, 0x78, 0x84, 0x22, 0x44, 0x00,
+0x00, 0x17, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x14, 0x44, 0x00, 0x00, 0xf1, 0xdd, 0x29, 0x44, 0x10,
+0x00, 0x80, 0x44, 0x00, 0x00, 0xf2, 0xdd, 0x29, 0x44, 0x10, 0x00, 0x31, 0x44, 0x00, 0x00, 0xf4,
+0xdd, 0x29, 0x84, 0x25, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9f,
+0xdd, 0x29, 0x85, 0x40, 0x84, 0x23, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x29, 0x14, 0xaf, 0x80, 0x03,
+0x44, 0x00, 0x00, 0x9f, 0x44, 0x10, 0x00, 0x60, 0xdd, 0x29, 0xf6, 0x03, 0x50, 0x5f, 0x80, 0x38,
+0xf6, 0x88, 0xf6, 0x86, 0xf6, 0x85, 0xf6, 0x84, 0x81, 0x26, 0x51, 0xef, 0x80, 0x2c, 0x38, 0x8f,
+0x24, 0x00, 0x84, 0x23, 0x80, 0x48, 0x84, 0x05, 0xb6, 0xbf, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0x70, 0xdd, 0x2f, 0x80, 0x48, 0x84, 0x24, 0x84, 0x05, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8e, 0x70, 0xdd, 0x2f, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x78, 0x84, 0x20, 0x44, 0x00,
+0x00, 0x9e, 0x4b, 0xe0, 0x1c, 0x01, 0x45, 0xc0, 0x00, 0x93, 0x44, 0x00, 0x00, 0x9f, 0x44, 0x10,
+0x00, 0x93, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0xf8, 0x15, 0xcf,
+0x80, 0x0f, 0xd5, 0x14, 0x92, 0x00, 0x84, 0x87, 0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd, 0x9c, 0x49,
+0x84, 0x6a, 0x4c, 0x11, 0x80, 0x04, 0x84, 0x00, 0xd5, 0xf6, 0xb6, 0xbf, 0x84, 0x00, 0x44, 0x10,
+0x00, 0x9f, 0x50, 0x2f, 0x80, 0x3c, 0x4b, 0xe0, 0x18, 0x01, 0xf2, 0x0f, 0x44, 0x10, 0x00, 0x93,
+0xb4, 0xbf, 0x4c, 0x20, 0xc0, 0x04, 0x84, 0x20, 0xd5, 0xef, 0x87, 0x80, 0x46, 0xa0, 0x00, 0x06,
+0x58, 0xa5, 0x00, 0x78, 0x44, 0x40, 0x10, 0x00, 0x87, 0xc0, 0x15, 0xef, 0x80, 0x0e, 0xb6, 0xbf,
+0xf4, 0x81, 0x44, 0x10, 0x00, 0x1e, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a, 0x80, 0x3c, 0x44, 0x00,
+0x00, 0x9f, 0xdd, 0x2a, 0x44, 0x10, 0x00, 0x22, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x2a, 0xb5, 0x1f,
+0x46, 0x20, 0x00, 0x0a, 0x58, 0x21, 0x0f, 0x1c, 0xb4, 0x02, 0x44, 0x10, 0x00, 0x9f, 0x80, 0x48,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf3, 0x0e, 0x44, 0x10, 0x00, 0x21,
+0x44, 0x00, 0x00, 0x9e, 0x40, 0x81, 0xe0, 0x08, 0xdd, 0x2a, 0x46, 0x40, 0x00, 0x0a, 0x58, 0x42,
+0x0f, 0x1c, 0xb4, 0xff, 0xb4, 0x04, 0x80, 0x47, 0x44, 0x10, 0x00, 0x9f, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x44, 0x10, 0x00, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xf6, 0x0e,
+0xdd, 0x2a, 0x46, 0x50, 0x00, 0x0a, 0x58, 0x52, 0x8f, 0x1c, 0xb4, 0x3f, 0xb4, 0x05, 0x80, 0x41,
+0x44, 0x10, 0x00, 0x9f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf2, 0x0e,
+0x44, 0x10, 0x00, 0x1f, 0x44, 0x00, 0x00, 0x9e, 0x40, 0x73, 0x40, 0x08, 0x40, 0x61, 0x20, 0x08,
+0xdd, 0x2a, 0x46, 0x30, 0x00, 0x0a, 0x58, 0x31, 0x8f, 0x1c, 0xb4, 0x9f, 0xb4, 0x03, 0x80, 0x44,
+0x44, 0x10, 0x00, 0x9f, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0x40, 0x04,
+0x1c, 0x00, 0x04, 0x8f, 0x80, 0x0e, 0x54, 0x3e, 0x00, 0xff, 0x40, 0x50, 0x20, 0x00, 0x98, 0xae,
+0xf4, 0x01, 0xb4, 0xbf, 0xe6, 0x62, 0xe8, 0x10, 0x46, 0x10, 0x08, 0x00, 0x40, 0x01, 0x04, 0x02,
+0xc0, 0x10, 0x46, 0x80, 0x0f, 0xff, 0x58, 0x84, 0x0f, 0xff, 0x46, 0x7f, 0xf0, 0x00, 0x40, 0x61,
+0x20, 0x02, 0x98, 0x37, 0xd5, 0x07, 0x87, 0xc4, 0x4c, 0x3f, 0x40, 0x04, 0x80, 0x02, 0xd5, 0x1d,
+0x80, 0x02, 0xcb, 0x05, 0x40, 0x30, 0x10, 0x16, 0xf3, 0x84, 0xd5, 0x1b, 0x84, 0x21, 0x4c, 0x30,
+0xc0, 0x06, 0x40, 0x20, 0x10, 0x16, 0xf2, 0x85, 0xd5, 0x14, 0x84, 0xc2, 0x4c, 0x33, 0x40, 0x06,
+0x40, 0x01, 0x30, 0x09, 0xf0, 0x86, 0xd5, 0x0d, 0x84, 0xe3, 0x4c, 0x33, 0xc0, 0x07, 0x40, 0x81,
+0x30, 0x09, 0x14, 0x8f, 0x80, 0x08, 0xd5, 0x05, 0x41, 0xe0, 0x10, 0x16, 0x15, 0xef, 0x80, 0x03,
+0x51, 0xce, 0x00, 0x01, 0x84, 0x65, 0x4d, 0xc1, 0xff, 0x59, 0xf1, 0x06, 0xf4, 0x04, 0x42, 0x12,
+0x10, 0x75, 0xf1, 0x8f, 0x5c, 0xf0, 0xa7, 0x10, 0xe8, 0x38, 0x5c, 0xf0, 0x80, 0x65, 0xe8, 0x04,
+0x50, 0x04, 0x80, 0x09, 0xd5, 0x2d, 0x5c, 0xf0, 0x80, 0x9f, 0xe8, 0x04, 0x50, 0x04, 0x80, 0x08,
+0xd5, 0x27, 0x5c, 0xf0, 0x80, 0xfc, 0xe8, 0x04, 0x50, 0x04, 0x80, 0x07, 0xd5, 0x21, 0x5c, 0xf0,
+0x81, 0x8f, 0xe8, 0x04, 0x50, 0x04, 0x80, 0x06, 0xd5, 0x1b, 0x5c, 0xf0, 0x82, 0x77, 0xe8, 0x04,
+0x50, 0x04, 0x80, 0x05, 0xd5, 0x15, 0x5c, 0xf0, 0x83, 0xe9, 0xe8, 0x04, 0x50, 0x04, 0x80, 0x04,
+0xd5, 0x0f, 0x5c, 0xf0, 0x86, 0x31, 0xe8, 0x04, 0x50, 0x04, 0x80, 0x03, 0xd5, 0x09, 0x5c, 0xf0,
+0x89, 0xd0, 0xe8, 0x04, 0x50, 0x04, 0x80, 0x02, 0xd5, 0x03, 0x50, 0x04, 0x80, 0x01, 0x54, 0x90,
+0x00, 0xff, 0xe7, 0x2b, 0x4e, 0xf3, 0xfe, 0xcb, 0xf0, 0x04, 0xf6, 0x06, 0x44, 0x80, 0x00, 0x64,
+0x42, 0x60, 0x00, 0x75, 0x46, 0x70, 0x00, 0x06, 0x58, 0x73, 0x80, 0x5c, 0x42, 0x03, 0x20, 0x24,
+0x4b, 0xe0, 0x1c, 0x01, 0xf1, 0x08, 0xf2, 0x05, 0x80, 0xc0, 0x42, 0x11, 0x08, 0x75, 0x42, 0x00,
+0xa0, 0x24, 0x4b, 0xe0, 0x1c, 0x01, 0x50, 0x53, 0x7c, 0x18, 0x80, 0x60, 0x5c, 0xf2, 0x81, 0x91,
+0xe8, 0x48, 0x9b, 0x30, 0x5e, 0xf2, 0x00, 0x71, 0xe8, 0x44, 0x5e, 0xf2, 0x7f, 0x90, 0xe9, 0x41,
+0xf0, 0x04, 0x51, 0xe0, 0x00, 0x20, 0x5c, 0xff, 0x00, 0x41, 0xe8, 0x3b, 0xf1, 0x05, 0x50, 0x40,
+0x80, 0x20, 0x5c, 0xf2, 0x00, 0x41, 0xe8, 0x35, 0x44, 0x70, 0x03, 0xe8, 0x42, 0x21, 0x9c, 0x24,
+0x04, 0x8f, 0x80, 0x03, 0x44, 0x50, 0x59, 0x88, 0x42, 0x80, 0x80, 0x75, 0x40, 0x01, 0x18, 0x96,
+0x42, 0x84, 0x14, 0x24, 0x42, 0x41, 0x98, 0x24, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8e, 0x08,
+0x46, 0x30, 0x00, 0x0d, 0x58, 0x31, 0x8e, 0x04, 0x51, 0xe0, 0x7c, 0x18, 0x40, 0x24, 0x10, 0xd6,
+0x50, 0x70, 0x03, 0xe8, 0x40, 0x6f, 0x20, 0x08, 0x40, 0x43, 0x1c, 0xf6, 0x50, 0x11, 0x00, 0x0c,
+0xb6, 0x45, 0xb6, 0x83, 0xe6, 0x39, 0xe9, 0x03, 0x84, 0x20, 0xb6, 0x25, 0x9c, 0xe7, 0xe6, 0x6f,
+0xe9, 0x15, 0x84, 0x00, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x04, 0xb6, 0x06, 0xd5, 0x0e,
+0x87, 0xc0, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8e, 0x08, 0x46, 0x40, 0x00, 0x0d, 0x58, 0x42,
+0x0e, 0x04, 0x15, 0xe2, 0x80, 0x00, 0x15, 0xe2, 0x00, 0x00, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63,
+0x00, 0x78, 0x84, 0x23, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x50, 0x2f, 0x80, 0x3c, 0x44, 0x10,
+0x00, 0x9f, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf5, 0x0f,
+0x44, 0x00, 0x00, 0x9f, 0x58, 0x12, 0x80, 0x07, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x37, 0x44, 0x00,
+0x00, 0x9e, 0xdd, 0x26, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x04, 0xb4, 0x80, 0x44, 0x00,
+0x00, 0x9f, 0x54, 0x12, 0x00, 0x3f, 0xdd, 0x26, 0x44, 0x10, 0x00, 0x35, 0x44, 0x00, 0x00, 0x9e,
+0xdd, 0x26, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8e, 0x08, 0xb4, 0x61, 0x44, 0x00, 0x00, 0x9f,
+0x54, 0x11, 0x80, 0x3f, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0x9e, 0xdd, 0x26, 0x44, 0x00,
+0x00, 0x9f, 0x84, 0x20, 0xdd, 0x26, 0xf2, 0x02, 0x4e, 0x23, 0x00, 0x9e, 0x46, 0x60, 0x04, 0x10,
+0x47, 0xe0, 0x00, 0x92, 0x58, 0x63, 0x05, 0x0c, 0x59, 0xef, 0x00, 0x18, 0x15, 0xe3, 0x00, 0x00,
+0xf1, 0x02, 0x92, 0x00, 0x84, 0x47, 0x9c, 0x49, 0x4c, 0x11, 0x7f, 0xfd, 0x46, 0x30, 0x04, 0x10,
+0x46, 0x10, 0x00, 0x92, 0x58, 0x31, 0x85, 0x0c, 0x58, 0x10, 0x80, 0x08, 0xb6, 0x23, 0x84, 0x00,
+0x92, 0x00, 0x84, 0x87, 0x9c, 0x01, 0x4c, 0x02, 0x7f, 0xfd, 0x46, 0x00, 0x04, 0x10, 0x46, 0x50,
+0x00, 0x92, 0x58, 0x00, 0x05, 0x0c, 0xb6, 0xa0, 0x84, 0x00, 0x92, 0x00, 0x84, 0xc7, 0x9c, 0x01,
+0x4c, 0x03, 0x7f, 0xfd, 0xf1, 0x10, 0x46, 0x60, 0x00, 0x06, 0x58, 0x63, 0x00, 0x78, 0x44, 0x00,
+0x00, 0x17, 0xdd, 0x26, 0xf1, 0x11, 0x84, 0x04, 0xdd, 0x26, 0x84, 0x20, 0x44, 0x00, 0x00, 0xf4,
+0xdd, 0x26, 0x44, 0x10, 0x00, 0x15, 0x50, 0x2f, 0x80, 0x3c, 0x84, 0x00, 0x46, 0xf0, 0x00, 0x05,
+0x58, 0xf7, 0x8e, 0xf8, 0xdd, 0x2f, 0xf3, 0x0f, 0x44, 0x00, 0x00, 0x15, 0x58, 0x21, 0x80, 0x01,
+0xf2, 0x8f, 0x80, 0x22, 0xdd, 0x26, 0x84, 0x00, 0xd5, 0x0a, 0x92, 0x00, 0x87, 0xc7, 0x9c, 0x49,
+0x4c, 0x1f, 0x7f, 0xfd, 0x9c, 0x01, 0x84, 0x2a, 0x4c, 0x00, 0x80, 0x04, 0x84, 0x20, 0xd5, 0xf6,
+0xf3, 0x0f, 0x44, 0x00, 0x00, 0x15, 0x54, 0x21, 0x80, 0xfe, 0x80, 0x22, 0xf2, 0x8f, 0x46, 0xf0,
+0x00, 0x06, 0x58, 0xf7, 0x80, 0x78, 0xdd, 0x2f, 0x46, 0x40, 0x04, 0x10, 0x58, 0x42, 0x05, 0x04,
+0x84, 0x20, 0xb6, 0x24, 0x46, 0x50, 0x04, 0x10, 0xf6, 0x09, 0x58, 0x52, 0x85, 0x0c, 0xb6, 0xc5,
+0x46, 0x60, 0x00, 0x05, 0x58, 0x63, 0x0e, 0x70, 0xf0, 0x07, 0xb6, 0x04, 0x84, 0x04, 0xf2, 0x19,
+0xdd, 0x26, 0xf2, 0x18, 0x44, 0x10, 0x00, 0x13, 0x84, 0x04, 0xdd, 0x26, 0xf2, 0x17, 0x44, 0x10,
+0x00, 0x11, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x16, 0x44, 0x10, 0x00, 0x12, 0x84, 0x05, 0xdd, 0x26,
+0xf2, 0x15, 0x44, 0x10, 0x00, 0x13, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x14, 0x44, 0x10, 0x00, 0x14,
+0x84, 0x05, 0xdd, 0x26, 0xf2, 0x13, 0x84, 0x23, 0x84, 0x05, 0xdd, 0x26, 0xf2, 0x12, 0x84, 0x05,
+0x84, 0x24, 0xdd, 0x26, 0xec, 0x6c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3b, 0xff, 0xfc, 0xbc,
+0xef, 0xfc, 0x96, 0x49, 0xe6, 0x24, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x61, 0xb4, 0x20, 0x84, 0xa5,
+0xd1, 0x2c, 0xe4, 0x26, 0xe8, 0x09, 0x84, 0xa3, 0xd1, 0x17, 0xe4, 0x24, 0xe8, 0x1b, 0x84, 0x01,
+0x4c, 0x10, 0x40, 0x55, 0xd5, 0x0b, 0x84, 0x47, 0x4c, 0x11, 0x00, 0x3b, 0xe0, 0x22, 0xe9, 0x26,
+0x84, 0xa8, 0xd1, 0x3e, 0x84, 0xa9, 0xd1, 0x45, 0xd5, 0x49, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7,
+0x85, 0xe8, 0xdd, 0x2f, 0xd5, 0x43, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x80, 0xd0, 0xdd, 0x2f,
+0xd5, 0x3d, 0x9c, 0x44, 0x05, 0xe0, 0x80, 0x00, 0x54, 0x0f, 0x00, 0x01, 0x46, 0xf0, 0x00, 0x08,
+0x58, 0xf7, 0x84, 0x4c, 0xdd, 0x2f, 0xd5, 0x32, 0x9c, 0xc4, 0xb4, 0x43, 0x96, 0x14, 0x46, 0xf0,
+0x00, 0x08, 0x58, 0xf7, 0x8c, 0x14, 0xdd, 0x2f, 0xd5, 0x29, 0x9c, 0x04, 0x05, 0xe0, 0x00, 0x00,
+0xb4, 0x20, 0xb4, 0x80, 0x40, 0x50, 0xa0, 0x09, 0x54, 0x0f, 0x00, 0xff, 0x96, 0x68, 0x42, 0x22,
+0x40, 0x0b, 0x46, 0xf0, 0x00, 0x07, 0x58, 0xf7, 0x82, 0x78, 0xdd, 0x2f, 0xd5, 0x17, 0x9c, 0x84,
+0xb4, 0x02, 0x46, 0xf0, 0x00, 0x06, 0x58, 0xf7, 0x8a, 0x38, 0xdd, 0x2f, 0xd5, 0x0f, 0x9d, 0x04,
+0xb4, 0x64, 0x96, 0x1c, 0x46, 0xf0, 0x00, 0x09, 0x58, 0xf7, 0x84, 0xcc, 0xdd, 0x2f, 0xd5, 0x06,
+0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8f, 0xbc, 0xdd, 0x2f, 0x84, 0x00, 0xec, 0x04, 0x3b, 0xff,
+0xfc, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc, 0xef, 0xc4, 0x84, 0xa1, 0x46, 0x40, 0x00, 0x0d,
+0x58, 0x42, 0x0e, 0x3a, 0x84, 0x60, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x3b, 0xaf, 0x60,
+0x46, 0x60, 0x04, 0x00, 0xae, 0xc0, 0x58, 0x63, 0x02, 0x14, 0x05, 0xc3, 0x00, 0x00, 0x45, 0xef,
+0xef, 0xff, 0x40, 0xae, 0x78, 0x02, 0xb7, 0x46, 0x46, 0x70, 0x04, 0x00, 0x58, 0x73, 0x84, 0x18,
+0xb5, 0x27, 0x44, 0x6f, 0xff, 0x7f, 0x40, 0x84, 0x98, 0x02, 0xb7, 0x07, 0x46, 0x30, 0x04, 0x00,
+0x58, 0x31, 0x82, 0x58, 0xb4, 0xa3, 0x46, 0x7f, 0x0f, 0xff, 0x58, 0x73, 0x8f, 0xff, 0x47, 0xe0,
+0xa0, 0x00, 0x54, 0xa0, 0x80, 0xff, 0x40, 0x12, 0x9c, 0x02, 0x40, 0x40, 0xf8, 0x04, 0x84, 0x05,
+0xb6, 0x83, 0x4c, 0xa0, 0x41, 0x64, 0x47, 0xc0, 0x04, 0x10, 0x15, 0xcf, 0x80, 0x04, 0x47, 0xe0,
+0x0c, 0x2d, 0x15, 0xef, 0x80, 0x01, 0x05, 0xef, 0x80, 0x04, 0x46, 0x00, 0x04, 0x10, 0x59, 0xef,
+0x07, 0x20, 0x15, 0xef, 0x80, 0x04, 0x05, 0xef, 0x80, 0x01, 0x58, 0x00, 0x00, 0x80, 0x59, 0xef,
+0x0f, 0xc0, 0x15, 0xef, 0x80, 0x01, 0x46, 0x10, 0x04, 0x10, 0x05, 0xe0, 0x00, 0x00, 0x58, 0x10,
+0x80, 0xc0, 0x15, 0xef, 0x80, 0x0b, 0x46, 0x50, 0x04, 0x10, 0x05, 0xe0, 0x80, 0x00, 0x58, 0x52,
+0x80, 0x04, 0x15, 0xef, 0x80, 0x0a, 0x46, 0x60, 0x04, 0x10, 0x05, 0xe2, 0x80, 0x00, 0x58, 0x63,
+0x07, 0x08, 0x15, 0xef, 0x80, 0x09, 0x46, 0x90, 0x04, 0x10, 0x05, 0xe3, 0x00, 0x00, 0x58, 0x94,
+0x80, 0x20, 0x15, 0xef, 0x80, 0x08, 0x46, 0x30, 0x04, 0x10, 0x05, 0xe4, 0x80, 0x00, 0x58, 0x31,
+0x80, 0x78, 0x15, 0xef, 0x80, 0x07, 0x46, 0x4f, 0x02, 0x10, 0x05, 0xe1, 0x80, 0x00, 0x15, 0xef,
+0x80, 0x06, 0x05, 0xef, 0x80, 0x04, 0x46, 0x7f, 0xf0, 0x00, 0x05, 0xef, 0x00, 0x00, 0x46, 0x80,
+0x04, 0x10, 0x47, 0xc0, 0x18, 0x00, 0x15, 0xef, 0x80, 0x05, 0x58, 0x84, 0x00, 0x3c, 0xb6, 0x80,
+0x44, 0x40, 0x00, 0x10, 0x44, 0x00, 0x00, 0xc8, 0x59, 0xce, 0x00, 0x80, 0xb6, 0xe1, 0xb6, 0x85,
+0xb6, 0x06, 0x15, 0xc4, 0x00, 0x00, 0x47, 0xe0, 0x00, 0x0d, 0x59, 0xef, 0x0d, 0x78, 0xf7, 0x01,
+0x84, 0xc1, 0xb6, 0xe9, 0xb6, 0xde, 0xf2, 0x82, 0xf3, 0x83, 0x46, 0x70, 0x00, 0x04, 0x58, 0x73,
+0x83, 0x40, 0x80, 0x0a, 0xdd, 0x27, 0x46, 0x10, 0x0c, 0x2d, 0x58, 0x10, 0x8f, 0x80, 0xb6, 0x29,
+0x46, 0x28, 0x00, 0x00, 0xf5, 0x03, 0xb6, 0x45, 0x46, 0x00, 0x19, 0xc0, 0xf3, 0x04, 0x84, 0x84,
+0x58, 0x00, 0x00, 0x80, 0xb6, 0x83, 0x46, 0x60, 0x19, 0xc0, 0xb6, 0x08, 0x58, 0x63, 0x00, 0x90,
+0x80, 0x0a, 0xdd, 0x27, 0xb6, 0xc8, 0x84, 0x0a, 0xdd, 0x27, 0x46, 0x10, 0x19, 0x40, 0x58, 0x10,
+0x80, 0x90, 0xb6, 0x28, 0x84, 0x0a, 0xdd, 0x27, 0x46, 0x20, 0x18, 0x40, 0x58, 0x21, 0x00, 0x90,
+0xb6, 0x48, 0x84, 0x0a, 0xdd, 0x27, 0x46, 0x00, 0x04, 0x00, 0xf2, 0x02, 0x58, 0x00, 0x00, 0x88,
+0xb4, 0x20, 0xc2, 0x09, 0x46, 0x3f, 0xf0, 0x00, 0x40, 0x60, 0x8c, 0x02, 0x98, 0x96, 0x42, 0x81,
+0x7c, 0x08, 0xb7, 0x00, 0x64, 0x00, 0x00, 0x00, 0x84, 0x00, 0x46, 0x40, 0x00, 0x0d, 0x58, 0x42,
+0x0e, 0x3a, 0x46, 0x80, 0x00, 0x0d, 0x58, 0x84, 0x0e, 0x3b, 0xae, 0x20, 0x46, 0x30, 0x04, 0x00,
+0x10, 0x04, 0x00, 0x00, 0x58, 0x31, 0x82, 0x14, 0xb4, 0x23, 0x47, 0xe0, 0x04, 0x00, 0x58, 0x50,
+0x90, 0x00, 0xb6, 0xa3, 0x59, 0xef, 0x04, 0x18, 0xb4, 0xde, 0x46, 0x80, 0x04, 0x10, 0x46, 0x70,
+0x19, 0x40, 0x58, 0x84, 0x00, 0x3c, 0x58, 0x23, 0x00, 0x80, 0x58, 0x73, 0x80, 0x90, 0xb6, 0x5e,
+0xb6, 0xe8, 0x44, 0x00, 0x08, 0x98, 0x46, 0x70, 0x00, 0x04, 0x58, 0x73, 0x83, 0x40, 0x4b, 0xe0,
+0x1c, 0x01, 0x46, 0x40, 0x19, 0xc0, 0x58, 0x42, 0x00, 0x90, 0xb6, 0x88, 0x84, 0x0a, 0x4b, 0xe0,
+0x1c, 0x01, 0x46, 0x00, 0x19, 0x80, 0x46, 0x50, 0x04, 0x10, 0x46, 0x10, 0x0c, 0x0d, 0x58, 0x00,
+0x00, 0x90, 0x58, 0x52, 0x80, 0x20, 0x58, 0x10, 0x8f, 0xc0, 0xb6, 0x08, 0x46, 0x80, 0x04, 0x00,
+0xb6, 0x25, 0x58, 0x84, 0x00, 0x20, 0x84, 0xc0, 0xb4, 0xa8, 0x46, 0x30, 0x04, 0x00, 0xf5, 0x8d,
+0xf2, 0x0d, 0x84, 0x04, 0x41, 0xe1, 0x0c, 0x02, 0x4f, 0xe3, 0x00, 0x0a, 0x4b, 0xe0, 0x1c, 0x01,
+0x44, 0x10, 0x07, 0xd1, 0x4c, 0x60, 0x80, 0x04, 0x9d, 0xb1, 0xd5, 0xef, 0x46, 0x70, 0x04, 0x10,
+0x46, 0x60, 0x0c, 0x0d, 0x58, 0x73, 0x80, 0x20, 0x58, 0x63, 0x0f, 0xc8, 0xb6, 0xc7, 0x46, 0x70,
+0x04, 0x00, 0x58, 0x73, 0x80, 0x20, 0x84, 0xc0, 0x46, 0x80, 0x00, 0x04, 0x58, 0x84, 0x03, 0x40,
+0xb4, 0x67, 0x46, 0x20, 0x08, 0x00, 0xf3, 0x8d, 0x05, 0xef, 0x80, 0x0d, 0x84, 0x04, 0x40, 0x4f,
+0x08, 0x02, 0xcc, 0x09, 0x4b, 0xe0, 0x20, 0x01, 0x44, 0x00, 0x0b, 0xb9, 0x4c, 0x60, 0x00, 0x04,
+0x9d, 0xb1, 0xd5, 0xef, 0x46, 0x70, 0x04, 0x10, 0x58, 0x73, 0x80, 0x3c, 0x84, 0x20, 0xb6, 0x27,
+0x46, 0x80, 0x04, 0x10, 0x05, 0xef, 0x80, 0x0b, 0x58, 0x84, 0x00, 0x80, 0x15, 0xe4, 0x00, 0x00,
+0x46, 0x60, 0x04, 0x10, 0xf7, 0x0a, 0x58, 0x63, 0x00, 0xc0, 0xb6, 0xe6, 0x46, 0x50, 0x04, 0x10,
+0xf6, 0x09, 0x58, 0x52, 0x80, 0x04, 0xb6, 0xc5, 0x46, 0x40, 0x04, 0x10, 0xf7, 0x08, 0x58, 0x42,
+0x07, 0x08, 0xb6, 0xe4, 0x46, 0x30, 0x04, 0x10, 0x05, 0xef, 0x80, 0x07, 0x58, 0x31, 0x80, 0x20,
+0x15, 0xe1, 0x80, 0x00, 0x46, 0x20, 0x04, 0x10, 0xf3, 0x06, 0x58, 0x21, 0x00, 0x78, 0xb6, 0x62,
+0x46, 0x00, 0x04, 0x10, 0xf4, 0x05, 0x58, 0x00, 0x07, 0x20, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52,
+0x8d, 0x78, 0xb6, 0x80, 0xb6, 0x25, 0x48, 0x00, 0x01, 0x34, 0x51, 0xc5, 0x7f, 0xff, 0x54, 0x9e,
+0x00, 0xff, 0xe7, 0x24, 0x4e, 0xf2, 0x01, 0x2d, 0x46, 0x40, 0x04, 0x00, 0x58, 0x42, 0x00, 0x64,
+0x46, 0x60, 0x04, 0x00, 0xb4, 0xa4, 0x58, 0x63, 0x00, 0x38, 0x46, 0x31, 0x00, 0x00, 0xb4, 0x26,
+0x44, 0x0f, 0xe0, 0x00, 0x40, 0x82, 0x8c, 0x02, 0x40, 0x40, 0x80, 0x02, 0x4e, 0x82, 0x00, 0x05,
+0x58, 0x42, 0x00, 0x13, 0xd5, 0x03, 0x58, 0x42, 0x00, 0x27, 0x46, 0x80, 0x04, 0x00, 0x58, 0x84,
+0x00, 0x38, 0xb6, 0x88, 0x46, 0x70, 0x04, 0x00, 0x58, 0x73, 0x82, 0x08, 0xb5, 0x07, 0x05, 0xc3,
+0x80, 0x00, 0x45, 0xef, 0xef, 0x37, 0x40, 0x9e, 0x78, 0x02, 0xb7, 0x27, 0xe7, 0x43, 0xe9, 0x13,
+0x46, 0x50, 0x04, 0x00, 0x58, 0x52, 0x80, 0x80, 0xb4, 0xc5, 0x44, 0x1f, 0xff, 0xef, 0x40, 0x33,
+0x04, 0x02, 0xb6, 0x65, 0x84, 0x05, 0xf2, 0x82, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x83, 0x40,
+0xdd, 0x2f, 0xf2, 0x02, 0x47, 0xc0, 0x04, 0x00, 0x46, 0x60, 0x04, 0x00, 0x59, 0xce, 0x00, 0xc0,
+0x58, 0x63, 0x00, 0x80, 0xb5, 0x3c, 0xb4, 0xe6, 0x84, 0x3d, 0x40, 0x43, 0x84, 0x02, 0xb6, 0x86,
+0x84, 0x05, 0xb4, 0xbc, 0x41, 0xe2, 0x84, 0x02, 0x15, 0xee, 0x00, 0x00, 0xf2, 0x82, 0x46, 0xf0,
+0x00, 0x04, 0x58, 0xf7, 0x83, 0x40, 0xdd, 0x2f, 0xb4, 0x46, 0x87, 0xde, 0x40, 0x31, 0x78, 0x02,
+0xb6, 0x66, 0x46, 0x10, 0x04, 0x00, 0xb4, 0xfc, 0x58, 0x10, 0x82, 0x14, 0x40, 0x73, 0xf8, 0x02,
+0xb6, 0xfc, 0x46, 0x20, 0x04, 0x00, 0xb4, 0x81, 0x58, 0x21, 0x02, 0x58, 0x42, 0x02, 0x3c, 0x08,
+0xb6, 0x01, 0x46, 0x6f, 0x0f, 0xff, 0xb4, 0xa2, 0x58, 0x63, 0x0f, 0xff, 0x47, 0xc0, 0xa0, 0x00,
+0x40, 0x42, 0x98, 0x02, 0x40, 0x02, 0x70, 0x04, 0xb6, 0x02, 0x46, 0x30, 0x04, 0x00, 0xf2, 0x02,
+0x58, 0x31, 0x80, 0x88, 0xb4, 0x83, 0xc2, 0x0c, 0x46, 0x7f, 0xf0, 0x00, 0x40, 0x62, 0x1c, 0x02,
+0x47, 0xe8, 0x00, 0x00, 0x41, 0xc1, 0x18, 0x00, 0x40, 0x0e, 0x78, 0x04, 0xb6, 0x03, 0x47, 0xc0,
+0x04, 0x00, 0x59, 0xce, 0x00, 0x80, 0xb4, 0x3c, 0x46, 0x50, 0x04, 0x00, 0x58, 0x30, 0x80, 0x40,
+0xb6, 0x7c, 0x58, 0x52, 0x80, 0x04, 0xb4, 0xc5, 0x84, 0x1b, 0x40, 0x43, 0x00, 0x02, 0xb6, 0x85,
+0x46, 0x30, 0x04, 0x00, 0x58, 0x31, 0x80, 0x20, 0xb4, 0x23, 0x46, 0x00, 0x04, 0x00, 0x58, 0x50,
+0x90, 0x00, 0xb6, 0xa3, 0x58, 0x00, 0x00, 0x3c, 0xb4, 0xdc, 0x46, 0x1f, 0x00, 0x00, 0x58, 0x43,
+0x00, 0x20, 0xb6, 0x9c, 0xb4, 0x60, 0x84, 0xa3, 0x40, 0x31, 0x84, 0x02, 0x4c, 0xa2, 0x80, 0x0d,
+0x87, 0x84, 0x4c, 0xae, 0x00, 0x06, 0x84, 0xa2, 0x4c, 0xa2, 0xc0, 0x0f, 0xd5, 0x09, 0x44, 0x70,
+0xef, 0x01, 0x98, 0xdf, 0xd5, 0x0c, 0x45, 0xe0, 0xe3, 0x01, 0x88, 0x7e, 0xd5, 0x08, 0x44, 0x40,
+0xc0, 0x01, 0x98, 0xdc, 0xd5, 0x04, 0x44, 0x60, 0x80, 0x01, 0x98, 0xde, 0x46, 0x10, 0x04, 0x00,
+0x58, 0x10, 0x80, 0x3c, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8e, 0x38, 0x84, 0x00, 0xb6, 0x61,
+0xae, 0x28, 0xa6, 0xe8, 0xcb, 0x04, 0x64, 0x00, 0x00, 0x20, 0xd5, 0xfc, 0x44, 0x60, 0x03, 0xe8,
+0x40, 0x21, 0x18, 0x77, 0x46, 0x50, 0x00, 0x0d, 0x58, 0x52, 0x8d, 0x68, 0xb4, 0xc5, 0x46, 0x40,
+0x04, 0x00, 0x58, 0x42, 0x02, 0x14, 0x47, 0xc0, 0x04, 0x00, 0x59, 0xce, 0x04, 0x18, 0x98, 0xd6,
+0xb6, 0x65, 0xb4, 0x24, 0x58, 0x00, 0x90, 0x00, 0xb6, 0x04, 0xb4, 0xbc, 0x58, 0x22, 0x80, 0x80,
+0xb6, 0x5c, 0xe7, 0x43, 0xe9, 0x09, 0x47, 0xc0, 0x04, 0x00, 0x59, 0xce, 0x00, 0x80, 0xb4, 0x9c,
+0x58, 0x02, 0x00, 0x10, 0xb6, 0x1c, 0x47, 0xc0, 0x04, 0x00, 0x59, 0xce, 0x00, 0x80, 0xb4, 0x1c,
+0x46, 0x20, 0x04, 0x00, 0x58, 0x10, 0x00, 0x02, 0xb6, 0x3c, 0x58, 0x21, 0x00, 0xc0, 0xb4, 0x7c,
+0x46, 0x10, 0x04, 0x00, 0x58, 0x51, 0x80, 0x01, 0xb6, 0xbc, 0xb7, 0x22, 0x58, 0x10, 0x80, 0x20,
+0xb4, 0x01, 0x44, 0x4f, 0xef, 0xff, 0x40, 0x30, 0x10, 0x02, 0xb6, 0x61, 0x46, 0x20, 0x04, 0x00,
+0xb4, 0x9c, 0x46, 0x10, 0x04, 0x00, 0x44, 0x5f, 0xff, 0xdf, 0x58, 0x21, 0x00, 0x3c, 0x40, 0x02,
+0x14, 0x02, 0x58, 0x10, 0x82, 0x08, 0x84, 0x60, 0xb6, 0x1c, 0xb6, 0x62, 0xb7, 0x01, 0x84, 0x60,
+0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x3a, 0x46, 0x10, 0x00, 0x0d, 0x58, 0x10, 0x8e, 0x3b,
+0xae, 0xc0, 0x46, 0x40, 0x04, 0x00, 0xae, 0xc8, 0x58, 0x42, 0x00, 0x20, 0xb4, 0xa4, 0x58, 0x22,
+0x80, 0x40, 0xb6, 0x44, 0xec, 0x3c, 0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xa0, 0xbc,
+0xef, 0xf8, 0x46, 0x70, 0x04, 0x00, 0x58, 0x73, 0x82, 0x14, 0x84, 0xc0, 0x44, 0x30, 0x80, 0x06,
+0xb5, 0x07, 0xb6, 0xc7, 0xb6, 0x67, 0x96, 0x48, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x09, 0x58, 0xf7,
+0x8c, 0xd4, 0xdd, 0x2f, 0xb7, 0x07, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x07, 0x81, 0x88, 0x84, 0xa1,
+0xd8, 0x29, 0xf6, 0x81, 0x46, 0x70, 0x00, 0x05, 0x58, 0x73, 0x8e, 0x70, 0x84, 0x24, 0x84, 0x4a,
+0x80, 0x06, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x25, 0x44, 0x20, 0x00, 0x20, 0x80, 0x06, 0x4b, 0xe0,
+0x1c, 0x01, 0x84, 0x24, 0x40, 0x2f, 0x84, 0x00, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8d, 0xb8, 0xdd, 0x2f, 0xf5, 0x01, 0x80, 0x06, 0x58, 0x42, 0x80, 0x80, 0xf4, 0x81, 0x80, 0x44,
+0x84, 0x24, 0x4b, 0xe0, 0x1c, 0x01, 0x84, 0x02, 0x46, 0xf0, 0x00, 0x02, 0x58, 0xf7, 0x8b, 0x1c,
+0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0xa0, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x98, 0xbc,
+0x96, 0x49, 0xe6, 0x28, 0xe8, 0x03, 0x84, 0x01, 0xd5, 0x7c, 0x80, 0x60, 0xa2, 0x99, 0x44, 0x40,
+0x00, 0x30, 0xb4, 0x23, 0x4c, 0x22, 0x40, 0x06, 0x80, 0x02, 0x96, 0x48, 0x84, 0x40, 0xd5, 0x3d,
+0x44, 0x50, 0x00, 0x32, 0xda, 0x40, 0x87, 0xc1, 0x46, 0xf0, 0x00, 0x0d, 0x11, 0xe7, 0x8e, 0x39,
+0x50, 0x30, 0x00, 0x08, 0x50, 0x20, 0x00, 0x0c, 0x84, 0x01, 0xb4, 0x83, 0xb4, 0x62, 0x4c, 0x10,
+0x00, 0x64, 0x84, 0xa2, 0xd9, 0x04, 0x44, 0x00, 0x00, 0xc8, 0xd5, 0x12, 0x84, 0x03, 0x4c, 0x10,
+0x00, 0x0e, 0x84, 0xa4, 0xd1, 0x0b, 0x56, 0x60, 0x80, 0x05, 0x45, 0xe0, 0x15, 0x7c, 0x84, 0xa0,
+0x40, 0x02, 0x98, 0x1b, 0x40, 0x0f, 0x18, 0x1a, 0xd5, 0x03, 0x44, 0x00, 0x07, 0xd0, 0x47, 0xe0,
+0x04, 0x11, 0x04, 0x2f, 0x00, 0x49, 0x44, 0x50, 0x03, 0xe8, 0x43, 0xe1, 0x94, 0x24, 0x95, 0x56,
+0x50, 0x22, 0xd1, 0x20, 0x50, 0x3f, 0x7c, 0x18, 0x42, 0x21, 0x90, 0x73, 0x9a, 0x90, 0x4e, 0x27,
+0x00, 0x38, 0x96, 0x48, 0x44, 0x00, 0x00, 0x32, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7, 0x82, 0x9c,
+0xdd, 0x2f, 0xd5, 0x2e, 0x44, 0x10, 0x00, 0x33, 0x4c, 0x20, 0xc0, 0x08, 0x84, 0x20, 0x46, 0x00,
+0x00, 0x0d, 0x58, 0x00, 0x0e, 0x39, 0xd5, 0x23, 0x44, 0x50, 0x00, 0x34, 0xda, 0x18, 0x50, 0x40,
+0x00, 0x08, 0xb4, 0x43, 0x51, 0xe0, 0x00, 0x10, 0xb4, 0x64, 0x50, 0x10, 0x00, 0x0c, 0xb4, 0x01,
+0x46, 0x50, 0x00, 0x0e, 0x58, 0x52, 0x81, 0x88, 0xb4, 0x1e, 0x84, 0x01, 0xa8, 0xea, 0xae, 0x28,
+0xae, 0xac, 0x46, 0x60, 0x04, 0x11, 0x04, 0x03, 0x00, 0x49, 0xd5, 0x0a, 0x9d, 0x4a, 0xd2, 0x02,
+0xd5, 0x07, 0x84, 0x20, 0x46, 0x00, 0x00, 0x0e, 0x58, 0x00, 0x01, 0x88, 0xae, 0x40, 0x84, 0x00,
+0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x84, 0x02, 0xd5, 0xb3, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc,
+0xef, 0xf4, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f,
+0x46, 0xf0, 0x00, 0x0d, 0x04, 0x17, 0x83, 0xca, 0x54, 0x70, 0x80, 0x02, 0xc7, 0x04, 0x42, 0x10,
+0x80, 0x09, 0x84, 0xe1, 0xf0, 0x01, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63, 0x0e, 0x74, 0x14, 0x13,
+0x00, 0x2d, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f, 0xc7, 0x07, 0x80, 0x06,
+0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0x2c, 0xdd, 0x2f, 0xec, 0x0c, 0x3a, 0x6f, 0x9c, 0x84,
+0xdd, 0x9e, 0x92, 0x00, 0x3a, 0x6f, 0x9c, 0xbc, 0xef, 0xf4, 0x46, 0x60, 0x00, 0x0d, 0x58, 0x63,
+0x0e, 0x74, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x70, 0xdd, 0x2f,
+0x04, 0x73, 0x00, 0x2d, 0xf0, 0x01, 0x97, 0xfc, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84,
+0xdd, 0x2f, 0xc7, 0x07, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xb0, 0xdd, 0x2f,
+0xec, 0x0c, 0x3a, 0x6f, 0x9c, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0x98, 0xbc, 0xef, 0xf8, 0x46, 0x60,
+0x00, 0x0d, 0x58, 0x63, 0x0e, 0x74, 0x50, 0x0f, 0x80, 0x04, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7,
+0x8a, 0x70, 0xdd, 0x2f, 0x04, 0x33, 0x00, 0x2d, 0xf0, 0x01, 0x84, 0x40, 0xb6, 0x7f, 0x14, 0x23,
+0x00, 0x2d, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0x84, 0xdd, 0x2f, 0xb4, 0x3f, 0x96, 0x0c,
+0xc0, 0x07, 0x80, 0x06, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7, 0x88, 0xb0, 0xdd, 0x2f, 0xb4, 0xbf,
+0x54, 0x42, 0x80, 0x02, 0xc4, 0x0a, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x88, 0x2c, 0xdd, 0x2f, 0xb4, 0x1f, 0x41, 0xe0, 0x3c, 0x08, 0x41, 0xef,
+0x7c, 0x09, 0x4f, 0xe2, 0x00, 0x0b, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x46, 0xf0,
+0x00, 0x03, 0x58, 0xf7, 0x8a, 0x08, 0xdd, 0x2f, 0xb4, 0x7f, 0x40, 0x21, 0xb8, 0x08, 0x92, 0x5f,
+0xc2, 0x0a, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x46, 0xf0, 0x00, 0x03, 0x58, 0xf7,
+0x89, 0x24, 0xdd, 0x2f, 0xec, 0x08, 0x3a, 0x6f, 0x98, 0x84, 0xdd, 0x9e, 0x3a, 0x6f, 0xaa, 0xbc,
+0xef, 0xfc, 0x44, 0x00, 0x02, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8a, 0xd8, 0xdd, 0x2f,
+0x46, 0x30, 0x04, 0x00, 0xb4, 0x43, 0x44, 0x50, 0x76, 0x10, 0x40, 0x01, 0x40, 0x09, 0xd8, 0x07,
+0x80, 0xe3, 0x04, 0x53, 0x80, 0x41, 0x42, 0x42, 0xd0, 0x0b, 0xc4, 0x23, 0x46, 0xf0, 0x00, 0x0b,
+0x00, 0x87, 0x81, 0x63, 0x84, 0xa1, 0x4c, 0x82, 0xc0, 0x07, 0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7,
+0x8e, 0xf8, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0e, 0x00, 0x07, 0x80, 0xc8, 0xc8, 0x12, 0x46, 0xf0,
+0x00, 0x0d, 0x01, 0xe7, 0x8d, 0x7c, 0x84, 0xa1, 0x4d, 0xe2, 0xc0, 0x0c, 0x46, 0xf0, 0x00, 0x0b,
+0x00, 0x17, 0x80, 0x1c, 0x80, 0x40, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7, 0x82, 0x9c, 0xdd, 0x2f,
+0x46, 0xf0, 0x00, 0x04, 0x58, 0xf7, 0x81, 0x78, 0xdd, 0x2f, 0x46, 0xf0, 0x00, 0x0a, 0x58, 0xf7,
+0x84, 0xd8, 0xdd, 0x2f, 0x46, 0xa0, 0x00, 0x00, 0x58, 0xa5, 0x03, 0x24, 0x46, 0xf0, 0x00, 0x01,
+0x58, 0xf7, 0x8a, 0xc4, 0xdd, 0x2f, 0x46, 0x90, 0x00, 0x02, 0x58, 0x94, 0x88, 0x30, 0x46, 0x70,
+0x00, 0x00, 0x58, 0x73, 0x83, 0x68, 0x46, 0x80, 0x00, 0x02, 0x58, 0x84, 0x00, 0x40, 0xd5, 0x20,
+0x4b, 0xe0, 0x28, 0x01, 0x00, 0x10, 0x00, 0x14, 0x80, 0xc0, 0xc9, 0x0f, 0x80, 0x20, 0x46, 0x00,
+0x00, 0x0d, 0x58, 0x00, 0x0e, 0x74, 0x4b, 0xe0, 0x20, 0x01, 0xc8, 0x12, 0x80, 0x26, 0x46, 0x00,
+0x00, 0x0d, 0x58, 0x00, 0x0e, 0x64, 0xd5, 0x0a, 0x84, 0xa1, 0xd9, 0x0a, 0x4b, 0xe0, 0x24, 0x01,
+0x80, 0x26, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0e, 0x54, 0x4b, 0xe0, 0x1c, 0x01, 0x46, 0xf0,
+0x00, 0x0d, 0x04, 0x57, 0x83, 0xcd, 0x46, 0x00, 0x00, 0x0d, 0x58, 0x00, 0x0f, 0x2c, 0xcd, 0xd9,
+0x46, 0xf0, 0x00, 0x0d, 0x04, 0x07, 0x83, 0x8f, 0x44, 0x20, 0x03, 0xe8, 0x40, 0x20, 0x0b, 0xd6,
+0x4f, 0xe3, 0x00, 0x07, 0x46, 0x10, 0x04, 0x00, 0x9c, 0xd1, 0x14, 0x30, 0x80, 0x8e, 0x46, 0x10,
+0x00, 0x0d, 0x9d, 0x01, 0x14, 0x40, 0x83, 0x8f, 0x5e, 0xf0, 0x13, 0x89, 0xe9, 0x04, 0x84, 0xa0,
+0x14, 0x50, 0x83, 0x8f, 0x46, 0xf0, 0x00, 0x0d, 0x05, 0xe7, 0x83, 0xca, 0x4f, 0xe3, 0x00, 0x09,
+0x44, 0x00, 0x02, 0x00, 0x46, 0xf0, 0x00, 0x05, 0x58, 0xf7, 0x8b, 0x1c, 0xdd, 0x2f, 0xec, 0x04,
+0x3a, 0x6f, 0xaa, 0x84, 0xdd, 0x9e, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xb8, 0x4b, 0x00, 0x00, 0x6c, 0x46, 0x00, 0x00,
+0xa8, 0x41, 0x00, 0x00, 0x78, 0x45, 0x00, 0x00, 0xa8, 0x41, 0x00, 0x00, 0x74, 0x43, 0x00, 0x00,
+0xd8, 0x49, 0x00, 0x00, 0xa8, 0x41, 0x00, 0x00, 0x94, 0x4b, 0x00, 0x00, 0x3c, 0x45, 0x00, 0x00,
+0x74, 0x4b, 0x00, 0x00, 0x24, 0x45, 0x00, 0x00, 0xa8, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x99, 0x99, 0x09, 0x50, 0x02, 0x46, 0x44, 0x0a, 0x50, 0x03, 0xec, 0xee, 0x0a, 0x50, 0x04,
+0x99, 0x99, 0x0b, 0x50, 0x05, 0x46, 0x44, 0x08, 0x51, 0x06, 0xec, 0xee, 0x08, 0x51, 0x07, 0x99,
+0x99, 0x09, 0x51, 0x08, 0x46, 0x44, 0x0a, 0x51, 0x09, 0xec, 0xee, 0x0a, 0x51, 0x0a, 0x99, 0x99,
+0x0b, 0x51, 0x0b, 0x46, 0x44, 0x08, 0x52, 0x0c, 0xec, 0xee, 0x08, 0x52, 0x0d, 0x99, 0x99, 0x09,
+0x52, 0x0e, 0x33, 0x33, 0x0b, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
+0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
+0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x10, 0x14, 0x18, 0x1c, 0x20, 0x30, 0x34, 0x38,
+0x3c, 0x40, 0x44, 0x60, 0x64, 0x68, 0x6c, 0x70, 0x74, 0x78, 0x7c, 0x00, 0x24, 0x25, 0x26, 0x27,
+0x28, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x00,
+0x16, 0x14, 0x12, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x01, 0x02, 0x14, 0x18, 0x1c, 0x00, 0x00,
+0x20, 0x21, 0x22, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0f, 0xac, 0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x03, 0x00,
+0x00, 0xf8, 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x88, 0x8e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+0x86, 0xdd, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x05, 0xff, 0x00, 0x00,
+0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x8f, 0x14, 0x01, 0x76, 0x01, 0x00, 0x01, 0x02,
+0x03, 0x01, 0x0a, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x05, 0x0f, 0x0c, 0x00,
+0x01, 0x07, 0x10, 0x02, 0x02, 0x00, 0x00, 0x00, 0x09, 0x02, 0x4a, 0x00, 0x01, 0x01, 0x00, 0xa0,
+0x50, 0x09, 0x04, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x84, 0x02, 0x00, 0x02,
+0x00, 0x07, 0x05, 0x85, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x08, 0x02, 0x00, 0x02, 0x00, 0x07,
+0x05, 0x04, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x05, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x06,
+0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x07, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x09, 0x02, 0x00,
+0x02, 0x00, 0x09, 0x04, 0x01, 0x00, 0x05, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x81, 0x03, 0x40,
+0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x02, 0x02, 0x00, 0x02, 0x00,
+0x07, 0x05, 0x83, 0x01, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x01, 0x40, 0x00, 0x00, 0x04, 0x03,
+0x09, 0x04, 0x12, 0x03, 0x4d, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x61, 0x00, 0x54, 0x00,
+0x65, 0x00, 0x6b, 0x00, 0x1c, 0x03, 0x38, 0x00, 0x30, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x31, 0x00,
+0x31, 0x00, 0x20, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x57, 0x00, 0x4c, 0x00, 0x41, 0x00, 0x4e, 0x00,
+0x08, 0x03, 0x31, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x18, 0x5a, 0x00, 0x00, 0x1c, 0x5a, 0x00, 0x00,
+0x20, 0x5a, 0x00, 0x00, 0x24, 0x5a, 0x00, 0x00, 0x28, 0x5a, 0x00, 0x00, 0x2c, 0x5a, 0x00, 0x00,
+0x30, 0x5a, 0x00, 0x00, 0x34, 0x5a, 0x00, 0x00, 0x38, 0x5a, 0x00, 0x00, 0x3c, 0x5a, 0x00, 0x00,
+0x40, 0x5a, 0x00, 0x00, 0x44, 0x5a, 0x00, 0x00, 0x48, 0x5a, 0x00, 0x00, 0x4c, 0x5a, 0x00, 0x00,
+0x50, 0x5a, 0x00, 0x00, 0x54, 0x5a, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0xb1, 0x00, 0x00, 0x00,
+0x40, 0x76, 0x00, 0x01, } ;
diff --git a/cleopatre/devkit/mt7601udrv/include/misc.h b/cleopatre/devkit/mt7601udrv/include/misc.h
new file mode 100644
index 0000000000..2248bd3e84
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/misc.h
@@ -0,0 +1,32 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2009, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ misc.h
+
+ Abstract:
+
+ Handling Misc Problem
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Sean Wang 2009-08-12 Create
+ John Li 2009-12-23 Modified
+*/
+
+
diff --git a/cleopatre/devkit/mt7601udrv/include/misc_cmm.h b/cleopatre/devkit/mt7601udrv/include/misc_cmm.h
new file mode 100644
index 0000000000..aa91c80561
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/misc_cmm.h
@@ -0,0 +1,32 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2009, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ misc_cmm.h
+
+ Abstract:
+
+ Handling Misc Problem
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Sean Wang 2009-08-12 Create
+ John Li 2009-12-23 Modified
+*/
+
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mlme.h b/cleopatre/devkit/mt7601udrv/include/mlme.h
new file mode 100644
index 0000000000..076c5ebd2b
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mlme.h
@@ -0,0 +1,1515 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ mlme.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ John Chang 2003-08-28 Created
+ John Chang 2004-09-06 modified for RT2600
+
+*/
+#ifndef __MLME_H__
+#define __MLME_H__
+
+#include "rtmp_dot11.h"
+
+#include "wpa_cmm.h"
+
+
+/* maximum supported capability information - */
+/* ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot */
+#define SUPPORTED_CAPABILITY_INFO 0x0533
+
+#define END_OF_ARGS -1
+#define LFSR_MASK 0x80000057
+#define MLME_TASK_EXEC_INTV 100/*200*/ /* */
+#ifdef RT3290
+#define LEAD_TIME 7
+#else
+#define LEAD_TIME 5
+#endif /* RT3290 */
+
+#define MLME_TASK_EXEC_MULTIPLE 10 /*5*/ /* MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec */
+#define REORDER_EXEC_INTV 100 /* 0.1 sec */
+#ifdef RTMP_MAC_USB
+#endif /* RTMP_MAC_USB */
+/*#define TBTT_PRELOAD_TIME 384 // usec. LomgPreamble + 24-byte at 1Mbps */
+
+/* The definition of Radar detection duration region */
+#define CE 0
+#define FCC 1
+#define JAP 2
+#define JAP_W53 3
+#define JAP_W56 4
+#define MAX_RD_REGION 5
+
+#define BEACON_LOST_TIME 4 * OS_HZ /* 2048 msec = 2 sec */
+
+#define DLS_TIMEOUT 1200 /* unit: msec */
+#define AUTH_TIMEOUT 300 /* unit: msec */
+#define ASSOC_TIMEOUT 300 /* unit: msec */
+#define JOIN_TIMEOUT 2000 /* unit: msec */
+#define SHORT_CHANNEL_TIME 90 /* unit: msec */
+#define MIN_CHANNEL_TIME 110 /* unit: msec, for dual band scan */
+#define MAX_CHANNEL_TIME 140 /* unit: msec, for single band scan */
+#define FAST_ACTIVE_SCAN_TIME 30 /* Active scan waiting for probe response time */
+#define CW_MIN_IN_BITS 4 /* actual CwMin = 2^CW_MIN_IN_BITS - 1 */
+#define AUTO_CHANNEL_SEL_TIMEOUT 400 /* uint: msec */
+#define LINK_DOWN_TIMEOUT 20000 /* unit: msec */
+#define AUTO_WAKEUP_TIMEOUT 70 /*unit: msec */
+
+#ifdef CONFIG_AP_SUPPORT
+#define CW_MAX_IN_BITS 6 /* actual CwMax = 2^CW_MAX_IN_BITS - 1 */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef CONFIG_APSTA_MIXED_SUPPORT
+extern UINT32 CW_MAX_IN_BITS;
+#endif /* CONFIG_APSTA_MIXED_SUPPORT */
+
+/* Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720). */
+/* SHould not refer to this constant anymore */
+/*#define RSSI_TO_DBM_OFFSET 120 // for RT2530 RSSI-115 = dBm */
+#define RSSI_FOR_MID_TX_POWER -55 /* -55 db is considered mid-distance */
+#define RSSI_FOR_LOW_TX_POWER -45 /* -45 db is considered very short distance and */
+ /* eligible to use a lower TX power */
+#define RSSI_FOR_LOWEST_TX_POWER -30
+/*#define MID_TX_POWER_DELTA 0 // 0 db from full TX power upon mid-distance to AP */
+#define LOW_TX_POWER_DELTA 6 /* -3 db from full TX power upon very short distance. 1 grade is 0.5 db */
+#define LOWEST_TX_POWER_DELTA 16 /* -8 db from full TX power upon shortest distance. 1 grade is 0.5 db */
+
+#define RSSI_TRIGGERED_UPON_BELOW_THRESHOLD 0
+#define RSSI_TRIGGERED_UPON_EXCCEED_THRESHOLD 1
+#define RSSI_THRESHOLD_FOR_ROAMING 25
+#define RSSI_DELTA 5
+
+/* Channel Quality Indication */
+#define CQI_IS_GOOD(cqi) ((cqi) >= 50)
+/*#define CQI_IS_FAIR(cqi) (((cqi) >= 20) && ((cqi) < 50)) */
+#define CQI_IS_POOR(cqi) (cqi < 50) /*(((cqi) >= 5) && ((cqi) < 20)) */
+#define CQI_IS_BAD(cqi) (cqi < 5)
+#define CQI_IS_DEAD(cqi) (cqi == 0)
+
+/* weighting factor to calculate Channel quality, total should be 100% */
+#define RSSI_WEIGHTING 50
+#define TX_WEIGHTING 30
+#define RX_WEIGHTING 20
+
+
+#define BSS_NOT_FOUND 0xFFFFFFFF
+
+#ifdef CONFIG_AP_SUPPORT
+#define MAX_LEN_OF_MLME_QUEUE 20 /*10 */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+enum SCAN_MODE{
+ /* Active scan, send probe request, and wait beacon and probe response */
+ SCAN_ACTIVE = 0x00, /* all channels */
+ SCAN_CISCO_ACTIVE = 0x1, /* single channel only */
+ FAST_SCAN_ACTIVE = 0x2,
+#ifdef WSC_INCLUDED
+ SCAN_WSC_ACTIVE = 0x3,
+#endif /* WSC_INCLUDED */
+#ifdef DOT11N_DRAFT3
+ SCAN_2040_BSS_COEXIST = 0x4,
+#endif /* DOT11N_DRAFT3 */
+ SCAN_ACTIVE_MAX,
+
+ /* Passive scan, no probe request, only wait beacon and probe response */
+ SCAN_PASSIVE = 0x80, /* all channels */
+ SCAN_CISCO_PASSIVE = 0x81, /* single channel only */
+ SCAN_CISCO_NOISE = 0x82, /* single channel only, for noise histogram collection */
+ SCAN_CISCO_CHANNEL_LOAD = 0x83, /* single channel only, for channel load collection */
+ SCAN_PASSIVE_MAX,
+};
+
+#define SCAN_MASK 0x80
+#define SCAN_MODE_ACT(_x) (((_x) & SCAN_MASK) == 0)
+#define SCAN_MODE_PSV(_x) (((_x) & SCAN_MASK) == SCAN_MASK)
+#define SCAN_MODE_VALID(_x) ((SCAN_MODE_ACT(_x) && ((_x) < SCAN_ACTIVE_MAX)) ||\
+ (SCAN_MODE_PSV(_x) && ((_x) < SCAN_PASSIVE_MAX)))
+
+/*#define BSS_TABLE_EMPTY(x) ((x).BssNr == 0) */
+#define MAC_ADDR_IS_GROUP(Addr) (((Addr[0]) & 0x01))
+#define MAC_ADDR_HASH(Addr) (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
+#define MAC_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) & (HASH_TABLE_SIZE - 1))
+#define TID_MAC_HASH(Addr,TID) (TID^Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
+#define TID_MAC_HASH_INDEX(Addr,TID) (TID_MAC_HASH(Addr,TID) & (HASH_TABLE_SIZE - 1))
+
+
+/* bit definition of the 2-byte pBEACON->Capability field */
+#define CAP_IS_ESS_ON(x) (((x) & 0x0001) != 0)
+#define CAP_IS_IBSS_ON(x) (((x) & 0x0002) != 0)
+#define CAP_IS_CF_POLLABLE_ON(x) (((x) & 0x0004) != 0)
+#define CAP_IS_CF_POLL_REQ_ON(x) (((x) & 0x0008) != 0)
+#define CAP_IS_PRIVACY_ON(x) (((x) & 0x0010) != 0)
+#define CAP_IS_SHORT_PREAMBLE_ON(x) (((x) & 0x0020) != 0)
+#define CAP_IS_PBCC_ON(x) (((x) & 0x0040) != 0)
+#define CAP_IS_AGILITY_ON(x) (((x) & 0x0080) != 0)
+#define CAP_IS_SPECTRUM_MGMT(x) (((x) & 0x0100) != 0) /* 802.11e d9 */
+#define CAP_IS_QOS(x) (((x) & 0x0200) != 0) /* 802.11e d9 */
+#define CAP_IS_SHORT_SLOT(x) (((x) & 0x0400) != 0)
+#define CAP_IS_APSD(x) (((x) & 0x0800) != 0) /* 802.11e d9 */
+#define CAP_IS_IMMED_BA(x) (((x) & 0x1000) != 0) /* 802.11e d9 */
+#define CAP_IS_DSSS_OFDM(x) (((x) & 0x2000) != 0)
+#define CAP_IS_DELAY_BA(x) (((x) & 0x4000) != 0) /* 802.11e d9 */
+
+#define CAP_GENERATE(ess,ibss,priv,s_pre,s_slot,spectrum) (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000))
+
+/*#define STA_QOS_CAPABILITY 0 // 1-byte. see 802.11e d9.0 for bit definition */
+
+#define ERP_IS_NON_ERP_PRESENT(x) (((x) & 0x01) != 0) /* 802.11g */
+#define ERP_IS_USE_PROTECTION(x) (((x) & 0x02) != 0) /* 802.11g */
+#define ERP_IS_USE_BARKER_PREAMBLE(x) (((x) & 0x04) != 0) /* 802.11g */
+
+#define DRS_TX_QUALITY_WORST_BOUND 8/* 3 // just test by gary */
+#define DRS_PENALTY 8
+
+#define BA_NOTUSE 2
+/*BA Policy subfiled value in ADDBA frame */
+#define IMMED_BA 1
+#define DELAY_BA 0
+
+/* BA Initiator subfield in DELBA frame */
+#define ORIGINATOR 1
+#define RECIPIENT 0
+
+/* ADDBA Status Code */
+#define ADDBA_RESULTCODE_SUCCESS 0
+#define ADDBA_RESULTCODE_REFUSED 37
+#define ADDBA_RESULTCODE_INVALID_PARAMETERS 38
+
+/* DELBA Reason Code */
+#define DELBA_REASONCODE_QSTA_LEAVING 36
+#define DELBA_REASONCODE_END_BA 37
+#define DELBA_REASONCODE_UNKNOWN_BA 38
+#define DELBA_REASONCODE_TIMEOUT 39
+
+/* reset all OneSecTx counters */
+#ifdef FIFO_EXT_SUPPORT
+#define RESET_ONE_SEC_TX_CNT(__pEntry) \
+if (((__pEntry)) != NULL) \
+{ \
+ (__pEntry)->OneSecTxRetryOkCount = 0; \
+ (__pEntry)->OneSecTxFailCount = 0; \
+ (__pEntry)->OneSecTxNoRetryOkCount = 0; \
+ (__pEntry)->OneSecRxLGICount = 0; \
+ (__pEntry)->OneSecRxSGICount = 0; \
+ (__pEntry)->fifoTxSucCnt = 0;\
+ (__pEntry)->fifoTxRtyCnt = 0;\
+}
+#else
+#define RESET_ONE_SEC_TX_CNT(__pEntry) \
+if (((__pEntry)) != NULL) \
+{ \
+ (__pEntry)->OneSecTxRetryOkCount = 0; \
+ (__pEntry)->OneSecTxFailCount = 0; \
+ (__pEntry)->OneSecTxNoRetryOkCount = 0; \
+ (__pEntry)->OneSecRxLGICount = 0; \
+ (__pEntry)->OneSecRxSGICount = 0; \
+}
+#endif /* FIFO_EXT_SUPPORT */
+
+
+/*
+ 802.11 frame formats
+*/
+/* HT Capability INFO field in HT Cap IE . */
+typedef struct GNU_PACKED{
+#ifdef RT_BIG_ENDIAN
+ USHORT LSIGTxopProSup:1;
+ USHORT Forty_Mhz_Intolerant:1;
+ USHORT PSMP:1;
+ USHORT CCKmodein40:1;
+ USHORT AMsduSize:1;
+ USHORT DelayedBA:1;
+ USHORT RxSTBC:2;
+ USHORT TxSTBC:1;
+ USHORT ShortGIfor40:1;
+ USHORT ShortGIfor20:1;
+ USHORT GF:1;
+ USHORT MimoPs:2;
+ USHORT ChannelWidth:1;
+ USHORT AdvCoding:1;
+#else
+ USHORT AdvCoding:1;
+ USHORT ChannelWidth:1;
+ USHORT MimoPs:2; /* mimo power safe */
+ USHORT GF:1; /* green field */
+ USHORT ShortGIfor20:1;
+ USHORT ShortGIfor40:1; /* for40MHz */
+ USHORT TxSTBC:1; /* 0:not supported, 1:if supported */
+ USHORT RxSTBC:2;
+ USHORT DelayedBA:1;
+ USHORT AMsduSize:1; /* only support as zero */
+ USHORT CCKmodein40:1;
+ USHORT PSMP:1;
+ USHORT Forty_Mhz_Intolerant:1;
+ USHORT LSIGTxopProSup:1;
+#endif /* RT_BIG_ENDIAN */
+} HT_CAP_INFO, *PHT_CAP_INFO;
+
+
+/* HT Capability INFO field in HT Cap IE . */
+typedef struct GNU_PACKED _HT_CAP_PARM{
+#ifdef RT_BIG_ENDIAN
+ UCHAR rsv:3;/*momi power safe */
+ UCHAR MpduDensity:3;
+ UCHAR MaxRAmpduFactor:2;
+#else
+ UCHAR MaxRAmpduFactor:2;
+ UCHAR MpduDensity:3;
+ UCHAR rsv:3;/*momi power safe */
+#endif /* RT_BIG_ENDIAN */
+} HT_CAP_PARM, *PHT_CAP_PARM;
+
+
+typedef struct GNU_PACKED _HT_MCS_SET_TX_SUBFIELD{
+#ifdef RT_BIG_ENDIAN
+ UCHAR TxMCSSetDefined:1;
+ UCHAR TxRxNotEqual:1;
+ UCHAR TxMaxStream:2;
+ UCHAR TxUnqualModulation:1;
+ UCHAR rsv:3;
+#else
+ UCHAR rsv:3;
+ UCHAR TxUnqualModulation:1;
+ UCHAR TxMaxStream:2;
+ UCHAR TxRxNotEqual:1;
+ UCHAR TxMCSSetDefined:1;
+#endif /* RT_BIG_ENDIAN */
+}HT_MCS_SET_TX_SUBFIELD, *PHT_MCS_SET_TX_SUBFIELD;
+
+
+/* HT Capability INFO field in HT Cap IE . */
+typedef struct GNU_PACKED _HT_MCS_SET{
+ UCHAR MCSSet[10];
+ UCHAR SupRate[2]; /* unit : 1Mbps */
+#ifdef RT_BIG_ENDIAN
+ UCHAR rsv:3;
+ UCHAR MpduDensity:1;
+ UCHAR TxStream:2;
+ UCHAR TxRxNotEqual:1;
+ UCHAR TxMCSSetDefined:1;
+#else
+ UCHAR TxMCSSetDefined:1;
+ UCHAR TxRxNotEqual:1;
+ UCHAR TxStream:2;
+ UCHAR MpduDensity:1;
+ UCHAR rsv:3;
+#endif /* RT_BIG_ENDIAN */
+ UCHAR rsv3[3];
+} HT_MCS_SET, *PHT_MCS_SET;
+
+/* HT Capability INFO field in HT Cap IE . */
+typedef struct GNU_PACKED _EXT_HT_CAP_INFO{
+#ifdef RT_BIG_ENDIAN
+ USHORT rsv2:4;
+ USHORT RDGSupport:1; /*reverse Direction Grant support */
+ USHORT PlusHTC:1; /*+HTC control field support */
+ USHORT MCSFeedback:2; /*0:no MCS feedback, 2:unsolicited MCS feedback, 3:Full MCS feedback, 1:rsv. */
+ USHORT rsv:5;/*momi power safe */
+ USHORT TranTime:2;
+ USHORT Pco:1;
+#else
+ USHORT Pco:1;
+ USHORT TranTime:2;
+ USHORT rsv:5;/*momi power safe */
+ USHORT MCSFeedback:2; /*0:no MCS feedback, 2:unsolicited MCS feedback, 3:Full MCS feedback, 1:rsv. */
+ USHORT PlusHTC:1; /*+HTC control field support */
+ USHORT RDGSupport:1; /*reverse Direction Grant support */
+ USHORT rsv2:4;
+#endif /* RT_BIG_ENDIAN */
+} EXT_HT_CAP_INFO, *PEXT_HT_CAP_INFO;
+
+/* HT Explicit Beamforming Feedback Capable */
+#define HT_ExBF_FB_CAP_NONE 0
+#define HT_ExBF_FB_CAP_DELAYED 1
+#define HT_ExBF_FB_CAP_IMMEDIATE 2
+#define HT_ExBF_FB_CAP_BOTH 3
+
+/* HT Beamforming field in HT Cap IE */
+typedef struct GNU_PACKED _HT_BF_CAP{
+#ifdef RT_BIG_ENDIAN
+ ULONG rsv:3;
+ ULONG ChanEstimation:2;
+ ULONG CSIRowBFSup:2;
+ ULONG ComSteerBFAntSup:2;
+ ULONG NoComSteerBFAntSup:2;
+ ULONG CSIBFAntSup:2;
+ ULONG MinGrouping:2;
+ ULONG ExpComBF:2;
+ ULONG ExpNoComBF:2;
+ ULONG ExpCSIFbk:2;
+ ULONG ExpComSteerCapable:1;
+ ULONG ExpNoComSteerCapable:1;
+ ULONG ExpCSICapable:1;
+ ULONG Calibration:2;
+ ULONG ImpTxBFCapable:1;
+ ULONG TxNDPCapable:1;
+ ULONG RxNDPCapable:1;
+ ULONG TxSoundCapable:1;
+ ULONG RxSoundCapable:1;
+ ULONG TxBFRecCapable:1;
+#else
+ ULONG TxBFRecCapable:1;
+ ULONG RxSoundCapable:1;
+ ULONG TxSoundCapable:1;
+ ULONG RxNDPCapable:1;
+ ULONG TxNDPCapable:1;
+ ULONG ImpTxBFCapable:1;
+ ULONG Calibration:2;
+ ULONG ExpCSICapable:1;
+ ULONG ExpNoComSteerCapable:1;
+ ULONG ExpComSteerCapable:1;
+ ULONG ExpCSIFbk:2;
+ ULONG ExpNoComBF:2;
+ ULONG ExpComBF:2;
+ ULONG MinGrouping:2;
+ ULONG CSIBFAntSup:2;
+ ULONG NoComSteerBFAntSup:2;
+ ULONG ComSteerBFAntSup:2;
+ ULONG CSIRowBFSup:2;
+ ULONG ChanEstimation:2;
+ ULONG rsv:3;
+#endif /* RT_BIG_ENDIAN */
+} HT_BF_CAP, *PHT_BF_CAP;
+
+/* HT antenna selection field in HT Cap IE . */
+typedef struct GNU_PACKED _HT_AS_CAP{
+#ifdef RT_BIG_ENDIAN
+ UCHAR rsv:1;
+ UCHAR TxSoundPPDU:1;
+ UCHAR RxASel:1;
+ UCHAR AntIndFbk:1;
+ UCHAR ExpCSIFbk:1;
+ UCHAR AntIndFbkTxASEL:1;
+ UCHAR ExpCSIFbkTxASEL:1;
+ UCHAR AntSelect:1;
+#else
+ UCHAR AntSelect:1;
+ UCHAR ExpCSIFbkTxASEL:1;
+ UCHAR AntIndFbkTxASEL:1;
+ UCHAR ExpCSIFbk:1;
+ UCHAR AntIndFbk:1;
+ UCHAR RxASel:1;
+ UCHAR TxSoundPPDU:1;
+ UCHAR rsv:1;
+#endif /* RT_BIG_ENDIAN */
+} HT_AS_CAP, *PHT_AS_CAP;
+
+/* Draft 1.0 set IE length 26, but is extensible.. */
+#define SIZE_HT_CAP_IE 26
+/* The structure for HT Capability IE. */
+typedef struct GNU_PACKED _HT_CAPABILITY_IE{
+ HT_CAP_INFO HtCapInfo;
+ HT_CAP_PARM HtCapParm;
+/* HT_MCS_SET HtMCSSet; */
+ UCHAR MCSSet[16];
+ EXT_HT_CAP_INFO ExtHtCapInfo;
+ HT_BF_CAP TxBFCap; /* beamforming cap. rt2860c not support beamforming. */
+ HT_AS_CAP ASCap; /*antenna selection. */
+} HT_CAPABILITY_IE, *PHT_CAPABILITY_IE;
+
+
+/* 802.11n draft3 related structure definitions. */
+/* 7.3.2.60 */
+#define dot11OBSSScanPassiveDwell 20 /* in TU. min amount of time that the STA continously scans each channel when performing an active OBSS scan. */
+#define dot11OBSSScanActiveDwell 10 /* in TU.min amount of time that the STA continously scans each channel when performing an passive OBSS scan. */
+#define dot11BSSWidthTriggerScanInterval 300 /* in sec. max interval between scan operations to be performed to detect BSS channel width trigger events. */
+#define dot11OBSSScanPassiveTotalPerChannel 200 /* in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan. */
+#define dot11OBSSScanActiveTotalPerChannel 20 /*in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan */
+#define dot11BSSWidthChannelTransactionDelayFactor 5 /* min ratio between the delay time in performing a switch from 20MHz BSS to 20/40 BSS operation and the maximum */
+ /* interval between overlapping BSS scan operations. */
+#define dot11BSSScanActivityThreshold 25 /* in %%, max total time that a STA may be active on the medium during a period of */
+ /* (dot11BSSWidthChannelTransactionDelayFactor * dot11BSSWidthTriggerScanInterval) seconds without */
+ /* being obligated to perform OBSS Scan operations. default is 25(== 0.25%) */
+
+typedef struct GNU_PACKED _OVERLAP_BSS_SCAN_IE{
+ USHORT ScanPassiveDwell;
+ USHORT ScanActiveDwell;
+ USHORT TriggerScanInt; /* Trigger scan interval */
+ USHORT PassiveTalPerChannel; /* passive total per channel */
+ USHORT ActiveTalPerChannel; /* active total per channel */
+ USHORT DelayFactor; /* BSS width channel transition delay factor */
+ USHORT ScanActThre; /* Scan Activity threshold */
+}OVERLAP_BSS_SCAN_IE, *POVERLAP_BSS_SCAN_IE;
+
+
+/* 7.3.2.56. 20/40 Coexistence element used in Element ID = 72 = IE_2040_BSS_COEXIST */
+typedef union GNU_PACKED _BSS_2040_COEXIST_IE{
+ struct GNU_PACKED {
+ #ifdef RT_BIG_ENDIAN
+ UCHAR rsv:3;
+ UCHAR ObssScanExempGrant:1;
+ UCHAR ObssScanExempReq:1;
+ UCHAR BSS20WidthReq:1;
+ UCHAR Intolerant40:1;
+ UCHAR InfoReq:1;
+ #else
+ UCHAR InfoReq:1;
+ UCHAR Intolerant40:1; /* Inter-BSS. set 1 when prohibits a receiving BSS from operating as a 20/40 Mhz BSS. */
+ UCHAR BSS20WidthReq:1; /* Intra-BSS set 1 when prohibits a receiving AP from operating its BSS as a 20/40MHz BSS. */
+ UCHAR ObssScanExempReq:1;
+ UCHAR ObssScanExempGrant:1;
+ UCHAR rsv:3;
+#endif /* RT_BIG_ENDIAN */
+ } field;
+ UCHAR word;
+} BSS_2040_COEXIST_IE, *PBSS_2040_COEXIST_IE;
+
+
+typedef struct _TRIGGER_EVENTA{
+ BOOLEAN bValid;
+ UCHAR BSSID[6];
+ UCHAR RegClass; /* Regulatory Class */
+ USHORT Channel;
+} TRIGGER_EVENTA, *PTRIGGER_EVENTA;
+
+
+/* 20/40 trigger event table */
+/* If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP. */
+#define MAX_TRIGGER_EVENT 64
+typedef struct _TRIGGER_EVENT_TAB{
+ UCHAR EventANo;
+ TRIGGER_EVENTA EventA[MAX_TRIGGER_EVENT];
+ ULONG EventBCountDown; /* Count down counter for Event B. */
+} TRIGGER_EVENT_TAB, *PTRIGGER_EVENT_TAB;
+
+
+/* 7.3.27 20/40 Bss Coexistence Mgmt capability used in extended capabilities information IE( ID = 127 = IE_EXT_CAPABILITY). */
+/* This is the first octet and was defined in 802.11n D3.03 and 802.11yD9.0 */
+typedef struct GNU_PACKED _EXT_CAP_INFO_ELEMENT{
+#ifdef RT_BIG_ENDIAN
+ // TODO: shiang-6590, check the data structure format if this IE
+ UINT32 rsv7:1;
+ UINT32 TDLSChSwitchSupport:1; /* bit30: TDLS Channel Switching */
+ UINT32 TDLSPeerPSMSupport:1; /* bit29: TDLS Peer PSM Support */
+ UINT32 UAPSDBufSTASupport:1; /* bit28: Peer U-APSD Buffer STA Support */
+ UINT32 rsv6:1;
+ UINT32 DMSSupport:1;
+ UINT32 rsv5:6;
+ UINT32 BssTransitionManmt:1;
+ UINT32 rsv4:1;
+ UINT32 WNMSleepSupport:1;/*bit 17*/
+ UINT32 TFSSupport:1;/*bit 16*/
+ UINT32 rsv3:4;
+ UINT32 FMSSupport:1;/*bit 11*/
+ UINT32 rsv2:8;
+ UINT32 ExtendChannelSwitch:1;
+ UINT32 rsv:1;
+ UINT32 BssCoexistMgmtSupport:1;
+#else
+ UINT32 BssCoexistMgmtSupport:1;
+ UINT32 rsv:1;
+ UINT32 ExtendChannelSwitch:1;
+ UINT32 rsv2:8;
+ UINT32 FMSSupport:1;/*bit 11*/
+ UINT32 rsv3:4;
+ UINT32 TFSSupport:1;/*bit 16*/
+ UINT32 WNMSleepSupport:1;/*bit 17*/
+ UINT32 rsv4:1;
+ UINT32 BssTransitionManmt:1;
+ UINT32 rsv5:6;
+ UINT32 DMSSupport:1;
+ UINT32 rsv6:1;
+ UINT32 UAPSDBufSTASupport:1; /* bit28: Peer U-APSD Buffer STA Support */
+ UINT32 TDLSPeerPSMSupport:1; /* bit29: TDLS Peer PSM Support */
+ UINT32 TDLSChSwitchSupport:1; /* bit30: TDLS Channel Switching */
+ UINT32 rsv7:1;
+#endif /* RT_BIG_ENDIAN */
+
+}EXT_CAP_INFO_ELEMENT, *PEXT_CAP_INFO_ELEMENT;
+
+
+/* 802.11n 7.3.2.61 */
+typedef struct GNU_PACKED _BSS_2040_COEXIST_ELEMENT{
+ UCHAR ElementID; /* ID = IE_2040_BSS_COEXIST = 72 */
+ UCHAR Len;
+ BSS_2040_COEXIST_IE BssCoexistIe;
+}BSS_2040_COEXIST_ELEMENT, *PBSS_2040_COEXIST_ELEMENT;
+
+
+/*802.11n 7.3.2.59 */
+typedef struct GNU_PACKED _BSS_2040_INTOLERANT_CH_REPORT{
+ UCHAR ElementID; /* ID = IE_2040_BSS_INTOLERANT_REPORT = 73 */
+ UCHAR Len;
+ UCHAR RegulatoryClass;
+ UCHAR ChList[0];
+}BSS_2040_INTOLERANT_CH_REPORT, *PBSS_2040_INTOLERANT_CH_REPORT;
+
+
+/* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */
+typedef struct GNU_PACKED _CHA_SWITCH_ANNOUNCE_IE{
+ UCHAR SwitchMode; /*channel switch mode */
+ UCHAR NewChannel; /* */
+ UCHAR SwitchCount; /* */
+} CHA_SWITCH_ANNOUNCE_IE, *PCHA_SWITCH_ANNOUNCE_IE;
+
+
+/* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */
+typedef struct GNU_PACKED _SEC_CHA_OFFSET_IE{
+ UCHAR SecondaryChannelOffset; /* 1: Secondary above, 3: Secondary below, 0: no Secondary */
+} SEC_CHA_OFFSET_IE, *PSEC_CHA_OFFSET_IE;
+
+
+/* This structure is extracted from struct RT_HT_CAPABILITY and RT_VHT_CAP */
+typedef struct _RT_PHY_INFO{
+ BOOLEAN bHtEnable; /* If we should use ht rate. */
+ BOOLEAN bPreNHt; /* If we should use ht rate. */
+ /*Substract from HT Capability IE */
+ UCHAR MCSSet[16];
+#ifdef DOT11_VHT_AC
+ BOOLEAN bVhtEnable;
+ UCHAR vht_bw;
+ VHT_MCS_SET vht_mcs_set;
+#endif /* DOT11_VHT_AC */
+} RT_PHY_INFO;
+
+
+#ifdef DOT11_VHT_AC
+typedef struct _RT_VHT_CAP{
+ UINT32 vht_bw:2;
+ UINT32 vht_txstbc:1;
+ UINT32 vht_rxstbc:3;
+ UINT32 sgi_80m:1;
+ UINT32 vht_htc:1;
+
+ UINT32 vht_mcs_ss1:2;
+ UINT32 vht_mcs_ss2:2;
+ UINT32 vht_rx_rate:2;
+ UINT32 vht_tx_rate:2;
+
+ UINT32 rsv:16;
+}RT_VHT_CAP;
+#endif /* DOT11_VHT_AC */
+
+
+/*
+ This structure substracts ralink supports from all 802.11n-related features.
+ Features not listed here but contained in 802.11n spec are not supported in rt2860
+*/
+typedef struct {
+#ifdef RT_BIG_ENDIAN
+ USHORT rsv:5;
+ USHORT AmsduSize:1; /* Max receiving A-MSDU size */
+ USHORT AmsduEnable:1; /* Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n */
+ USHORT RxSTBC:2;
+ USHORT TxSTBC:1;
+ USHORT ShortGIfor40:1; /*for40MHz */
+ USHORT ShortGIfor20:1;
+ USHORT GF:1; /*green field */
+ USHORT MimoPs:2;/*mimo power safe MMPS_ */
+ USHORT ChannelWidth:1;
+#else
+ USHORT ChannelWidth:1;
+ USHORT MimoPs:2;/*mimo power safe MMPS_ */
+ USHORT GF:1; /*green field */
+ USHORT ShortGIfor20:1;
+ USHORT ShortGIfor40:1; /*for 40MHz */
+ USHORT TxSTBC:1; /* 0:not supported, 1:if supported */
+ USHORT RxSTBC:2; /* 2 bits */
+ USHORT AmsduEnable:1; /* Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n */
+ USHORT AmsduSize:1; /* Max receiving A-MSDU size */
+ USHORT rsv:5;
+#endif
+
+ /*Substract from Addiont HT INFO IE */
+#ifdef RT_BIG_ENDIAN
+ UCHAR RecomWidth:1;
+ UCHAR ExtChanOffset:2; /* Please not the difference with following UCHAR NewExtChannelOffset; from 802.11n */
+ UCHAR MpduDensity:3;
+ UCHAR MaxRAmpduFactor:2;
+#else
+ UCHAR MaxRAmpduFactor:2;
+ UCHAR MpduDensity:3;
+ UCHAR ExtChanOffset:2; /* Please not the difference with following UCHAR NewExtChannelOffset; from 802.11n */
+ UCHAR RecomWidth:1;
+#endif
+
+#ifdef RT_BIG_ENDIAN
+ USHORT rsv2:11;
+ USHORT OBSS_NonHTExist:1;
+ USHORT rsv3:1;
+ USHORT NonGfPresent:1;
+ USHORT OperaionMode:2;
+#else
+ USHORT OperaionMode:2;
+ USHORT NonGfPresent:1;
+ USHORT rsv3:1;
+ USHORT OBSS_NonHTExist:1;
+ USHORT rsv2:11;
+#endif
+
+ /* New Extension Channel Offset IE */
+ UCHAR NewExtChannelOffset;
+ /* Extension Capability IE = 127 */
+ UCHAR BSSCoexist2040;
+} RT_HT_CAPABILITY, *PRT_HT_CAPABILITY;
+
+
+/* field in Addtional HT Information IE . */
+typedef struct GNU_PACKED _ADD_HTINFO{
+#ifdef RT_BIG_ENDIAN
+ UCHAR SerInterGranu:3;
+ UCHAR S_PSMPSup:1;
+ UCHAR RifsMode:1;
+ UCHAR RecomWidth:1;
+ UCHAR ExtChanOffset:2;
+#else
+ UCHAR ExtChanOffset:2;
+ UCHAR RecomWidth:1;
+ UCHAR RifsMode:1;
+ UCHAR S_PSMPSup:1; /*Indicate support for scheduled PSMP */
+ UCHAR SerInterGranu:3; /*service interval granularity */
+#endif
+} ADD_HTINFO, *PADD_HTINFO;
+
+
+typedef struct GNU_PACKED _ADD_HTINFO2{
+#ifdef RT_BIG_ENDIAN
+ USHORT rsv2:11;
+ USHORT OBSS_NonHTExist:1;
+ USHORT rsv:1;
+ USHORT NonGfPresent:1;
+ USHORT OperaionMode:2;
+#else
+ USHORT OperaionMode:2;
+ USHORT NonGfPresent:1;
+ USHORT rsv:1;
+ USHORT OBSS_NonHTExist:1;
+ USHORT rsv2:11;
+#endif
+} ADD_HTINFO2, *PADD_HTINFO2;
+
+
+/* TODO: Need sync with spec about the definition of StbcMcs. In Draft 3.03, it's reserved. */
+typedef struct GNU_PACKED _ADD_HTINFO3{
+#ifdef RT_BIG_ENDIAN
+ USHORT rsv:4;
+ USHORT PcoPhase:1;
+ USHORT PcoActive:1;
+ USHORT LsigTxopProt:1;
+ USHORT STBCBeacon:1;
+ USHORT DualCTSProtect:1;
+ USHORT DualBeacon:1;
+ USHORT StbcMcs:6;
+#else
+ USHORT StbcMcs:6;
+ USHORT DualBeacon:1;
+ USHORT DualCTSProtect:1;
+ USHORT STBCBeacon:1;
+ USHORT LsigTxopProt:1; /* L-SIG TXOP protection full support */
+ USHORT PcoActive:1;
+ USHORT PcoPhase:1;
+ USHORT rsv:4;
+#endif /* RT_BIG_ENDIAN */
+} ADD_HTINFO3, *PADD_HTINFO3;
+
+#define SIZE_ADD_HT_INFO_IE 22
+typedef struct GNU_PACKED _ADD_HT_INFO_IE{
+ UCHAR ControlChan;
+ ADD_HTINFO AddHtInfo;
+ ADD_HTINFO2 AddHtInfo2;
+ ADD_HTINFO3 AddHtInfo3;
+ UCHAR MCSSet[16]; /* Basic MCS set */
+} ADD_HT_INFO_IE, *PADD_HT_INFO_IE;
+
+typedef struct GNU_PACKED _NEW_EXT_CHAN_IE{
+ UCHAR NewExtChanOffset;
+} NEW_EXT_CHAN_IE, *PNEW_EXT_CHAN_IE;
+
+typedef struct GNU_PACKED _FRAME_802_11 {
+ HEADER_802_11 Hdr;
+ UCHAR Octet[1];
+} FRAME_802_11, *PFRAME_802_11;
+
+/* QoSNull embedding of management action. When HT Control MA field set to 1. */
+typedef struct GNU_PACKED _MA_BODY {
+ UCHAR Category;
+ UCHAR Action;
+ UCHAR Octet[1];
+} MA_BODY, *PMA_BODY;
+
+typedef struct GNU_PACKED _HEADER_802_3 {
+ UCHAR DAAddr1[MAC_ADDR_LEN];
+ UCHAR SAAddr2[MAC_ADDR_LEN];
+ UCHAR Octet[2];
+} HEADER_802_3, *PHEADER_802_3;
+
+
+/* Block ACK related format */
+/* 2-byte BA Parameter field in DELBA frames to terminate an already set up bA */
+typedef struct GNU_PACKED _DELBA_PARM{
+#ifdef RT_BIG_ENDIAN
+ USHORT TID:4; /* value of TC os TS */
+ USHORT Initiator:1; /* 1: originator 0:recipient */
+ USHORT Rsv:11; /* always set to 0 */
+#else
+ USHORT Rsv:11; /* always set to 0 */
+ USHORT Initiator:1; /* 1: originator 0:recipient */
+ USHORT TID:4; /* value of TC os TS */
+#endif /* RT_BIG_ENDIAN */
+} DELBA_PARM, *PDELBA_PARM;
+
+/* 2-byte BA Parameter Set field in ADDBA frames to signal parm for setting up a BA */
+typedef struct GNU_PACKED _BA_PARM{
+#ifdef RT_BIG_ENDIAN
+ USHORT BufSize:10; /* number of buffe of size 2304 octetsr */
+ USHORT TID:4; /* value of TC os TS */
+ USHORT BAPolicy:1; /* 1: immediately BA 0:delayed BA */
+ USHORT AMSDUSupported:1; /* 0: not permitted 1: permitted */
+#else
+ USHORT AMSDUSupported:1; /* 0: not permitted 1: permitted */
+ USHORT BAPolicy:1; /* 1: immediately BA 0:delayed BA */
+ USHORT TID:4; /* value of TC os TS */
+ USHORT BufSize:10; /* number of buffe of size 2304 octetsr */
+#endif /* RT_BIG_ENDIAN */
+} BA_PARM, *PBA_PARM;
+
+/* 2-byte BA Starting Seq CONTROL field */
+typedef union GNU_PACKED _BASEQ_CONTROL{
+ struct GNU_PACKED {
+#ifdef RT_BIG_ENDIAN
+ USHORT StartSeq:12; /* sequence number of the 1st MSDU for which this BAR is sent */
+ USHORT FragNum:4; /* always set to 0 */
+#else
+ USHORT FragNum:4; /* always set to 0 */
+ USHORT StartSeq:12; /* sequence number of the 1st MSDU for which this BAR is sent */
+#endif /* RT_BIG_ENDIAN */
+ } field;
+ USHORT word;
+} BASEQ_CONTROL, *PBASEQ_CONTROL;
+
+/*BAControl and BARControl are the same */
+/* 2-byte BA CONTROL field in BA frame */
+typedef struct GNU_PACKED _BA_CONTROL{
+#ifdef RT_BIG_ENDIAN
+ USHORT TID:4;
+ USHORT Rsv:9;
+ USHORT Compressed:1;
+ USHORT MTID:1; /*EWC V1.24 */
+ USHORT ACKPolicy:1; /* only related to N-Delayed BA. But not support in RT2860b. 0:NormalACK 1:No ACK */
+#else
+ USHORT ACKPolicy:1; /* only related to N-Delayed BA. But not support in RT2860b. 0:NormalACK 1:No ACK */
+ USHORT MTID:1; /*EWC V1.24 */
+ USHORT Compressed:1;
+ USHORT Rsv:9;
+ USHORT TID:4;
+#endif /* RT_BIG_ENDIAN */
+} BA_CONTROL, *PBA_CONTROL;
+
+/* 2-byte BAR CONTROL field in BAR frame */
+typedef struct GNU_PACKED _BAR_CONTROL{
+#ifdef RT_BIG_ENDIAN
+ USHORT TID:4;
+ USHORT Rsv1:9;
+ USHORT Compressed:1;
+ USHORT MTID:1; /*if this bit1, use FRAME_MTBA_REQ, if 0, use FRAME_BA_REQ */
+ USHORT ACKPolicy:1;
+#else
+ USHORT ACKPolicy:1; /* 0:normal ack, 1:no ack. */
+ USHORT MTID:1; /*if this bit1, use FRAME_MTBA_REQ, if 0, use FRAME_BA_REQ */
+ USHORT Compressed:1;
+ USHORT Rsv1:9;
+ USHORT TID:4;
+#endif /* !RT_BIG_ENDIAN */
+} BAR_CONTROL, *PBAR_CONTROL;
+
+/* BARControl in MTBAR frame */
+typedef struct GNU_PACKED _MTBAR_CONTROL{
+#ifdef RT_BIG_ENDIAN
+ USHORT NumTID:4;
+ USHORT Rsv1:9;
+ USHORT Compressed:1;
+ USHORT MTID:1;
+ USHORT ACKPolicy:1;
+#else
+ USHORT ACKPolicy:1;
+ USHORT MTID:1;
+ USHORT Compressed:1;
+ USHORT Rsv1:9;
+ USHORT NumTID:4;
+#endif /* RT_BIG_ENDIAN */
+} MTBAR_CONTROL, *PMTBAR_CONTROL;
+
+typedef struct GNU_PACKED _PER_TID_INFO{
+#ifdef RT_BIG_ENDIAN
+ USHORT TID:4;
+ USHORT Rsv1:12;
+#else
+ USHORT Rsv1:12;
+ USHORT TID:4;
+#endif /* RT_BIG_ENDIAN */
+} PER_TID_INFO, *PPER_TID_INFO;
+
+typedef struct {
+ PER_TID_INFO PerTID;
+ BASEQ_CONTROL BAStartingSeq;
+} EACH_TID, *PEACH_TID;
+
+
+/* BAREQ AND MTBAREQ have the same subtype BAR, 802.11n BAR use compressed bitmap. */
+typedef struct GNU_PACKED _FRAME_BA_REQ {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+ BAR_CONTROL BARControl;
+ BASEQ_CONTROL BAStartingSeq;
+} FRAME_BA_REQ, *PFRAME_BA_REQ;
+
+typedef struct GNU_PACKED _FRAME_MTBA_REQ {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+ MTBAR_CONTROL MTBARControl;
+ PER_TID_INFO PerTIDInfo;
+ BASEQ_CONTROL BAStartingSeq;
+} FRAME_MTBA_REQ, *PFRAME_MTBA_REQ;
+
+/* Compressed format is mandantory in HT STA */
+typedef struct GNU_PACKED _FRAME_MTBA {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+ BA_CONTROL BAControl;
+ BASEQ_CONTROL BAStartingSeq;
+ UCHAR BitMap[8];
+} FRAME_MTBA, *PFRAME_MTBA;
+
+typedef struct GNU_PACKED _FRAME_PSMP_ACTION {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ UCHAR Psmp; /* 7.3.1.25 */
+} FRAME_PSMP_ACTION, *PFRAME_PSMP_ACTION;
+
+typedef struct GNU_PACKED _FRAME_ACTION_HDR {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+} FRAME_ACTION_HDR, *PFRAME_ACTION_HDR;
+
+/*Action Frame */
+/*Action Frame Category:Spectrum, Action:Channel Switch. 7.3.2.20 */
+typedef struct GNU_PACKED _CHAN_SWITCH_ANNOUNCE {
+ UCHAR ElementID; /* ID = IE_CHANNEL_SWITCH_ANNOUNCEMENT = 37 */
+ UCHAR Len;
+ CHA_SWITCH_ANNOUNCE_IE CSAnnounceIe;
+} CHAN_SWITCH_ANNOUNCE, *PCHAN_SWITCH_ANNOUNCE;
+
+
+/*802.11n : 7.3.2.20a */
+typedef struct GNU_PACKED _SECOND_CHAN_OFFSET {
+ UCHAR ElementID; /* ID = IE_SECONDARY_CH_OFFSET = 62 */
+ UCHAR Len;
+ SEC_CHA_OFFSET_IE SecChOffsetIe;
+} SECOND_CHAN_OFFSET, *PSECOND_CHAN_OFFSET;
+
+
+typedef struct GNU_PACKED _FRAME_SPETRUM_CS {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ CHAN_SWITCH_ANNOUNCE CSAnnounce;
+ SECOND_CHAN_OFFSET SecondChannel;
+} FRAME_SPETRUM_CS, *PFRAME_SPETRUM_CS;
+
+
+typedef struct GNU_PACKED _FRAME_ADDBA_REQ {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ UCHAR Token; /* 1 */
+ BA_PARM BaParm; /* 2 - 10 */
+ USHORT TimeOutValue; /* 0 - 0 */
+ BASEQ_CONTROL BaStartSeq; /* 0-0 */
+} FRAME_ADDBA_REQ, *PFRAME_ADDBA_REQ;
+
+typedef struct GNU_PACKED _FRAME_ADDBA_RSP {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ UCHAR Token;
+ USHORT StatusCode;
+ BA_PARM BaParm; /*0 - 2 */
+ USHORT TimeOutValue;
+} FRAME_ADDBA_RSP, *PFRAME_ADDBA_RSP;
+
+typedef struct GNU_PACKED _FRAME_DELBA_REQ {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ DELBA_PARM DelbaParm;
+ USHORT ReasonCode;
+} FRAME_DELBA_REQ, *PFRAME_DELBA_REQ;
+
+
+/*7.2.1.7 */
+typedef struct GNU_PACKED _FRAME_BAR {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+ BAR_CONTROL BarControl;
+ BASEQ_CONTROL StartingSeq;
+} FRAME_BAR, *PFRAME_BAR;
+
+/*7.2.1.7 */
+typedef struct GNU_PACKED _FRAME_BA {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+ BAR_CONTROL BarControl;
+ BASEQ_CONTROL StartingSeq;
+ UCHAR bitmask[8];
+} FRAME_BA, *PFRAME_BA;
+
+
+/* Radio Measuement Request Frame Format */
+typedef struct GNU_PACKED _FRAME_RM_REQ_ACTION {
+ HEADER_802_11 Hdr;
+ UCHAR Category;
+ UCHAR Action;
+ UCHAR Token;
+ USHORT Repetition;
+ UCHAR data[0];
+} FRAME_RM_REQ_ACTION, *PFRAME_RM_REQ_ACTION;
+
+typedef struct GNU_PACKED _HT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE{
+ UCHAR ID;
+ UCHAR Length;
+ UCHAR ChannelSwitchMode;
+ UCHAR NewRegClass;
+ UCHAR NewChannelNum;
+ UCHAR ChannelSwitchCount;
+} HT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE, *PHT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE;
+
+
+/* */
+/* _Limit must be the 2**n - 1 */
+/* _SEQ1 , _SEQ2 must be within 0 ~ _Limit */
+/* */
+#define SEQ_STEPONE(_SEQ1, _SEQ2, _Limit) ((_SEQ1 == ((_SEQ2+1) & _Limit)))
+#define SEQ_SMALLER(_SEQ1, _SEQ2, _Limit) (((_SEQ1-_SEQ2) & ((_Limit+1)>>1)))
+#define SEQ_LARGER(_SEQ1, _SEQ2, _Limit) ((_SEQ1 != _SEQ2) && !(((_SEQ1-_SEQ2) & ((_Limit+1)>>1))))
+#define SEQ_WITHIN_WIN(_SEQ1, _SEQ2, _WIN, _Limit) (SEQ_LARGER(_SEQ1, _SEQ2, _Limit) && \
+ SEQ_SMALLER(_SEQ1, ((_SEQ2+_WIN+1)&_Limit), _Limit))
+
+/* */
+/* Contention-free parameter (without ID and Length) */
+/* */
+typedef struct GNU_PACKED _CF_PARM{
+ BOOLEAN bValid; /* 1: variable contains valid value */
+ UCHAR CfpCount;
+ UCHAR CfpPeriod;
+ USHORT CfpMaxDuration;
+ USHORT CfpDurRemaining;
+} CF_PARM, *PCF_PARM;
+
+typedef struct _CIPHER_SUITE {
+ NDIS_802_11_ENCRYPTION_STATUS PairCipher; /* Unicast cipher 1, this one has more secured cipher suite */
+ NDIS_802_11_ENCRYPTION_STATUS PairCipherAux; /* Unicast cipher 2 if AP announce two unicast cipher suite */
+ NDIS_802_11_ENCRYPTION_STATUS GroupCipher; /* Group cipher */
+ USHORT RsnCapability; /* RSN capability from beacon */
+ BOOLEAN bMixMode; /* Indicate Pair & Group cipher might be different */
+} CIPHER_SUITE, *PCIPHER_SUITE;
+
+
+/* EDCA configuration from AP's BEACON/ProbeRsp */
+typedef struct {
+ BOOLEAN bValid; /* 1: variable contains valid value */
+ BOOLEAN bAdd; /* 1: variable contains valid value */
+ BOOLEAN bQAck;
+ BOOLEAN bQueueRequest;
+ BOOLEAN bTxopRequest;
+ BOOLEAN bAPSDCapable;
+/* BOOLEAN bMoreDataAck; */
+ UCHAR EdcaUpdateCount;
+ UCHAR Aifsn[4]; /* 0:AC_BK, 1:AC_BE, 2:AC_VI, 3:AC_VO */
+ UCHAR Cwmin[4];
+ UCHAR Cwmax[4];
+ USHORT Txop[4]; /* in unit of 32-us */
+ BOOLEAN bACM[4]; /* 1: Admission Control of AC_BK is mandattory */
+} EDCA_PARM, *PEDCA_PARM;
+
+/* QBSS LOAD information from QAP's BEACON/ProbeRsp */
+typedef struct {
+ BOOLEAN bValid; /* 1: variable contains valid value */
+ USHORT StaNum;
+ UCHAR ChannelUtilization;
+ USHORT RemainingAdmissionControl; /* in unit of 32-us */
+} QBSS_LOAD_PARM, *PQBSS_LOAD_PARM;
+
+/* QBSS Info field in QSTA's assoc req */
+typedef struct GNU_PACKED _QBSS_STA_INFO_PARM{
+#ifdef RT_BIG_ENDIAN
+ UCHAR Rsv2:1;
+ UCHAR MaxSPLength:2;
+ UCHAR Rsv1:1;
+ UCHAR UAPSD_AC_BE:1;
+ UCHAR UAPSD_AC_BK:1;
+ UCHAR UAPSD_AC_VI:1;
+ UCHAR UAPSD_AC_VO:1;
+#else
+ UCHAR UAPSD_AC_VO:1;
+ UCHAR UAPSD_AC_VI:1;
+ UCHAR UAPSD_AC_BK:1;
+ UCHAR UAPSD_AC_BE:1;
+ UCHAR Rsv1:1;
+ UCHAR MaxSPLength:2;
+ UCHAR Rsv2:1;
+#endif /* RT_BIG_ENDIAN */
+} QBSS_STA_INFO_PARM, *PQBSS_STA_INFO_PARM;
+
+typedef struct {
+ QBSS_STA_INFO_PARM QosInfo;
+ UCHAR Rsv;
+ UCHAR Q_AC_BE[4];
+ UCHAR Q_AC_BK[4];
+ UCHAR Q_AC_VI[4];
+ UCHAR Q_AC_VO[4];
+} QBSS_STA_EDCA_PARM, *PQBSS_STA_EDCA_PARM;
+
+/* QBSS Info field in QAP's Beacon/ProbeRsp */
+typedef struct GNU_PACKED _QBSS_AP_INFO_PARM{
+#ifdef RT_BIG_ENDIAN
+ UCHAR UAPSD:1;
+ UCHAR Rsv:3;
+ UCHAR ParamSetCount:4;
+#else
+ UCHAR ParamSetCount:4;
+ UCHAR Rsv:3;
+ UCHAR UAPSD:1;
+#endif /* RT_BIG_ENDIAN */
+} QBSS_AP_INFO_PARM, *PQBSS_AP_INFO_PARM;
+
+/* QOS Capability reported in QAP's BEACON/ProbeRsp */
+/* QOS Capability sent out in QSTA's AssociateReq/ReAssociateReq */
+typedef struct {
+ BOOLEAN bValid; /* 1: variable contains valid value */
+ BOOLEAN bQAck;
+ BOOLEAN bQueueRequest;
+ BOOLEAN bTxopRequest;
+/* BOOLEAN bMoreDataAck; */
+ UCHAR EdcaUpdateCount;
+} QOS_CAPABILITY_PARM, *PQOS_CAPABILITY_PARM;
+
+
+
+typedef struct {
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR Channel;
+ UCHAR CentralChannel; /*Store the wide-band central channel for 40MHz. .used in 40MHz AP. Or this is the same as Channel. */
+ UCHAR BssType;
+ USHORT AtimWin;
+ USHORT BeaconPeriod;
+
+ UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR SupRateLen;
+ UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR ExtRateLen;
+ HT_CAPABILITY_IE HtCapability;
+ UCHAR HtCapabilityLen;
+ ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */
+ UCHAR AddHtInfoLen;
+ EXT_CAP_INFO_ELEMENT ExtCapInfo; /* this is the extened capibility IE appreed in MGMT frames. Doesn't need to update once set in Init. */
+ UCHAR NewExtChanOffset;
+ CHAR Rssi;
+
+#ifdef DOT11_VHT_AC
+ UCHAR vht_cap_len;
+ UCHAR vht_op_len;
+ VHT_CAP_IE vht_cap_ie;
+ VHT_OP_IE vht_op_ie;
+#endif /* DOT11_VHT_AC */
+
+
+ CHAR MinSNR;
+ UCHAR Privacy; /* Indicate security function ON/OFF. Don't mess up with auth mode. */
+ UCHAR Hidden;
+
+ USHORT DtimPeriod;
+ USHORT CapabilityInfo;
+
+ USHORT CfpCount;
+ USHORT CfpPeriod;
+ USHORT CfpMaxDuration;
+ USHORT CfpDurRemaining;
+ UCHAR SsidLen;
+ CHAR Ssid[MAX_LEN_OF_SSID];
+
+ UCHAR SameRxTimeCount;
+ ULONG LastBeaconRxTimeA; /* OS's timestamp */
+ ULONG LastBeaconRxTime; /* OS's timestamp */
+
+ BOOLEAN bSES;
+
+ /* New for WPA2 */
+ CIPHER_SUITE WPA; /* AP announced WPA cipher suite */
+ CIPHER_SUITE WPA2; /* AP announced WPA2 cipher suite */
+#ifdef WAPI_SUPPORT
+ CIPHER_SUITE WAPI; /* AP announced WAPI cipher suite */
+#endif /* WAPI_SUPPORT */
+
+ /* New for microsoft WPA support */
+ NDIS_802_11_FIXED_IEs FixIEs;
+ NDIS_802_11_AUTHENTICATION_MODE AuthModeAux; /* Addition mode for WPA2 / WPA capable AP */
+ NDIS_802_11_AUTHENTICATION_MODE AuthMode;
+ NDIS_802_11_WEP_STATUS WepStatus; /* Unicast Encryption Algorithm extract from VAR_IE */
+ USHORT VarIELen; /* Length of next VIE include EID & Length */
+ UCHAR VarIEs[MAX_VIE_LEN];
+ USHORT VarIeFromProbeRspLen;
+ UCHAR *pVarIeFromProbRsp;
+
+ /* CCX Ckip information */
+ UCHAR CkipFlag;
+
+ /* CCX 2 TSF */
+ UCHAR PTSF[4]; /* Parent TSF */
+ UCHAR TTSF[8]; /* Target TSF */
+
+ /* 802.11e d9, and WMM */
+ EDCA_PARM EdcaParm;
+ QOS_CAPABILITY_PARM QosCapability;
+ QBSS_LOAD_PARM QbssLoad;
+
+#ifdef WSC_INCLUDED
+ UCHAR WpsAP; /* 0x00: not support WPS, 0x01: support normal WPS, 0x02: support Ralink auto WPS, 0x04: support WAC AP */
+ USHORT WscDPIDFromWpsAP;
+#endif /* WSC_INCLUDED */
+
+
+
+ UCHAR MacAddr[MAC_ADDR_LEN];
+ ULONG ClientStatusFlags;
+} BSS_ENTRY, *PBSS_ENTRY;
+
+typedef struct {
+ UCHAR BssNr;
+ UCHAR BssOverlapNr;
+ BSS_ENTRY BssEntry[MAX_LEN_OF_BSS_TABLE];
+} BSS_TABLE, *PBSS_TABLE;
+
+
+typedef struct _MLME_QUEUE_ELEM {
+ UCHAR Msg[MGMT_DMA_BUFFER_SIZE]; /* move here to fix alignment issue for ARM CPU */
+ ULONG Machine;
+ ULONG MsgType;
+ ULONG MsgLen;
+ LARGE_INTEGER TimeStamp;
+ UCHAR Rssi0;
+ UCHAR Rssi1;
+ UCHAR Rssi2;
+ UCHAR AntSel;
+ UCHAR Signal;
+ UCHAR Channel;
+ UCHAR Wcid;
+ BOOLEAN Occupied;
+ UCHAR OpMode;
+ ULONG Priv;
+} MLME_QUEUE_ELEM, *PMLME_QUEUE_ELEM;
+
+typedef struct _MLME_QUEUE {
+ ULONG Num;
+ ULONG Head;
+ ULONG Tail;
+ NDIS_SPIN_LOCK Lock;
+ MLME_QUEUE_ELEM Entry[MAX_LEN_OF_MLME_QUEUE];
+} MLME_QUEUE, *PMLME_QUEUE;
+
+typedef VOID (*STATE_MACHINE_FUNC)(VOID *pAd, MLME_QUEUE_ELEM *Elem);
+
+typedef struct _STATE_MACHINE {
+ ULONG Base;
+ ULONG NrState;
+ ULONG NrMsg;
+ ULONG CurrState;
+ STATE_MACHINE_FUNC *TransFunc;
+} STATE_MACHINE, *PSTATE_MACHINE;
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+typedef VOID (*APCLI_STATE_MACHINE_FUNC)(VOID *pAd, MLME_QUEUE_ELEM *Elem, PULONG pCurrState, USHORT ifIndex);
+
+typedef struct _STA_STATE_MACHINE {
+ ULONG Base;
+ ULONG NrState;
+ ULONG NrMsg;
+ ULONG CurrState;
+ APCLI_STATE_MACHINE_FUNC *TransFunc;
+} APCLI_STATE_MACHINE, *PSTA_STATE_MACHINE;
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+/* MLME AUX data structure that hold temporarliy settings during a connection attempt. */
+/* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */
+/* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */
+/* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */
+/* separate this under-trial settings away from pAd->StaActive so that once */
+/* this new attempt failed, driver can auto-recover back to the active settings. */
+typedef struct _MLME_AUX {
+ UCHAR BssType;
+ UCHAR Ssid[MAX_LEN_OF_SSID];
+ UCHAR SsidLen;
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR AutoReconnectSsid[MAX_LEN_OF_SSID];
+ UCHAR AutoReconnectSsidLen;
+ USHORT Alg;
+ UCHAR ScanType;
+ UCHAR Channel;
+ UCHAR CentralChannel;
+ USHORT Aid;
+ USHORT CapabilityInfo;
+ USHORT BeaconPeriod;
+ USHORT CfpMaxDuration;
+ USHORT CfpPeriod;
+ USHORT AtimWin;
+
+ /* Copy supported rate from desired AP's beacon. We are trying to match */
+ /* AP's supported and extended rate settings. */
+ UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR SupRateLen;
+ UCHAR ExtRateLen;
+ HT_CAPABILITY_IE HtCapability;
+ UCHAR HtCapabilityLen;
+ ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */
+ EXT_CAP_INFO_ELEMENT ExtCapInfo; /* this is the extened capibility IE appreed in MGMT frames. Doesn't need to update once set in Init. */
+ UCHAR NewExtChannelOffset;
+ /*RT_HT_CAPABILITY SupportedHtPhy; */
+
+#ifdef DOT11_VHT_AC
+ UCHAR vht_cap_len;
+ UCHAR vht_op_len;
+ VHT_CAP_IE vht_cap;
+ VHT_OP_IE vht_op;
+#endif /* DOT11_VHT_AC */
+
+ /* new for QOS */
+ QOS_CAPABILITY_PARM APQosCapability; /* QOS capability of the current associated AP */
+ EDCA_PARM APEdcaParm; /* EDCA parameters of the current associated AP */
+ QBSS_LOAD_PARM APQbssLoad; /* QBSS load of the current associated AP */
+
+ /* new to keep Ralink specific feature */
+ ULONG APRalinkIe;
+
+ BSS_TABLE SsidBssTab; /* AP list for the same SSID */
+ BSS_TABLE RoamTab; /* AP list eligible for roaming */
+ ULONG BssIdx;
+ ULONG RoamIdx;
+
+ BOOLEAN CurrReqIsFromNdis;
+
+ RALINK_TIMER_STRUCT BeaconTimer, ScanTimer, APScanTimer;
+ RALINK_TIMER_STRUCT AuthTimer;
+ RALINK_TIMER_STRUCT AssocTimer, ReassocTimer, DisassocTimer;
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+ USHORT VarIELen; /* Length of next VIE include EID & Length */
+ UCHAR VarIEs[MAX_VIE_LEN];
+ LONG Rssi; /* Record the rssi value when receive Probe Rsp. */
+ RALINK_TIMER_STRUCT ProbeTimer, ApCliAssocTimer, ApCliAuthTimer;
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+} MLME_AUX, *PMLME_AUX;
+
+typedef struct _MLME_ADDBA_REQ_STRUCT{
+ UCHAR Wcid; /* */
+ UCHAR pAddr[MAC_ADDR_LEN];
+ UCHAR BaBufSize;
+ USHORT TimeOutValue;
+ UCHAR TID;
+ UCHAR Token;
+ USHORT BaStartSeq;
+} MLME_ADDBA_REQ_STRUCT, *PMLME_ADDBA_REQ_STRUCT;
+
+
+typedef struct _MLME_DELBA_REQ_STRUCT{
+ UCHAR Wcid; /* */
+ UCHAR Addr[MAC_ADDR_LEN];
+ UCHAR TID;
+ UCHAR Initiator;
+} MLME_DELBA_REQ_STRUCT, *PMLME_DELBA_REQ_STRUCT;
+
+/* assoc struct is equal to reassoc */
+typedef struct _MLME_ASSOC_REQ_STRUCT{
+ UCHAR Addr[MAC_ADDR_LEN];
+ USHORT CapabilityInfo;
+ USHORT ListenIntv;
+ ULONG Timeout;
+} MLME_ASSOC_REQ_STRUCT, *PMLME_ASSOC_REQ_STRUCT, MLME_REASSOC_REQ_STRUCT, *PMLME_REASSOC_REQ_STRUCT;
+
+typedef struct _MLME_DISASSOC_REQ_STRUCT{
+ UCHAR Addr[MAC_ADDR_LEN];
+ USHORT Reason;
+} MLME_DISASSOC_REQ_STRUCT, *PMLME_DISASSOC_REQ_STRUCT;
+
+typedef struct _MLME_AUTH_REQ_STRUCT {
+ UCHAR Addr[MAC_ADDR_LEN];
+ USHORT Alg;
+ ULONG Timeout;
+} MLME_AUTH_REQ_STRUCT, *PMLME_AUTH_REQ_STRUCT;
+
+typedef struct _MLME_DEAUTH_REQ_STRUCT {
+ UCHAR Addr[MAC_ADDR_LEN];
+ USHORT Reason;
+} MLME_DEAUTH_REQ_STRUCT, *PMLME_DEAUTH_REQ_STRUCT;
+
+typedef struct {
+ ULONG BssIdx;
+} MLME_JOIN_REQ_STRUCT;
+
+typedef struct _MLME_SCAN_REQ_STRUCT {
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR BssType;
+ UCHAR ScanType;
+ UCHAR SsidLen;
+ CHAR Ssid[MAX_LEN_OF_SSID];
+} MLME_SCAN_REQ_STRUCT, *PMLME_SCAN_REQ_STRUCT;
+
+typedef struct _MLME_START_REQ_STRUCT {
+ CHAR Ssid[MAX_LEN_OF_SSID];
+ UCHAR SsidLen;
+} MLME_START_REQ_STRUCT, *PMLME_START_REQ_STRUCT;
+
+
+typedef struct GNU_PACKED _EID_STRUCT{
+ UCHAR Eid;
+ UCHAR Len;
+ UCHAR Octet[1];
+} EID_STRUCT,*PEID_STRUCT, BEACON_EID_STRUCT, *PBEACON_EID_STRUCT;
+
+
+/* ========================== AP mlme.h =============================== */
+#define TBTT_PRELOAD_TIME 384 /* usec. LomgPreamble + 24-byte at 1Mbps */
+#define DEFAULT_DTIM_PERIOD 1
+
+/* weighting factor to calculate Channel quality, total should be 100% */
+/*#define RSSI_WEIGHTING 0 */
+/*#define TX_WEIGHTING 40 */
+/*#define RX_WEIGHTING 60 */
+
+#define MAC_TABLE_AGEOUT_TIME 300 /* unit: sec */
+#define MAC_TABLE_MIN_AGEOUT_TIME 60 /* unit: sec */
+#define MAC_TABLE_ASSOC_TIMEOUT 5 /* unit: sec */
+#define MAC_TABLE_FULL(Tab) ((Tab).size == MAX_LEN_OF_MAC_TABLE)
+
+/* AP shall drop the sta if contine Tx fail count reach it. */
+#define MAC_ENTRY_LIFE_CHECK_CNT 1024 /* packet cnt. */
+
+/* Value domain of pMacEntry->Sst */
+typedef enum _Sst {
+ SST_NOT_AUTH, /* 0: equivalent to IEEE 802.11/1999 state 1 */
+ SST_AUTH, /* 1: equivalent to IEEE 802.11/1999 state 2 */
+ SST_ASSOC /* 2: equivalent to IEEE 802.11/1999 state 3 */
+} SST;
+
+/* value domain of pMacEntry->AuthState */
+typedef enum _AuthState {
+ AS_NOT_AUTH,
+ AS_AUTH_OPEN, /* STA has been authenticated using OPEN SYSTEM */
+ AS_AUTH_KEY, /* STA has been authenticated using SHARED KEY */
+ AS_AUTHENTICATING /* STA is waiting for AUTH seq#3 using SHARED KEY */
+} AUTH_STATE;
+
+
+typedef struct _IE_lists {
+ UCHAR Addr2[MAC_ADDR_LEN];
+ UCHAR ApAddr[MAC_ADDR_LEN];
+ USHORT CapabilityInfo;
+ USHORT ListenInterval;
+ UCHAR SsidLen;
+ UCHAR Ssid[MAX_LEN_OF_SSID];
+ UCHAR SupportedRatesLen;
+ UCHAR SupportedRates[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR RSN_IE[MAX_LEN_OF_RSNIE];
+ UCHAR RSNIE_Len;
+ BOOLEAN bWmmCapable;
+#ifdef WSC_AP_SUPPORT
+ BOOLEAN bWscCapable;
+#endif /* WSC_AP_SUPPORT */
+ ULONG RalinkIe;
+ EXT_CAP_INFO_ELEMENT ExtCapInfo;
+ UCHAR ht_cap_len;
+ HT_CAPABILITY_IE HTCapability;
+#ifdef DOT11_VHT_AC
+ VHT_CAP_IE vht_cap;
+ VHT_OP_IE vht_op;
+ UCHAR vht_cap_len;
+ UCHAR vht_op_len;
+#endif /* DOT11_VHT_AC */
+}IE_LISTS;
+
+
+typedef struct _bcn_ie_list {
+ UCHAR Addr2[MAC_ADDR_LEN];
+ UCHAR Bssid[MAC_ADDR_LEN];
+ CHAR Ssid[MAX_LEN_OF_SSID];
+ UCHAR SsidLen;
+ UCHAR BssType;
+ USHORT BeaconPeriod;
+ UCHAR Channel;
+ UCHAR NewChannel;
+ USHORT AtimWin;
+ USHORT CapabilityInfo;
+ UCHAR Erp;
+ UCHAR DtimCount;
+ UCHAR DtimPeriod;
+ UCHAR BcastFlag;
+ UCHAR MessageToMe;
+ UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR SupRateLen;
+ UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR ExtRateLen;
+ UCHAR CkipFlag;
+ UCHAR AironetCellPowerLimit;
+ LARGE_INTEGER TimeStamp;
+ CF_PARM CfParm;
+ EDCA_PARM EdcaParm;
+ QBSS_LOAD_PARM QbssLoad;
+ QOS_CAPABILITY_PARM QosCapability;
+ ULONG RalinkIe;
+ EXT_CAP_INFO_ELEMENT ExtCapInfo;
+ UCHAR HtCapabilityLen;
+ UCHAR PreNHtCapabilityLen;
+ HT_CAPABILITY_IE HtCapability;
+ UCHAR AddHtInfoLen;
+ ADD_HT_INFO_IE AddHtInfo;
+ UCHAR NewExtChannelOffset;
+#ifdef DOT11_VHT_AC
+ VHT_CAP_IE vht_cap_ie;
+ VHT_OP_IE vht_op_ie;
+ UCHAR vht_cap_len;
+ UCHAR vht_op_len;
+#endif /* DOT11_VHT_AC */
+}BCN_IE_LIST;
+
+#endif /* MLME_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/mlme_sys.h b/cleopatre/devkit/mt7601udrv/include/mlme_sys.h
new file mode 100644
index 0000000000..f36fabaaf0
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/mlme_sys.h
@@ -0,0 +1,9 @@
+/*
+
+*/
+
+
+#include "rtmp_type.h"
+
+
+
diff --git a/cleopatre/devkit/mt7601udrv/include/netif_block.h b/cleopatre/devkit/mt7601udrv/include/netif_block.h
new file mode 100644
index 0000000000..3714bf0695
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/netif_block.h
@@ -0,0 +1,31 @@
+
+#ifndef __NET_IF_BLOCK_H__
+#define __NET_IF_BLOCK_H__
+
+#include "link_list.h"
+#include "rtmp.h"
+
+#define FREE_NETIF_POOL_SIZE 32
+
+typedef struct _NETIF_ENTRY
+{
+ struct _NETIF_ENTRY *pNext;
+ PNET_DEV pNetDev;
+} NETIF_ENTRY, *PNETIF_ENTRY;
+
+void initblockQueueTab(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN blockNetIf(
+ IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry,
+ IN PNET_DEV pNetDev);
+
+VOID releaseNetIf(
+ IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry);
+
+VOID StopNetIfQueue(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR QueIdx,
+ IN PNDIS_PACKET pPacket);
+#endif /* __NET_IF_BLOCK_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/oid.h b/cleopatre/devkit/mt7601udrv/include/oid.h
new file mode 100644
index 0000000000..6152987c99
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/oid.h
@@ -0,0 +1,1320 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ oid.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+*/
+#ifndef _OID_H_
+#define _OID_H_
+
+/*#include <linux/wireless.h> */
+
+
+
+/* new types for Media Specific Indications */
+/* Extension channel offset */
+#define EXTCHA_NONE 0
+#define EXTCHA_ABOVE 0x1
+#define EXTCHA_BELOW 0x3
+
+/* BW */
+#define BAND_WIDTH_20 0
+#define BAND_WIDTH_40 1
+#define BAND_WIDTH_80 2
+#define BAND_WIDTH_BOTH 3
+#define BAND_WIDTH_10 4 /* 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field. */
+
+
+/* SHORTGI */
+#define GAP_INTERVAL_400 1 /* only support in HT mode */
+#define GAP_INTERVAL_800 0
+#define GAP_INTERVAL_BOTH 2
+
+#define NdisMediaStateConnected 1
+#define NdisMediaStateDisconnected 0
+
+#define NdisApMediaStateConnected 1
+#define NdisApMediaStateDisconnected 0
+
+
+#define NDIS_802_11_LENGTH_SSID 32
+
+#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
+#define IEEE80211_NWID_LEN 32
+
+#define NDIS_802_11_LENGTH_RATES 8
+#define NDIS_802_11_LENGTH_RATES_EX 16
+#define MAC_ADDR_LENGTH 6
+/*#define MAX_NUM_OF_CHS 49 */ /* 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc */
+/*#define MAX_NUM_OF_CHS 54 */ /* 14 channels @2.4G + 12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination */
+#define MAX_NUMBER_OF_EVENT 10 /* entry # in EVENT table */
+#define MAX_NUMBER_OF_MAC 32 /* if MAX_MBSSID_NUM is 8, this value can't be larger than 211 */
+#define MAX_NUMBER_OF_ACL 64
+#define MAX_LENGTH_OF_SUPPORT_RATES 12 /* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */
+#define MAX_NUMBER_OF_DLS_ENTRY 4
+
+
+#define RT_QUERY_SIGNAL_CONTEXT 0x0402
+#define RT_SET_IAPP_PID 0x0404
+#define RT_SET_APD_PID 0x0405
+#define RT_SET_DEL_MAC_ENTRY 0x0406
+#define RT_QUERY_EVENT_TABLE 0x0407
+/* */
+/* IEEE 802.11 OIDs */
+/* */
+#define OID_GET_SET_TOGGLE 0x8000
+#define OID_GET_SET_FROM_UI 0x4000
+
+#define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0103
+#define OID_802_11_NETWORK_TYPE_IN_USE 0x0104
+#define OID_802_11_RSSI_TRIGGER 0x0107
+#define RT_OID_802_11_RSSI 0x0108 /* rt2860 only */
+#define RT_OID_802_11_RSSI_1 0x0109 /* rt2860 only */
+#define RT_OID_802_11_RSSI_2 0x010A /* rt2860 only */
+#define OID_802_11_NUMBER_OF_ANTENNAS 0x010B
+#define OID_802_11_RX_ANTENNA_SELECTED 0x010C
+#define OID_802_11_TX_ANTENNA_SELECTED 0x010D
+#define OID_802_11_SUPPORTED_RATES 0x010E
+#define OID_802_11_ADD_WEP 0x0112
+#define OID_802_11_REMOVE_WEP 0x0113
+#define OID_802_11_DISASSOCIATE 0x0114
+#define OID_802_11_PRIVACY_FILTER 0x0118
+#define OID_802_11_ASSOCIATION_INFORMATION 0x011E
+#define OID_802_11_TEST 0x011F
+
+
+#define RT_OID_802_11_COUNTRY_REGION 0x0507
+#define OID_802_11_BSSID_LIST_SCAN 0x0508
+#define OID_802_11_SSID 0x0509
+#define OID_802_11_BSSID 0x050A
+#define RT_OID_802_11_RADIO 0x050B
+#define RT_OID_802_11_PHY_MODE 0x050C
+#define RT_OID_802_11_STA_CONFIG 0x050D
+#define OID_802_11_DESIRED_RATES 0x050E
+#define RT_OID_802_11_PREAMBLE 0x050F
+#define OID_802_11_WEP_STATUS 0x0510
+#define OID_802_11_AUTHENTICATION_MODE 0x0511
+#define OID_802_11_INFRASTRUCTURE_MODE 0x0512
+#define RT_OID_802_11_RESET_COUNTERS 0x0513
+#define OID_802_11_RTS_THRESHOLD 0x0514
+#define OID_802_11_FRAGMENTATION_THRESHOLD 0x0515
+#define OID_802_11_POWER_MODE 0x0516
+#define OID_802_11_TX_POWER_LEVEL 0x0517
+#define RT_OID_802_11_ADD_WPA 0x0518
+#define OID_802_11_REMOVE_KEY 0x0519
+#define RT_OID_802_11_QUERY_PID 0x051A
+#define RT_OID_802_11_QUERY_VID 0x051B
+#define OID_802_11_ADD_KEY 0x0520
+#define OID_802_11_CONFIGURATION 0x0521
+#define OID_802_11_TX_PACKET_BURST 0x0522
+#define RT_OID_802_11_QUERY_NOISE_LEVEL 0x0523
+#define RT_OID_802_11_EXTRA_INFO 0x0524
+#define RT_OID_802_11_HARDWARE_REGISTER 0x0525
+#define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS
+#define OID_802_11_DEAUTHENTICATION 0x0526
+#define OID_802_11_DROP_UNENCRYPTED 0x0527
+#define OID_802_11_MIC_FAILURE_REPORT_FRAME 0x0528
+#define OID_802_11_EAP_METHOD 0x0529
+#define OID_802_11_ACL_LIST 0x052A
+
+/* For 802.1x daemin using */
+#ifdef DOT1X_SUPPORT
+#define OID_802_DOT1X_CONFIGURATION 0x0540
+#define OID_802_DOT1X_PMKID_CACHE 0x0541
+#define OID_802_DOT1X_RADIUS_DATA 0x0542
+#define OID_802_DOT1X_WPA_KEY 0x0543
+#define OID_802_DOT1X_STATIC_WEP_COPY 0x0544
+#define OID_802_DOT1X_IDLE_TIMEOUT 0x0545
+#endif /* DOT1X_SUPPORT */
+
+#define RT_OID_DEVICE_NAME 0x0607
+#define RT_OID_VERSION_INFO 0x0608
+#define OID_802_11_BSSID_LIST 0x0609
+#define OID_802_3_CURRENT_ADDRESS 0x060A
+#define OID_GEN_MEDIA_CONNECT_STATUS 0x060B
+#define RT_OID_802_11_QUERY_LINK_STATUS 0x060C
+#define OID_802_11_RSSI 0x060D
+#define OID_802_11_STATISTICS 0x060E
+#define OID_GEN_RCV_OK 0x060F
+#define OID_GEN_RCV_NO_BUFFER 0x0610
+#define RT_OID_802_11_QUERY_EEPROM_VERSION 0x0611
+#define RT_OID_802_11_QUERY_FIRMWARE_VERSION 0x0612
+#define RT_OID_802_11_QUERY_LAST_RX_RATE 0x0613
+#define RT_OID_802_11_TX_POWER_LEVEL_1 0x0614
+#define RT_OID_802_11_QUERY_PIDVID 0x0615
+/*for WPA_SUPPLICANT_SUPPORT */
+#define OID_SET_COUNTERMEASURES 0x0616
+#define OID_802_11_SET_IEEE8021X 0x0617
+#define OID_802_11_SET_IEEE8021X_REQUIRE_KEY 0x0618
+#define OID_802_11_PMKID 0x0620
+#define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621
+#define RT_OID_WE_VERSION_COMPILED 0x0622
+#define RT_OID_NEW_DRIVER 0x0623
+#define OID_AUTO_PROVISION_BSSID_LIST 0x0624
+#define RT_OID_WPS_PROBE_REQ_IE 0x0625
+
+#define RT_OID_802_11_SNR_0 0x0630
+#define RT_OID_802_11_SNR_1 0x0631
+#define RT_OID_802_11_QUERY_LAST_TX_RATE 0x0632
+#define RT_OID_802_11_QUERY_HT_PHYMODE 0x0633
+#define RT_OID_802_11_SET_HT_PHYMODE 0x0634
+#define OID_802_11_RELOAD_DEFAULTS 0x0635
+#define RT_OID_802_11_QUERY_APSD_SETTING 0x0636
+#define RT_OID_802_11_SET_APSD_SETTING 0x0637
+#define RT_OID_802_11_QUERY_APSD_PSM 0x0638
+#define RT_OID_802_11_SET_APSD_PSM 0x0639
+#define RT_OID_802_11_QUERY_DLS 0x063A
+#define RT_OID_802_11_SET_DLS 0x063B
+#define RT_OID_802_11_QUERY_DLS_PARAM 0x063C
+#define RT_OID_802_11_SET_DLS_PARAM 0x063D
+#define RT_OID_802_11_QUERY_WMM 0x063E
+#define RT_OID_802_11_SET_WMM 0x063F
+#define RT_OID_802_11_QUERY_IMME_BA_CAP 0x0640
+#define RT_OID_802_11_SET_IMME_BA_CAP 0x0641
+#define RT_OID_802_11_QUERY_BATABLE 0x0642
+#define RT_OID_802_11_ADD_IMME_BA 0x0643
+#define RT_OID_802_11_TEAR_IMME_BA 0x0644
+#define RT_OID_DRIVER_DEVICE_NAME 0x0645
+#define RT_OID_802_11_QUERY_DAT_HT_PHYMODE 0x0646
+#define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT 0x0647
+#define OID_802_11_SET_PSPXLINK_MODE 0x0648
+/*+++ add by woody +++*/
+#define OID_802_11_SET_PASSPHRASE 0x0649
+#define RT_OID_802_11_QUERY_TX_PHYMODE 0x0650
+#define RT_OID_802_11_QUERY_MAP_REAL_TX_RATE 0x0678
+#define RT_OID_802_11_QUERY_MAP_REAL_RX_RATE 0x0679
+#define RT_OID_802_11_SNR_2 0x067A
+#define RT_OID_802_11_PER_BSS_STATISTICS 0x067D
+
+#ifdef TXBF_SUPPORT
+#define RT_OID_802_11_QUERY_TXBF_TABLE 0x067C
+#endif
+
+
+#ifdef HOSTAPD_SUPPORT
+#define SIOCSIWGENIE 0x8B30
+#define OID_HOSTAPD_SUPPORT 0x0661
+
+#define HOSTAPD_OID_STATIC_WEP_COPY 0x0662
+#define HOSTAPD_OID_GET_1X_GROUP_KEY 0x0663
+
+#define HOSTAPD_OID_SET_STA_AUTHORIZED 0x0664
+#define HOSTAPD_OID_SET_STA_DISASSOC 0x0665
+#define HOSTAPD_OID_SET_STA_DEAUTH 0x0666
+#define HOSTAPD_OID_DEL_KEY 0x0667
+#define HOSTAPD_OID_SET_KEY 0x0668
+#define HOSTAPD_OID_SET_802_1X 0x0669
+#define HOSTAPD_OID_GET_SEQ 0x0670
+#define HOSTAPD_OID_GETWPAIE 0x0671
+#define HOSTAPD_OID_COUNTERMEASURES 0x0672
+#define HOSTAPD_OID_SET_WPAPSK 0x0673
+#define HOSTAPD_OID_SET_WPS_BEACON_IE 0x0674
+#define HOSTAPD_OID_SET_WPS_PROBE_RESP_IE 0x0675
+
+#define RT_HOSTAPD_OID_HOSTAPD_SUPPORT (OID_GET_SET_TOGGLE | OID_HOSTAPD_SUPPORT)
+#define RT_HOSTAPD_OID_STATIC_WEP_COPY (OID_GET_SET_TOGGLE | HOSTAPD_OID_STATIC_WEP_COPY)
+#define RT_HOSTAPD_OID_GET_1X_GROUP_KEY (OID_GET_SET_TOGGLE | HOSTAPD_OID_GET_1X_GROUP_KEY)
+#define RT_HOSTAPD_OID_SET_STA_AUTHORIZED (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_STA_AUTHORIZED)
+#define RT_HOSTAPD_OID_SET_STA_DISASSOC (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_STA_DISASSOC)
+#define RT_HOSTAPD_OID_SET_STA_DEAUTH (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_STA_DEAUTH)
+#define RT_HOSTAPD_OID_DEL_KEY (OID_GET_SET_TOGGLE | HOSTAPD_OID_DEL_KEY)
+#define RT_HOSTAPD_OID_SET_KEY (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_KEY)
+#define RT_HOSTAPD_OID_SET_802_1X (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_802_1X)
+#define RT_HOSTAPD_OID_COUNTERMEASURES (OID_GET_SET_TOGGLE | HOSTAPD_OID_COUNTERMEASURES)
+#define RT_HOSTAPD_OID_SET_WPAPSK (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_WPAPSK)
+#define RT_HOSTAPD_OID_SET_WPS_BEACON_IE (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_WPS_BEACON_IE)
+#define RT_HOSTAPD_OID_SET_WPS_PROBE_RESP_IE (OID_GET_SET_TOGGLE | HOSTAPD_OID_SET_WPS_PROBE_RESP_IE)
+
+#define IEEE80211_IS_MULTICAST(_a) (*(_a) & 0x01)
+#define IEEE80211_KEYBUF_SIZE 16
+#define IEEE80211_MICBUF_SIZE (8 + 8) /* space for both tx+rx keys */
+#define IEEE80211_TID_SIZE 17 /* total number of TIDs */
+
+#define IEEE80211_MLME_ASSOC 1 /* associate station */
+#define IEEE80211_MLME_DISASSOC 2 /* disassociate station */
+#define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */
+#define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */
+#define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */
+#define IEEE80211_MLME_CLEAR_STATS 6 /* clear station statistic */
+#define IEEE80211_1X_COPY_KEY 7 /* copy static-wep unicast key */
+
+#define IEEE80211_MAX_OPT_IE 256
+#define IWEVEXPIRED 0x8C04
+
+struct ieee80211req_mlme {
+ UINT8 im_op; /* operation to perform */
+ UINT8 im_ssid_len; /* length of optional ssid */
+ UINT16 im_reason; /* 802.11 reason code */
+ UINT8 im_macaddr[IEEE80211_ADDR_LEN];
+ UINT8 im_ssid[IEEE80211_NWID_LEN];
+};
+
+struct ieee80211req_key {
+ UINT8 ik_type; /* key/cipher type */
+ UINT8 ik_pad;
+ UINT16 ik_keyix; /* key index */
+ UINT8 ik_keylen; /* key length in bytes */
+ UINT8 ik_flags;
+ UINT8 ik_macaddr[IEEE80211_ADDR_LEN];
+ UINT64 ik_keyrsc; /* key receive sequence counter */
+ UINT64 ik_keytsc; /* key transmit sequence counter */
+ UINT8 ik_keydata[IEEE80211_KEYBUF_SIZE + IEEE80211_MICBUF_SIZE];
+ int txkey;
+};
+
+struct ieee80211req_del_key {
+ UINT8 idk_keyix; /* key index */
+ UINT8 idk_macaddr[IEEE80211_ADDR_LEN];
+};
+
+struct default_group_key {
+ UINT16 ik_keyix; /* key index */
+ UINT8 ik_keylen; /* key length in bytes */
+ UINT8 ik_keydata[IEEE80211_KEYBUF_SIZE + IEEE80211_MICBUF_SIZE];
+};
+
+struct ieee80211req_wpaie {
+ UINT8 wpa_macaddr[IEEE80211_ADDR_LEN];
+ UINT8 rsn_ie[IEEE80211_MAX_OPT_IE];
+};
+
+struct hostapd_wpa_psk {
+ struct hostapd_wpa_psk *next;
+ int group;
+ UCHAR psk[32];
+ UCHAR addr[6];
+};
+
+#endif /*HOSTAPD_SUPPORT */
+
+#define RT_OID_802_11_QUERY_TDLS_PARAM 0x0676
+#define RT_OID_802_11_QUERY_TDLS 0x0677
+
+/* Ralink defined OIDs */
+/* Dennis Lee move to platform specific */
+
+#define RT_OID_802_11_BSSID (OID_GET_SET_TOGGLE | OID_802_11_BSSID)
+#define RT_OID_802_11_SSID (OID_GET_SET_TOGGLE | OID_802_11_SSID)
+#define RT_OID_802_11_INFRASTRUCTURE_MODE (OID_GET_SET_TOGGLE | OID_802_11_INFRASTRUCTURE_MODE)
+#define RT_OID_802_11_ADD_WEP (OID_GET_SET_TOGGLE | OID_802_11_ADD_WEP)
+#define RT_OID_802_11_ADD_KEY (OID_GET_SET_TOGGLE | OID_802_11_ADD_KEY)
+#define RT_OID_802_11_REMOVE_WEP (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_WEP)
+#define RT_OID_802_11_REMOVE_KEY (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_KEY)
+#define RT_OID_802_11_DISASSOCIATE (OID_GET_SET_TOGGLE | OID_802_11_DISASSOCIATE)
+#define RT_OID_802_11_AUTHENTICATION_MODE (OID_GET_SET_TOGGLE | OID_802_11_AUTHENTICATION_MODE)
+#define RT_OID_802_11_PRIVACY_FILTER (OID_GET_SET_TOGGLE | OID_802_11_PRIVACY_FILTER)
+#define RT_OID_802_11_BSSID_LIST_SCAN (OID_GET_SET_TOGGLE | OID_802_11_BSSID_LIST_SCAN)
+#define RT_OID_802_11_WEP_STATUS (OID_GET_SET_TOGGLE | OID_802_11_WEP_STATUS)
+#define RT_OID_802_11_RELOAD_DEFAULTS (OID_GET_SET_TOGGLE | OID_802_11_RELOAD_DEFAULTS)
+#define RT_OID_802_11_NETWORK_TYPE_IN_USE (OID_GET_SET_TOGGLE | OID_802_11_NETWORK_TYPE_IN_USE)
+#define RT_OID_802_11_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | OID_802_11_TX_POWER_LEVEL)
+#define RT_OID_802_11_RSSI_TRIGGER (OID_GET_SET_TOGGLE | OID_802_11_RSSI_TRIGGER)
+#define RT_OID_802_11_FRAGMENTATION_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_FRAGMENTATION_THRESHOLD)
+#define RT_OID_802_11_RTS_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_RTS_THRESHOLD)
+#define RT_OID_802_11_RX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_RX_ANTENNA_SELECTED)
+#define RT_OID_802_11_TX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_TX_ANTENNA_SELECTED)
+#define RT_OID_802_11_SUPPORTED_RATES (OID_GET_SET_TOGGLE | OID_802_11_SUPPORTED_RATES)
+#define RT_OID_802_11_DESIRED_RATES (OID_GET_SET_TOGGLE | OID_802_11_DESIRED_RATES)
+#define RT_OID_802_11_CONFIGURATION (OID_GET_SET_TOGGLE | OID_802_11_CONFIGURATION)
+#define RT_OID_802_11_POWER_MODE (OID_GET_SET_TOGGLE | OID_802_11_POWER_MODE)
+#define RT_OID_802_11_SET_PSPXLINK_MODE (OID_GET_SET_TOGGLE | OID_802_11_SET_PSPXLINK_MODE)
+#define RT_OID_802_11_EAP_METHOD (OID_GET_SET_TOGGLE | OID_802_11_EAP_METHOD)
+#define RT_OID_802_11_SET_PASSPHRASE (OID_GET_SET_TOGGLE | OID_802_11_SET_PASSPHRASE)
+
+#ifdef DOT1X_SUPPORT
+#define RT_OID_802_DOT1X_PMKID_CACHE (OID_GET_SET_TOGGLE | OID_802_DOT1X_PMKID_CACHE)
+#define RT_OID_802_DOT1X_RADIUS_DATA (OID_GET_SET_TOGGLE | OID_802_DOT1X_RADIUS_DATA)
+#define RT_OID_802_DOT1X_WPA_KEY (OID_GET_SET_TOGGLE | OID_802_DOT1X_WPA_KEY)
+#define RT_OID_802_DOT1X_STATIC_WEP_COPY (OID_GET_SET_TOGGLE | OID_802_DOT1X_STATIC_WEP_COPY)
+#define RT_OID_802_DOT1X_IDLE_TIMEOUT (OID_GET_SET_TOGGLE | OID_802_DOT1X_IDLE_TIMEOUT)
+#endif /* DOT1X_SUPPORT */
+
+#define RT_OID_802_11_SET_TDLS_PARAM (OID_GET_SET_TOGGLE | RT_OID_802_11_QUERY_TDLS_PARAM)
+#define RT_OID_802_11_SET_TDLS (OID_GET_SET_TOGGLE | RT_OID_802_11_QUERY_TDLS)
+
+#ifdef WAPI_SUPPORT
+#define OID_802_11_WAPI_PID 0x06A0
+#define OID_802_11_PORT_SECURE_STATE 0x06A1
+#define OID_802_11_UCAST_KEY_INFO 0x06A2
+#define OID_802_11_MCAST_TXIV 0x06A3
+#define OID_802_11_MCAST_KEY_INFO 0x06A4
+#define OID_802_11_WAPI_CONFIGURATION 0x06A5
+#define OID_802_11_WAPI_IE 0x06A6
+
+#define RT_OID_802_11_WAPI_PID (OID_GET_SET_TOGGLE | OID_802_11_WAPI_PID)
+#define RT_OID_802_11_PORT_SECURE_STATE (OID_GET_SET_TOGGLE | OID_802_11_PORT_SECURE_STATE)
+#define RT_OID_802_11_UCAST_KEY_INFO (OID_GET_SET_TOGGLE | OID_802_11_UCAST_KEY_INFO)
+#define RT_OID_802_11_MCAST_TXIV (OID_GET_SET_TOGGLE | OID_802_11_MCAST_TXIV)
+#define RT_OID_802_11_MCAST_KEY_INFO (OID_GET_SET_TOGGLE | OID_802_11_MCAST_KEY_INFO)
+#define RT_OID_802_11_WAPI_CONFIGURATION (OID_GET_SET_TOGGLE | OID_802_11_WAPI_CONFIGURATION)
+#define RT_OID_802_11_WAPI_IE (OID_GET_SET_TOGGLE | OID_802_11_WAPI_IE)
+#endif /* WAPI_SUPPORT */
+
+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 an upper bound */
+} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
+
+typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
+
+typedef struct _NDIS_802_11_STATUS_INDICATION {
+ NDIS_802_11_STATUS_TYPE StatusType;
+} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
+
+/* mask for authentication/integrity fields */
+#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
+
+#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
+#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
+#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
+#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
+
+typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST {
+ ULONG Length; /* Length of structure */
+ NDIS_802_11_MAC_ADDRESS Bssid;
+ ULONG Flags;
+} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
+
+/*Added new types for PMKID Candidate lists. */
+typedef struct _PMKID_CANDIDATE {
+ NDIS_802_11_MAC_ADDRESS BSSID;
+ ULONG Flags;
+} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
+
+typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST {
+ ULONG Version; /* Version of the structure */
+ ULONG NumCandidates; /* No. of pmkid candidates */
+ PMKID_CANDIDATE CandidateList[1];
+} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
+
+/*Flags for PMKID Candidate list structure */
+#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
+
+/* Added new types for OFDM 5G and 2.4G */
+typedef enum _NDIS_802_11_NETWORK_TYPE {
+ Ndis802_11FH,
+ Ndis802_11DS,
+ Ndis802_11OFDM5,
+ Ndis802_11OFDM24,
+ Ndis802_11Automode,
+ Ndis802_11OFDM5_N,
+ Ndis802_11OFDM24_N,
+ Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
+} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
+
+typedef struct _NDIS_802_11_NETWORK_TYPE_LIST {
+ UINT NumberOfItems; /* in list below, at least 1 */
+ NDIS_802_11_NETWORK_TYPE NetworkType[1];
+} NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST;
+
+typedef enum _NDIS_802_11_POWER_MODE {
+ Ndis802_11PowerModeCAM,
+ Ndis802_11PowerModeMAX_PSP,
+ Ndis802_11PowerModeFast_PSP,
+ Ndis802_11PowerModeLegacy_PSP,
+ Ndis802_11PowerModeMax /* not a real mode, defined as an upper bound */
+} NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
+
+typedef ULONG NDIS_802_11_TX_POWER_LEVEL; /* in milliwatts */
+
+/* */
+/* Received Signal Strength Indication */
+/* */
+typedef LONG NDIS_802_11_RSSI; /* in dBm */
+
+typedef struct _NDIS_802_11_CONFIGURATION_FH {
+ ULONG Length; /* Length of structure */
+ ULONG HopPattern; /* As defined by 802.11, MSB set */
+ ULONG HopSet; /* to one if non-802.11 */
+ ULONG DwellTime; /* units are Kusec */
+} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
+
+typedef struct _NDIS_802_11_CONFIGURATION {
+ ULONG Length; /* Length of structure */
+ ULONG BeaconPeriod; /* units are Kusec */
+ ULONG ATIMWindow; /* units are Kusec */
+ ULONG DSConfig; /* Frequency, units are kHz */
+ NDIS_802_11_CONFIGURATION_FH FHConfig;
+} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
+
+typedef struct _NDIS_802_11_STATISTICS {
+ ULONG Length; /* Length of structure */
+ LARGE_INTEGER TransmittedFragmentCount;
+ LARGE_INTEGER MulticastTransmittedFrameCount;
+ LARGE_INTEGER FailedCount;
+ LARGE_INTEGER RetryCount;
+ LARGE_INTEGER MultipleRetryCount;
+ LARGE_INTEGER RTSSuccessCount;
+ LARGE_INTEGER RTSFailureCount;
+ LARGE_INTEGER ACKFailureCount;
+ LARGE_INTEGER FrameDuplicateCount;
+ LARGE_INTEGER ReceivedFragmentCount;
+ LARGE_INTEGER MulticastReceivedFrameCount;
+ LARGE_INTEGER FCSErrorCount;
+ LARGE_INTEGER TransmittedFrameCount;
+ LARGE_INTEGER WEPUndecryptableCount;
+ LARGE_INTEGER TKIPLocalMICFailures;
+ LARGE_INTEGER TKIPRemoteMICErrors;
+ LARGE_INTEGER TKIPICVErrors;
+ LARGE_INTEGER TKIPCounterMeasuresInvoked;
+ LARGE_INTEGER TKIPReplays;
+ LARGE_INTEGER CCMPFormatErrors;
+ LARGE_INTEGER CCMPReplays;
+ LARGE_INTEGER CCMPDecryptErrors;
+ LARGE_INTEGER FourWayHandshakeFailures;
+} NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS;
+
+typedef struct _MBSS_STATISTICS {
+ LONG TxCount;
+ ULONG RxCount;
+ ULONG ReceivedByteCount;
+ ULONG TransmittedByteCount;
+ ULONG RxErrorCount;
+ ULONG RxDropCount;
+ ULONG TxErrorCount;
+ ULONG TxDropCount;
+ ULONG ucPktsTx;
+ ULONG ucPktsRx;
+ ULONG mcPktsTx;
+ ULONG mcPktsRx;
+ ULONG bcPktsTx;
+ ULONG bcPktsRx;
+} MBSS_STATISTICS, *PMBSS_STATISTICS;
+
+typedef ULONG NDIS_802_11_KEY_INDEX;
+typedef ULONGLONG NDIS_802_11_KEY_RSC;
+
+#ifdef DOT1X_SUPPORT
+#define MAX_RADIUS_SRV_NUM 2 /* 802.1x failover number */
+
+/* The dot1x related structure.
+ It's used to communicate with DOT1X daemon */
+typedef struct GNU_PACKED _RADIUS_SRV_INFO {
+ UINT32 radius_ip;
+ UINT32 radius_port;
+ UCHAR radius_key[64];
+ UCHAR radius_key_len;
+} RADIUS_SRV_INFO, *PRADIUS_SRV_INFO;
+
+typedef struct GNU_PACKED _DOT1X_BSS_INFO {
+ UCHAR radius_srv_num;
+ RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
+ UCHAR ieee8021xWEP; /* dynamic WEP */
+ UCHAR key_index;
+ UCHAR key_length; /* length of key in bytes */
+ UCHAR key_material[13];
+ UCHAR nasId[IFNAMSIZ];
+ UCHAR nasId_len;
+} DOT1X_BSS_INFO, *PDOT1X_BSS_INFO;
+
+typedef struct GNU_PACKED _DOT1X_CMM_CONF {
+ UINT32 Length; /* Length of this structure */
+ UCHAR mbss_num; /* indicate multiple BSS number */
+ UINT32 own_ip_addr;
+ UINT32 retry_interval;
+ UINT32 session_timeout_interval;
+ UINT32 quiet_interval;
+ UCHAR EAPifname[8][IFNAMSIZ];
+ UCHAR EAPifname_len[8];
+ UCHAR PreAuthifname[8][IFNAMSIZ];
+ UCHAR PreAuthifname_len[8];
+ DOT1X_BSS_INFO Dot1xBssInfo[8];
+} DOT1X_CMM_CONF, *PDOT1X_CMM_CONF;
+
+typedef struct GNU_PACKED _DOT1X_IDLE_TIMEOUT {
+ UCHAR StaAddr[6];
+ UINT32 idle_timeout;
+} DOT1X_IDLE_TIMEOUT, *PDOT1X_IDLE_TIMEOUT;
+#endif /* DOT1X_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+typedef struct _NDIS_AP_802_11_KEY {
+ UINT Length; /* Length of this structure */
+ UCHAR addr[6];
+ UINT KeyIndex;
+ UINT KeyLength; /* length of key in bytes */
+ UCHAR KeyMaterial[1]; /* variable length depending on above field */
+} NDIS_AP_802_11_KEY, *PNDIS_AP_802_11_KEY;
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef APCLI_SUPPORT
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+typedef struct _NDIS_APCLI_802_11_KEY
+{
+ UINT Length;
+ UINT KeyIndex;
+ UINT KeyLength;
+ NDIS_802_11_MAC_ADDRESS BSSID;
+ NDIS_802_11_KEY_RSC KeyRSC;
+ UCHAR KeyMaterial[1];
+} NDIS_APCLI_802_11_KEY, *PNDIS_APCLI_802_11_KEY;
+#endif/* APCLI_WPA_SUPPLICANT_SUPPORT */
+#endif /* APCLI_SUPPORT */
+
+
+typedef struct _NDIS_802_11_REMOVE_KEY {
+ UINT Length; /* Length of this structure */
+ UINT KeyIndex;
+ NDIS_802_11_MAC_ADDRESS BSSID;
+} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
+
+typedef struct _NDIS_802_11_WEP {
+ UINT Length; /* Length of this structure */
+ UINT KeyIndex; /* 0 is the per-client key, 1-N are the */
+ /* global keys */
+ UINT KeyLength; /* length of key in bytes */
+ UCHAR KeyMaterial[1]; /* variable length depending on above field */
+} NDIS_802_11_WEP, *PNDIS_802_11_WEP;
+
+
+/* Add new authentication modes */
+typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
+ Ndis802_11AuthModeOpen,
+ Ndis802_11AuthModeShared,
+ Ndis802_11AuthModeAutoSwitch,
+ Ndis802_11AuthModeWPA,
+ Ndis802_11AuthModeWPAPSK,
+ Ndis802_11AuthModeWPANone,
+ Ndis802_11AuthModeWPA2,
+ Ndis802_11AuthModeWPA2PSK,
+ Ndis802_11AuthModeWPA1WPA2,
+ Ndis802_11AuthModeWPA1PSKWPA2PSK,
+#ifdef WAPI_SUPPORT
+ Ndis802_11AuthModeWAICERT, /* WAI certificate authentication */
+ Ndis802_11AuthModeWAIPSK, /* WAI pre-shared key */
+#endif /* WAPI_SUPPORT */
+ Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */
+} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
+
+typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
+typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
+
+typedef struct GNU_PACKED _NDIS_802_11_SSID {
+ UINT SsidLength; /* length of SSID field below, in bytes; */
+ /* this can be zero. */
+ UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; /* SSID information field */
+} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
+
+typedef struct GNU_PACKED _NDIS_WLAN_BSSID {
+ ULONG Length; /* Length of this structure */
+ NDIS_802_11_MAC_ADDRESS MacAddress; /* BSSID */
+ UCHAR Reserved[2];
+ NDIS_802_11_SSID Ssid; /* SSID */
+ ULONG Privacy; /* WEP encryption requirement */
+ NDIS_802_11_RSSI Rssi; /* receive signal strength in dBm */
+ NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
+ NDIS_802_11_CONFIGURATION Configuration;
+ NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
+ NDIS_802_11_RATES SupportedRates;
+} NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
+
+typedef struct GNU_PACKED _NDIS_802_11_BSSID_LIST {
+ UINT NumberOfItems; /* in list below, at least 1 */
+ NDIS_WLAN_BSSID Bssid[1];
+} NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
+
+typedef struct {
+ BOOLEAN bValid; /* 1: variable contains valid value */
+ USHORT StaNum;
+ UCHAR ChannelUtilization;
+ USHORT RemainingAdmissionControl; /* in unit of 32-us */
+} QBSS_LOAD_UI, *PQBSS_LOAD_UI;
+
+/* Added Capabilities, IELength and IEs for each BSSID */
+typedef struct GNU_PACKED _NDIS_WLAN_BSSID_EX {
+ ULONG Length; /* Length of this structure */
+ NDIS_802_11_MAC_ADDRESS MacAddress; /* BSSID */
+ UCHAR WpsAP; /* 0x00: not support WPS, 0x01: support normal WPS, 0x02: support Ralink auto WPS, 0x04: support Samsung WAC */
+ CHAR MinSNR;
+ NDIS_802_11_SSID Ssid; /* SSID */
+ UINT Privacy; /* WEP encryption requirement */
+ NDIS_802_11_RSSI Rssi; /* receive signal */
+ /* strength in dBm */
+ NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
+ NDIS_802_11_CONFIGURATION Configuration;
+ NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
+ NDIS_802_11_RATES_EX SupportedRates;
+ ULONG IELength;
+ UCHAR IEs[1];
+
+} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
+
+typedef struct GNU_PACKED _NDIS_802_11_BSSID_LIST_EX {
+ UINT NumberOfItems; /* in list below, at least 1 */
+ NDIS_WLAN_BSSID_EX Bssid[1];
+} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
+
+typedef struct GNU_PACKED _NDIS_802_11_FIXED_IEs {
+ UCHAR Timestamp[8];
+ USHORT BeaconInterval;
+ USHORT Capabilities;
+} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
+
+typedef struct _NDIS_802_11_VARIABLE_IEs {
+ UCHAR ElementID;
+ UCHAR Length; /* Number of bytes in data field */
+ UCHAR data[1];
+} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
+
+typedef ULONG NDIS_802_11_FRAGMENTATION_THRESHOLD;
+
+typedef ULONG NDIS_802_11_RTS_THRESHOLD;
+
+typedef ULONG NDIS_802_11_ANTENNA;
+
+typedef enum _NDIS_802_11_PRIVACY_FILTER {
+ Ndis802_11PrivFilterAcceptAll,
+ Ndis802_11PrivFilter8021xWEP
+} NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
+
+/* Added new encryption types */
+/* Also aliased typedef to new name */
+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,
+ Ndis802_11Encryption4Enabled, /* TKIP or AES mix */
+ Ndis802_11Encryption4KeyAbsent,
+ Ndis802_11GroupWEP40Enabled,
+ Ndis802_11GroupWEP104Enabled,
+#ifdef WAPI_SUPPORT
+ Ndis802_11EncryptionSMS4Enabled, /* WPI SMS4 support */
+#endif /* WAPI_SUPPORT */
+} 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_RELOAD_DEFAULTS {
+ Ndis802_11ReloadWEPKeys
+} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
+
+#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
+#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
+#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
+
+#define NDIS_802_11_AI_RESFI_CAPABILITIES 1
+#define NDIS_802_11_AI_RESFI_STATUSCODE 2
+#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
+
+typedef struct _NDIS_802_11_AI_REQFI {
+ USHORT Capabilities;
+ USHORT ListenInterval;
+ NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
+} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
+
+typedef struct _NDIS_802_11_AI_RESFI {
+ USHORT Capabilities;
+ USHORT StatusCode;
+ USHORT AssociationId;
+} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
+
+typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION {
+ ULONG Length;
+ USHORT AvailableRequestFixedIEs;
+ NDIS_802_11_AI_REQFI RequestFixedIEs;
+ ULONG RequestIELength;
+ ULONG OffsetRequestIEs;
+ USHORT AvailableResponseFixedIEs;
+ NDIS_802_11_AI_RESFI ResponseFixedIEs;
+ ULONG ResponseIELength;
+ ULONG OffsetResponseIEs;
+} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
+
+typedef struct _NDIS_802_11_AUTHENTICATION_EVENT {
+ NDIS_802_11_STATUS_INDICATION Status;
+ NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
+} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
+
+/*
+typedef struct _NDIS_802_11_TEST
+{
+ ULONG Length;
+ ULONG Type;
+ union
+ {
+ NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
+ NDIS_802_11_RSSI RssiTrigger;
+ };
+} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
+ */
+
+/* 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE */
+typedef enum _NDIS_802_11_MEDIA_STREAM_MODE {
+ Ndis802_11MediaStreamOff,
+ Ndis802_11MediaStreamOn,
+} NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
+
+/* PMKID Structures */
+typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
+
+#if defined(CONFIG_STA_SUPPORT) || defined(APCLI_WPA_SUPPLICANT_SUPPORT)
+typedef struct _BSSID_INFO {
+ NDIS_802_11_MAC_ADDRESS BSSID;
+ NDIS_802_11_PMKID_VALUE PMKID;
+} BSSID_INFO, *PBSSID_INFO;
+
+typedef struct _NDIS_802_11_PMKID {
+ UINT Length;
+ UINT BSSIDInfoCount;
+ BSSID_INFO BSSIDInfo[1];
+} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
+#endif /* defined(CONFIG_STA_SUPPORT) || defined(APCLI_WPA_SUPPLICANT_SUPPORT) */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+typedef struct _NDIS_APCLI_802_11_PMKID
+{
+ UINT Length;
+ UINT BSSIDInfoCount;
+ BSSID_INFO BSSIDInfo[1];
+} NDIS_APCLI_802_11_PMKID, *PNDIS_APCLI_802_11_PMKID;
+#endif/*APCLI_WPA_SUPPLICANT_SUPPORT*/
+
+typedef struct _AP_BSSID_INFO {
+ NDIS_802_11_MAC_ADDRESS MAC;
+ NDIS_802_11_PMKID_VALUE PMKID;
+ UCHAR PMK[32];
+ ULONG RefreshTime;
+ BOOLEAN Valid;
+} AP_BSSID_INFO, *PAP_BSSID_INFO;
+
+#define MAX_PMKID_COUNT 8
+typedef struct _NDIS_AP_802_11_PMKID {
+ AP_BSSID_INFO BSSIDInfo[MAX_PMKID_COUNT];
+} NDIS_AP_802_11_PMKID, *PNDIS_AP_802_11_PMKID;
+#endif /* CONFIG_AP_SUPPORT */
+
+typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION {
+ NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
+ NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
+} NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
+
+typedef struct _NDIS_802_11_CAPABILITY {
+ ULONG Length;
+ ULONG Version;
+ ULONG NoOfPMKIDs;
+ ULONG NoOfAuthEncryptPairsSupported;
+ NDIS_802_11_AUTHENTICATION_ENCRYPTION
+ AuthenticationEncryptionSupported[1];
+} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
+
+
+
+#ifdef DBG
+/*
+ When use private ioctl oid get/set the configuration, we can use following flags to provide specific rules when handle the cmd
+ */
+#define RTPRIV_IOCTL_FLAG_UI 0x0001 /* Notidy this private cmd send by UI. */
+#define RTPRIV_IOCTL_FLAG_NODUMPMSG 0x0002 /* Notify driver cannot dump msg to stdio/stdout when run this private ioctl cmd */
+#define RTPRIV_IOCTL_FLAG_NOSPACE 0x0004 /* Notify driver didn't need copy msg to caller due to the caller didn't reserve space for this cmd */
+#endif /* DBG */
+
+
+#ifdef SNMP_SUPPORT
+/*SNMP ieee 802dot11 , 2008_0220 */
+/* dot11res(3) */
+#define RT_OID_802_11_MANUFACTUREROUI 0x0700
+#define RT_OID_802_11_MANUFACTURERNAME 0x0701
+#define RT_OID_802_11_RESOURCETYPEIDNAME 0x0702
+
+/* dot11smt(1) */
+#define RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED 0x0703
+#define RT_OID_802_11_POWERMANAGEMENTMODE 0x0704
+#define OID_802_11_WEPDEFAULTKEYVALUE 0x0705 /* read , write */
+#define OID_802_11_WEPDEFAULTKEYID 0x0706
+#define RT_OID_802_11_WEPKEYMAPPINGLENGTH 0x0707
+#define OID_802_11_SHORTRETRYLIMIT 0x0708
+#define OID_802_11_LONGRETRYLIMIT 0x0709
+#define RT_OID_802_11_PRODUCTID 0x0710
+#define RT_OID_802_11_MANUFACTUREID 0x0711
+
+/* //dot11Phy(4) */
+#define OID_802_11_CURRENTCHANNEL 0x0712
+
+#endif /* SNMP_SUPPORT */
+
+/*dot11mac */
+#define RT_OID_802_11_MAC_ADDRESS 0x0713
+#define OID_802_11_BUILD_CHANNEL_EX 0x0714
+#define OID_802_11_GET_CH_LIST 0x0715
+#define OID_802_11_GET_COUNTRY_CODE 0x0716
+#define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717
+
+/*#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS) */
+
+
+
+#ifdef WSC_INCLUDED
+#define RT_OID_WAC_REQ 0x0736
+#define RT_OID_WSC_AUTO_PROVISION_WITH_BSSID 0x0737
+#define RT_OID_WSC_AUTO_PROVISION 0x0738
+#ifdef WSC_LED_SUPPORT
+/*WPS LED MODE 10 for Dlink WPS LED */
+#define RT_OID_LED_WPS_MODE10 0x0739
+#endif /* WSC_LED_SUPPORT */
+#endif /* WSC_INCLUDED */
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+#define RT_OID_APCLI_WSC_PIN_CODE 0x074A
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+#define RT_OID_WSC_FRAGMENT_SIZE 0x074D
+#define RT_OID_WSC_V2_SUPPORT 0x074E
+#define RT_OID_WSC_CONFIG_STATUS 0x074F
+#define RT_OID_802_11_WSC_QUERY_PROFILE 0x0750
+/* for consistency with RT61 */
+#define RT_OID_WSC_QUERY_STATUS 0x0751
+#define RT_OID_WSC_PIN_CODE 0x0752
+#define RT_OID_WSC_UUID 0x0753
+#define RT_OID_WSC_SET_SELECTED_REGISTRAR 0x0754
+#define RT_OID_WSC_EAPMSG 0x0755
+#define RT_OID_WSC_MANUFACTURER 0x0756
+#define RT_OID_WSC_MODEL_NAME 0x0757
+#define RT_OID_WSC_MODEL_NO 0x0758
+#define RT_OID_WSC_SERIAL_NO 0x0759
+#define RT_OID_WSC_READ_UFD_FILE 0x075A
+#define RT_OID_WSC_WRITE_UFD_FILE 0x075B
+#define RT_OID_WSC_QUERY_PEER_INFO_ON_RUNNING 0x075C
+#define RT_OID_WSC_MAC_ADDRESS 0x0760
+
+#ifdef LLTD_SUPPORT
+/* for consistency with RT61 */
+#define RT_OID_GET_PHY_MODE 0x761
+#ifdef CONFIG_AP_SUPPORT
+#define RT_OID_GET_LLTD_ASSO_TABLE 0x762
+#ifdef APCLI_SUPPORT
+#define RT_OID_GET_REPEATER_AP_LINEAGE 0x763
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* LLTD_SUPPORT */
+
+
+
+
+/* New for MeetingHouse Api support */
+#define OID_MH_802_1X_SUPPORTED 0xFFEDC100
+
+/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */
+#ifdef RT65xx
+typedef union _HTTRANSMIT_SETTING {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ USHORT MODE:3; /* Use definition MODE_xxx. */
+ USHORT iTxBF:1;
+ USHORT eTxBF:1;
+ USHORT STBC:1; /* only support in HT/VHT mode with MCS0~7 */
+ USHORT ShortGI:1;
+ USHORT BW:2; /* channel bandwidth 20MHz/40/80 MHz */
+ USHORT MCS:7; /* MCS */
+ } field;
+#else
+ struct {
+ USHORT MCS:7;
+ USHORT BW:2;
+ USHORT ShortGI:1;
+ USHORT STBC:1;
+ USHORT eTxBF:1;
+ USHORT iTxBF:1;
+ USHORT MODE:3;
+ } field;
+#endif
+ USHORT word;
+} HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
+#else
+typedef union _HTTRANSMIT_SETTING {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ USHORT MODE:2; /* Use definition MODE_xxx. */
+ USHORT iTxBF:1;
+ USHORT rsv:1;
+ USHORT eTxBF:1;
+ USHORT STBC:2; /*SPACE */
+ USHORT ShortGI:1;
+ USHORT BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ USHORT MCS:7; /* MCS */
+ } field;
+#else
+ struct {
+ USHORT MCS:7; /* MCS */
+ USHORT BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ USHORT ShortGI:1;
+ USHORT STBC:2; /*SPACE */
+ USHORT eTxBF:1;
+ USHORT rsv:1;
+ USHORT iTxBF:1;
+ USHORT MODE:2; /* Use definition MODE_xxx. */
+ } field;
+#endif
+ USHORT word;
+} HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
+#endif /* RT65xx */
+
+typedef enum _RT_802_11_PREAMBLE {
+ Rt802_11PreambleLong,
+ Rt802_11PreambleShort,
+ Rt802_11PreambleAuto
+} RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE;
+
+typedef enum _RT_802_11_PHY_MODE {
+ PHY_11BG_MIXED = 0,
+ PHY_11B = 1,
+ PHY_11A = 2,
+ PHY_11ABG_MIXED = 3,
+ PHY_11G = 4,
+#ifdef DOT11_N_SUPPORT
+ PHY_11ABGN_MIXED = 5, /* both band 5 */
+ PHY_11N_2_4G = 6, /* 11n-only with 2.4G band 6 */
+ PHY_11GN_MIXED = 7, /* 2.4G band 7 */
+ PHY_11AN_MIXED = 8, /* 5G band 8 */
+ PHY_11BGN_MIXED = 9, /* if check 802.11b. 9 */
+ PHY_11AGN_MIXED = 10, /* if check 802.11b. 10 */
+ PHY_11N_5G = 11, /* 11n-only with 5G band 11 */
+#endif /* DOT11_N_SUPPORT */
+#ifdef DOT11_VHT_AC
+ PHY_11VHT_N_ABG_MIXED = 12, /* 12 -> AC/A/AN/B/G/GN mixed */
+ PHY_11VHT_N_AG_MIXED = 13, /* 13 -> AC/A/AN/G/GN mixed */
+ PHY_11VHT_N_A_MIXED = 14, /* 14 -> AC/AN/A mixed in 5G band */
+ PHY_11VHT_N_MIXED = 15, /* 15 -> AC/AN mixed in 5G band */
+#endif /* DOT11_VHT_AC */
+ PHY_MODE_MAX,
+} RT_802_11_PHY_MODE;
+
+#ifdef DOT11_VHT_AC
+#define PHY_MODE_IS_5G_BAND(__Mode) \
+ ((__Mode == PHY_11A) || \
+ (__Mode == PHY_11ABG_MIXED) || \
+ (__Mode == PHY_11ABGN_MIXED) || \
+ (__Mode == PHY_11AN_MIXED) || \
+ (__Mode == PHY_11AGN_MIXED) || \
+ (__Mode == PHY_11N_5G) ||\
+ (__Mode == PHY_11VHT_N_MIXED) ||\
+ (__Mode == PHY_11VHT_N_A_MIXED))
+#elif defined(DOT11_N_SUPPORT)
+#define PHY_MODE_IS_5G_BAND(__Mode) \
+ ((__Mode == PHY_11A) || \
+ (__Mode == PHY_11ABG_MIXED) || \
+ (__Mode == PHY_11ABGN_MIXED) || \
+ (__Mode == PHY_11AN_MIXED) || \
+ (__Mode == PHY_11AGN_MIXED) || \
+ (__Mode == PHY_11N_5G))
+#else
+
+#define PHY_MODE_IS_5G_BAND(__Mode) \
+ ((__Mode == PHY_11A) || \
+ (__Mode == PHY_11ABG_MIXED))
+#endif /* DOT11_N_SUPPORT */
+
+/* put all proprietery for-query objects here to reduce # of Query_OID */
+typedef struct _RT_802_11_LINK_STATUS {
+ ULONG CurrTxRate; /* in units of 0.5Mbps */
+ ULONG ChannelQuality; /* 0..100 % */
+ ULONG TxByteCount; /* both ok and fail */
+ ULONG RxByteCount; /* both ok and fail */
+ ULONG CentralChannel; /* 40MHz central channel number */
+} RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS;
+
+#ifdef SYSTEM_LOG_SUPPORT
+typedef struct _RT_802_11_EVENT_LOG {
+ LARGE_INTEGER SystemTime; /* timestammp via NdisGetCurrentSystemTime() */
+ UCHAR Addr[MAC_ADDR_LENGTH];
+ USHORT Event; /* EVENT_xxx */
+} RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
+
+typedef struct _RT_802_11_EVENT_TABLE {
+ ULONG Num;
+ ULONG Rsv; /* to align Log[] at LARGE_INEGER boundary */
+ RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT];
+} RT_802_11_EVENT_TABLE, *PRT_802_11_EVENT_TABLE;
+#endif /* SYSTEM_LOG_SUPPORT */
+
+/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */
+typedef union _MACHTTRANSMIT_SETTING {
+ struct {
+ USHORT MCS:7; /* MCS */
+ USHORT BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ USHORT ShortGI:1;
+ USHORT STBC:2; /*SPACE */
+ USHORT rsv:3;
+ USHORT MODE:2; /* Use definition MODE_xxx. */
+ } field;
+ USHORT word;
+} MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
+
+typedef struct _RT_802_11_MAC_ENTRY {
+ UCHAR ApIdx;
+ UCHAR Addr[MAC_ADDR_LENGTH];
+ UCHAR Aid;
+ UCHAR Psm; /* 0:PWR_ACTIVE, 1:PWR_SAVE */
+ UCHAR MimoPs; /* 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled */
+ CHAR AvgRssi0;
+ CHAR AvgRssi1;
+ CHAR AvgRssi2;
+ UINT32 ConnectedTime;
+ MACHTTRANSMIT_SETTING TxRate;
+} RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY;
+
+typedef struct _RT_802_11_MAC_TABLE {
+ ULONG Num;
+ RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC];
+} RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE;
+
+#ifdef DOT11_N_SUPPORT
+#ifdef TXBF_SUPPORT
+typedef
+ struct {
+ ULONG TxSuccessCount;
+ ULONG TxRetryCount;
+ ULONG TxFailCount;
+ ULONG ETxSuccessCount;
+ ULONG ETxRetryCount;
+ ULONG ETxFailCount;
+ ULONG ITxSuccessCount;
+ ULONG ITxRetryCount;
+ ULONG ITxFailCount;
+} RT_COUNTER_TXBF;
+
+typedef
+ struct {
+ ULONG Num;
+ RT_COUNTER_TXBF Entry[MAX_NUMBER_OF_MAC];
+} RT_802_11_TXBF_TABLE;
+#endif /* TXBF_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+
+/* structure for query/set hardware register - MAC, BBP, RF register */
+typedef struct _RT_802_11_HARDWARE_REGISTER {
+ ULONG HardwareType; /* 0:MAC, 1:BBP, 2:RF register, 3:EEPROM */
+ ULONG Offset; /* Q/S register offset addr */
+ ULONG Data; /* R/W data buffer */
+} RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER;
+
+typedef struct _RT_802_11_AP_CONFIG {
+ ULONG EnableTxBurst; /* 0-disable, 1-enable */
+ ULONG EnableTurboRate; /* 0-disable, 1-enable 72/100mbps turbo rate */
+ ULONG IsolateInterStaTraffic; /* 0-disable, 1-enable isolation */
+ ULONG HideSsid; /* 0-disable, 1-enable hiding */
+ ULONG UseBGProtection; /* 0-AUTO, 1-always ON, 2-always OFF */
+ ULONG UseShortSlotTime; /* 0-no use, 1-use 9-us short slot time */
+ ULONG Rsv1; /* must be 0 */
+ ULONG SystemErrorBitmap; /* ignore upon SET, return system error upon QUERY */
+} RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG;
+
+/* structure to query/set STA_CONFIG */
+typedef struct _RT_802_11_STA_CONFIG {
+ ULONG EnableTxBurst; /* 0-disable, 1-enable */
+ ULONG EnableTurboRate; /* 0-disable, 1-enable 72/100mbps turbo rate */
+ ULONG UseBGProtection; /* 0-AUTO, 1-always ON, 2-always OFF */
+ ULONG UseShortSlotTime; /* 0-no use, 1-use 9-us short slot time when applicable */
+ ULONG AdhocMode; /* 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only */
+ ULONG HwRadioStatus; /* 0-OFF, 1-ON, default is 1, Read-Only */
+ ULONG Rsv1; /* must be 0 */
+ ULONG SystemErrorBitmap; /* ignore upon SET, return system error upon QUERY */
+} RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG;
+
+/* */
+/* For OID Query or Set about BA structure */
+/* */
+typedef struct _OID_BACAP_STRUC {
+ UCHAR RxBAWinLimit;
+ UCHAR TxBAWinLimit;
+ UCHAR Policy; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid */
+ UCHAR MpduDensity; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid */
+ UCHAR AmsduEnable; /*Enable AMSDU transmisstion */
+ UCHAR AmsduSize; /* 0:3839, 1:7935 bytes. UINT MSDUSizeToBytes[] = { 3839, 7935}; */
+ UCHAR MMPSmode; /* MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable */
+ BOOLEAN AutoBA; /* Auto BA will automatically */
+} OID_BACAP_STRUC, *POID_BACAP_STRUC;
+
+typedef struct _RT_802_11_ACL_ENTRY {
+ UCHAR Addr[MAC_ADDR_LENGTH];
+ USHORT Rsv;
+} RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY;
+
+typedef struct GNU_PACKED _RT_802_11_ACL {
+ ULONG Policy; /* 0-disable, 1-positive list, 2-negative list */
+ ULONG Num;
+ RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL];
+} RT_802_11_ACL, *PRT_802_11_ACL;
+
+typedef struct _RT_802_11_WDS {
+ ULONG Num;
+ NDIS_802_11_MAC_ADDRESS Entry[24 /*MAX_NUM_OF_WDS_LINK */ ];
+ ULONG KeyLength;
+ UCHAR KeyMaterial[32];
+} RT_802_11_WDS, *PRT_802_11_WDS;
+
+typedef struct _RT_802_11_TX_RATES_ {
+ UCHAR SupRateLen;
+ UCHAR SupRate[MAX_LENGTH_OF_SUPPORT_RATES];
+ UCHAR ExtRateLen;
+ UCHAR ExtRate[MAX_LENGTH_OF_SUPPORT_RATES];
+} RT_802_11_TX_RATES, *PRT_802_11_TX_RATES;
+
+/* Definition of extra information code */
+#define GENERAL_LINK_UP 0x0 /* Link is Up */
+#define GENERAL_LINK_DOWN 0x1 /* Link is Down */
+#define HW_RADIO_OFF 0x2 /* Hardware radio off */
+#define SW_RADIO_OFF 0x3 /* Software radio off */
+#define AUTH_FAIL 0x4 /* Open authentication fail */
+#define AUTH_FAIL_KEYS 0x5 /* Shared authentication fail */
+#define ASSOC_FAIL 0x6 /* Association failed */
+#define EAP_MIC_FAILURE 0x7 /* Deauthencation because MIC failure */
+#define EAP_4WAY_TIMEOUT 0x8 /* Deauthencation on 4-way handshake timeout */
+#define EAP_GROUP_KEY_TIMEOUT 0x9 /* Deauthencation on group key handshake timeout */
+#define EAP_SUCCESS 0xa /* EAP succeed */
+#define DETECT_RADAR_SIGNAL 0xb /* Radar signal occur in current channel */
+#define EXTRA_INFO_MAX 0xb /* Indicate Last OID */
+
+#define EXTRA_INFO_CLEAR 0xffffffff
+
+/* This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use. */
+typedef struct {
+ RT_802_11_PHY_MODE PhyMode; /* */
+ UCHAR TransmitNo;
+ UCHAR HtMode; /*HTMODE_GF or HTMODE_MM */
+ UCHAR ExtOffset; /*extension channel above or below */
+ UCHAR MCS;
+ UCHAR BW;
+ UCHAR STBC;
+ UCHAR SHORTGI;
+ UCHAR rsv;
+} OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE;
+
+
+#ifdef LLTD_SUPPORT
+typedef struct _RT_LLTD_ASSOICATION_ENTRY {
+ UCHAR Addr[ETH_LENGTH_OF_ADDRESS];
+ unsigned short MOR; /* maximum operational rate */
+ UCHAR phyMode;
+} RT_LLTD_ASSOICATION_ENTRY, *PRT_LLTD_ASSOICATION_ENTRY;
+
+typedef struct _RT_LLTD_ASSOICATION_TABLE {
+ unsigned int Num;
+ RT_LLTD_ASSOICATION_ENTRY Entry[MAX_NUMBER_OF_MAC];
+} RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE;
+#endif /* LLTD_SUPPORT */
+
+
+#ifdef WSC_INCLUDED
+#define RT_WSC_UPNP_EVENT_FLAG 0x109
+#endif /* WSC_INCLUDED */
+
+
+
+/*#define MAX_CUSTOM_LEN 128 */
+
+
+typedef struct _RT_CHANNEL_LIST_INFO {
+ UCHAR ChannelList[MAX_NUM_OF_CHS]; /* list all supported channels for site survey */
+ UCHAR ChannelListNum; /* number of channel in ChannelList[] */
+} RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO;
+
+
+/* WSC configured credential */
+typedef struct _WSC_CREDENTIAL {
+ NDIS_802_11_SSID SSID; /* mandatory */
+ USHORT AuthType; /* mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk */
+ USHORT EncrType; /* mandatory, 1: none, 2: wep, 4: tkip, 8: aes */
+ UCHAR Key[64]; /* mandatory, Maximum 64 byte */
+ USHORT KeyLength;
+ UCHAR MacAddr[MAC_ADDR_LENGTH]; /* mandatory, AP MAC address */
+ UCHAR KeyIndex; /* optional, default is 1 */
+ UCHAR bFromUPnP; /* TRUE: This credential is from external UPnP registrar */
+ UCHAR Rsvd[2]; /* Make alignment */
+} WSC_CREDENTIAL, *PWSC_CREDENTIAL;
+
+/* WSC configured profiles */
+typedef struct _WSC_PROFILE {
+ UINT ProfileCnt;
+ UINT ApplyProfileIdx; /* add by johnli, fix WPS test plan 5.1.1 */
+ WSC_CREDENTIAL Profile[8]; /* Support up to 8 profiles */
+} WSC_PROFILE, *PWSC_PROFILE;
+
+#ifdef WAPI_SUPPORT
+typedef enum _WAPI_PORT_SECURE_STATE {
+ WAPI_PORT_NOT_SECURED,
+ WAPI_PORT_SECURED,
+} WAPI_PORT_SECURE_STATE, *PWAPI_PORT_SECURE_STATE;
+
+typedef struct _WAPI_PORT_SECURE_STRUCT {
+ UCHAR Addr[MAC_ADDR_LENGTH];
+ USHORT state;
+} WAPI_PORT_SECURE_STRUCT, *PWAPI_PORT_SECURE_STRUCT;
+
+typedef struct _WAPI_UCAST_KEY_STRUCT {
+ UCHAR Addr[MAC_ADDR_LENGTH];
+ USHORT key_id;
+ UCHAR PTK[64]; /* unicast and additional key */
+} WAPI_UCAST_KEY_STRUCT, *PWAPI_UCAST_KEY_STRUCT;
+
+typedef struct _WAPI_MCAST_KEY_STRUCT {
+ UINT32 key_id;
+ UCHAR m_tx_iv[16];
+ UCHAR key_announce[16];
+ UCHAR NMK[16]; /* notify master key */
+} WAPI_MCAST_KEY_STRUCT, *PWAPI_MCAST_KEY_STRUCT;
+
+typedef struct _WAPI_WIE_STRUCT {
+ UCHAR addr[6];
+ UINT32 wie_len;
+ UCHAR wie[90]; /* wapi information element */
+} WAPI_WIE_STRUCT, *PWAPI_WIE_STRUCT;
+
+#endif /* WAPI_SUPPORT */
+
+
+
+#ifdef APCLI_SUPPORT
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+#define RT_ASSOC_EVENT_FLAG 0x0101
+#define RT_DISASSOC_EVENT_FLAG 0x0102
+#define RT_REQIE_EVENT_FLAG 0x0103
+#define RT_RESPIE_EVENT_FLAG 0x0104
+#define RT_ASSOCINFO_EVENT_FLAG 0x0105
+#define RT_PMKIDCAND_FLAG 0x0106
+#define RT_INTERFACE_DOWN 0x0107
+#define RT_INTERFACE_UP 0x0108
+#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
+#endif /* APCLI_SUPPORT */
+
+
+
+
+
+
+#ifdef RTMP_MAC_USB
+#define RT_OID_USB_WOW_SUSPEND 0x0920
+#define RT_OID_USB_WOW_RESUME 0x0921
+#endif /* RTMP_MAC_USB */
+
+#endif /* _OID_H_ */
diff --git a/cleopatre/devkit/mt7601udrv/include/os/rt_drv.h b/cleopatre/devkit/mt7601udrv/include/os/rt_drv.h
new file mode 100644
index 0000000000..290e68a0fe
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/os/rt_drv.h
@@ -0,0 +1,1061 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt_drv.h
+
+ Abstract:
+ Put all virtual OS related definition/structure/MACRO here except
+ standard ANSI C function.
+
+ Note:
+ No any OS related definition/MACRO is defined here.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+*/
+
+/* same as rt_linux.h to warn users the two files can not be used simultaneously */
+#ifndef __RT_LINUX_H__
+#define __RT_LINUX_H__
+
+#include "os/rt_linux_cmm.h"
+#include <linux/string.h>
+#include <linux/ctype.h>
+
+#undef AP_WSC_INCLUDED
+#undef STA_WSC_INCLUDED
+#undef WSC_INCLUDED
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef WSC_AP_SUPPORT
+#define AP_WSC_INCLUDED
+#endif /* WSC_AP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#if defined(WSC_AP_SUPPORT) || defined(WSC_STA_SUPPORT)
+#define WSC_INCLUDED
+#endif
+
+/*#ifdef RTMP_USB_SUPPORT */
+typedef VOID *PUSB_DEV;
+typedef VOID *purbb_t;
+typedef VOID pregs;
+/*typedef struct usb_ctrlrequest devctrlrequest; */
+/*#endif */
+
+/***********************************************************************************
+ * Profile related sections
+ ***********************************************************************************/
+#ifdef CONFIG_AP_SUPPORT
+#ifdef RTMP_MAC_USB
+#ifdef INF_AMAZON_SE
+#define AP_PROFILE_PATH "/ramdisk/etc/Wireless/RT2870AP/RT2870AP.dat"
+#define AP_RTMP_FIRMWARE_FILE_NAME "/ramdisk/etc/Wireless/RT2870AP/RT2870AP.bin"
+#else
+#define AP_PROFILE_PATH "/etc/Wireless/RT2870AP/RT2870AP.dat"
+#define AP_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2870AP/RT2870AP.bin"
+#endif
+#define AP_NIC_DEVICE_NAME "RT2870AP"
+#define AP_DRIVER_VERSION "3.0.0.1"
+#ifdef MULTIPLE_CARD_SUPPORT
+#define CARD_INFO_PATH "/etc/Wireless/RT2870AP/RT2870APCard.dat"
+#endif /* MULTIPLE_CARD_SUPPORT */
+#endif /* RTMP_MAC_USB */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+
+
+#ifdef SINGLE_SKU_V2
+#define SINGLE_SKU_TABLE_FILE_NAME "/etc/Wireless/RT2870STA/SingleSKU.dat"
+#endif /* SINGLE_SKU_V2 */
+
+/***********************************************************************************
+ * Compiler related definitions
+ ***********************************************************************************/
+#undef __inline
+#define __inline static inline
+#define IN
+#define OUT
+#define INOUT
+#define NDIS_STATUS INT
+
+
+/***********************************************************************************
+ * OS Specific definitions and data structures
+ ***********************************************************************************/
+typedef void * PPCI_DEV;
+typedef void * PNET_DEV;
+typedef void * PNDIS_PACKET;
+typedef char NDIS_PACKET;
+typedef PNDIS_PACKET * PPNDIS_PACKET;
+typedef ra_dma_addr_t NDIS_PHYSICAL_ADDRESS;
+typedef ra_dma_addr_t * PNDIS_PHYSICAL_ADDRESS;
+typedef void * NDIS_HANDLE;
+typedef char * PNDIS_BUFFER;
+
+#undef KERN_ERR
+#define KERN_ERR
+
+
+/***********************************************************************************
+ * Network related constant definitions
+ ***********************************************************************************/
+#ifndef IFNAMSIZ
+#define IFNAMSIZ 16
+#endif
+
+#define ETH_LENGTH_OF_ADDRESS 6
+
+#define NDIS_STATUS_SUCCESS 0x00
+#define NDIS_STATUS_FAILURE 0x01
+#define NDIS_STATUS_INVALID_DATA 0x02
+#define NDIS_STATUS_RESOURCES 0x03
+
+#define NDIS_SET_PACKET_STATUS(_p, _status) do{} while(0)
+#define NdisWriteErrorLogEntry(_a, _b, _c, _d) do{} while(0)
+
+/* statistics counter */
+#define STATS_INC_RX_PACKETS(_pAd, _dev)
+#define STATS_INC_TX_PACKETS(_pAd, _dev)
+
+#define STATS_INC_RX_BYTESS(_pAd, _dev, len)
+#define STATS_INC_TX_BYTESS(_pAd, _dev, len)
+
+#define STATS_INC_RX_ERRORS(_pAd, _dev)
+#define STATS_INC_TX_ERRORS(_pAd, _dev)
+
+#define STATS_INC_RX_DROPPED(_pAd, _dev)
+#define STATS_INC_TX_DROPPED(_pAd, _dev)
+
+
+/***********************************************************************************
+ * Ralink Specific network related constant definitions
+ ***********************************************************************************/
+#define MIN_NET_DEVICE_FOR_MBSSID 0x00 /*0x00,0x10,0x20,0x30 */
+#define MIN_NET_DEVICE_FOR_WDS 0x10 /*0x40,0x50,0x60,0x70 */
+#define MIN_NET_DEVICE_FOR_APCLI 0x20
+#define MIN_NET_DEVICE_FOR_MESH 0x30
+
+#define NET_DEVICE_REAL_IDX_MASK 0x0f /* for each operation mode, we maximum support 15 entities. */
+
+
+
+
+/***********************************************************************************
+ * OS signaling related constant definitions
+ ***********************************************************************************/
+
+/***********************************************************************************
+ * OS file operation related data structure definitions
+ ***********************************************************************************/
+typedef VOID * RTMP_OS_FD;
+
+#define IS_FILE_OPEN_ERR(_fd) RtmpOsFileIsErr((_fd))
+
+#ifndef O_RDONLY
+#define O_RDONLY RTMP_FILE_RDONLY
+#endif /* O_RDONLY */
+
+#ifndef O_WRONLY
+#define O_WRONLY RTMP_FILE_WRONLY
+#endif /* O_WRONLY */
+
+#ifndef O_CREAT
+#define O_CREAT RTMP_FILE_CREAT
+#endif /* O_CREAT */
+
+#ifndef O_TRUNC
+#define O_TRUNC RTMP_FILE_TRUNC
+#endif /* O_TRUNC */
+
+
+/***********************************************************************************
+ * OS semaphore related data structure and definitions
+ ***********************************************************************************/
+#define RTCMDUp RtmpOsCmdUp
+
+
+/***********************************************************************************
+ * OS Memory Access related data structure and definitions
+ ***********************************************************************************/
+#define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
+#define NdisCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
+#define NdisZeroMemory(Destination, Length) memset(Destination, 0, Length)
+#define NdisFillMemory(Destination, Length, Fill) memset(Destination, Fill, Length)
+#define NdisCmpMemory(Destination, Source, Length) memcmp(Destination, Source, Length)
+#define NdisEqualMemory(Source1, Source2, Length) (!memcmp(Source1, Source2, Length))
+#define RTMPEqualMemory(Source1, Source2, Length) (!memcmp(Source1, Source2, Length))
+
+#define MlmeAllocateMemory(_pAd, _ppVA) os_alloc_mem(_pAd, _ppVA, MGMT_DMA_BUFFER_SIZE)
+#define MlmeFreeMemory(_pAd, _pVA) os_free_mem(_pAd, _pVA)
+
+#define COPY_MAC_ADDR(Addr1, Addr2) memcpy((Addr1), (Addr2), MAC_ADDR_LEN)
+
+
+/***********************************************************************************
+ * OS task related data structure and definitions
+ ***********************************************************************************/
+#define RTMP_OS_PID ULONG /* value or pointer */
+
+#define RTMP_GET_OS_PID(_a, _b) RtmpOsGetPid(&_a, _b);
+#define CHECK_TASK_LEGALITY(_task) RtmpOsCheckTaskLegality(_task)
+#define ATE_KILL_THREAD_PID RtmpThreadPidKill
+
+typedef INT (*RTMP_OS_TASK_CALLBACK)(ULONG);
+
+
+/***********************************************************************************
+ * IOCTL related definitions and data structures.
+ **********************************************************************************/
+#define NET_IOCTL VOID
+#define PNET_IOCTL VOID *
+
+/* undef them to avoid compile errors in rt_symb.c */
+#undef EINVAL
+#undef EOPNOTSUPP
+#undef EFAULT
+#undef ENETDOWN
+#undef E2BIG
+#undef ENOMEM
+#undef EAGAIN
+#undef ENOTCONN
+
+#define EINVAL (-RTMP_IO_EINVAL)
+#define EOPNOTSUPP (-RTMP_IO_EOPNOTSUPP)
+#define EFAULT (-RTMP_IO_EFAULT)
+#define ENETDOWN (-RTMP_IO_ENETDOWN)
+#define E2BIG (-RTMP_IO_E2BIG)
+#define ENOMEM (-RTMP_IO_ENOMEM)
+#define EAGAIN (-RTMP_IO_EAGAIN)
+#define ENOTCONN (-RTMP_IO_ENOTCONN)
+
+
+/***********************************************************************************
+ * Timer related definitions and data structures.
+ **********************************************************************************/
+#define OS_HZ RtmpOsTickUnitGet()
+
+typedef void (*TIMER_FUNCTION)(ULONG);
+
+#define OS_WAIT RtmpOsWait
+
+#define RTMP_TIME_AFTER RtmpOsTimerAfter
+#define RTMP_TIME_BEFORE RtmpOsTimerBefore
+
+#define ONE_TICK 1
+
+#define NdisGetSystemUpTime RtmpOsGetSystemUpTime
+
+
+/***********************************************************************************
+ * OS specific cookie data structure binding to RTMP_ADAPTER
+ ***********************************************************************************/
+
+/* do not have compile option in the structure for UTIL module */
+struct os_cookie {
+
+#ifdef RTMP_MAC_USB
+ VOID *pUsb_Dev;
+
+#endif /* RTMP_MAC_USB */
+
+#ifdef WORKQUEUE_BH
+ UINT32 pAd_va;
+#endif /* WORKQUEUE_BH */
+
+ RTMP_NET_TASK_STRUCT rx_done_task;
+ RTMP_NET_TASK_STRUCT cmd_rsp_event_task;
+ RTMP_NET_TASK_STRUCT mgmt_dma_done_task;
+ RTMP_NET_TASK_STRUCT ac0_dma_done_task;
+#ifdef RALINK_ATE
+ RTMP_NET_TASK_STRUCT ate_ac0_dma_done_task;
+#endif /* RALINK_ATE */
+ RTMP_NET_TASK_STRUCT ac1_dma_done_task;
+ RTMP_NET_TASK_STRUCT ac2_dma_done_task;
+ RTMP_NET_TASK_STRUCT ac3_dma_done_task;
+ RTMP_NET_TASK_STRUCT hcca_dma_done_task;
+ RTMP_NET_TASK_STRUCT tbtt_task;
+
+
+#ifdef UAPSD_SUPPORT
+ RTMP_NET_TASK_STRUCT uapsd_eosp_sent_task;
+#endif /* UAPSD_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef DFS_SUPPORT
+#ifdef DFS_SOFTWARE_SUPPORT
+ RTMP_NET_TASK_STRUCT pulse_radar_detect_task;
+ RTMP_NET_TASK_STRUCT width_radar_detect_task;
+#endif /* DFS_SOFTWARE_SUPPORT */
+#endif /* DFS_SUPPORT */
+
+#ifdef CARRIER_DETECTION_SUPPORT
+ RTMP_NET_TASK_STRUCT carrier_sense_task;
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#ifdef DFS_SUPPORT
+ RTMP_NET_TASK_STRUCT dfs_task;
+#endif /* DFS_SUPPORT */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef RTMP_MAC_USB
+ RTMP_NET_TASK_STRUCT null_frame_complete_task;
+ RTMP_NET_TASK_STRUCT pspoll_frame_complete_task;
+#endif /* RTMP_MAC_USB */
+
+#ifdef CONFIG_MULTI_CHANNEL
+ RTMP_NET_TASK_STRUCT hcca_null_frame_complete_task;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+ RTMP_OS_PID apd_pid; /*802.1x daemon pid */
+ unsigned long apd_pid_nr;
+#ifdef CONFIG_AP_SUPPORT
+#ifdef IAPP_SUPPORT
+/* RT_SIGNAL_STRUC RTSignal; */
+ RTMP_OS_PID IappPid; /*IAPP daemon pid */
+ unsigned long IappPid_nr;
+#endif /* IAPP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+#ifdef WAPI_SUPPORT
+ RTMP_OS_PID wapi_pid; /*wapi daemon pid */
+ unsigned long wapi_pid_nr;
+#endif /* WAPI_SUPPORT */
+ INT ioctl_if_type;
+ INT ioctl_if;
+};
+
+typedef struct os_cookie * POS_COOKIE;
+
+
+/***********************************************************************************
+ * OS debugging and printing related definitions and data structure
+ ***********************************************************************************/
+#define PRINT_MAC(addr) \
+ addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
+
+#ifdef DBG
+extern ULONG RTDebugLevel;
+extern ULONG RTDebugFunc;
+
+#define DBGPRINT_RAW(Level, Fmt) \
+do{ \
+ ULONG __gLevel = (Level) & 0xff;\
+ ULONG __fLevel = ((Level)>>8) & 0xffffff;\
+ if (__gLevel <= RTDebugLevel) \
+ { \
+ if ((RTDebugFunc == 0) || \
+ ((RTDebugFunc != 0) && (((__fLevel & RTDebugFunc)!= 0) || (__gLevel <= RT_DEBUG_ERROR))))\
+ printk Fmt; \
+ } \
+}while(0)
+
+#define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt)
+
+
+#define DBGPRINT_ERR(Fmt) \
+{ \
+ printk("ERROR!!! "); \
+ printk Fmt; \
+}
+
+#define DBGPRINT_S(Status, Fmt) \
+{ \
+ printk Fmt; \
+}
+#else
+#define DBGPRINT(Level, Fmt)
+#define DBGPRINT_RAW(Level, Fmt)
+#define DBGPRINT_S(Status, Fmt)
+#define DBGPRINT_ERR(Fmt)
+#endif
+
+#undef ASSERT
+#ifdef DBG
+#define ASSERT(x) \
+{ \
+ if (!(x)) \
+ { \
+ printk(__FILE__ ":%d assert " #x "failed\n", __LINE__); \
+ } \
+}
+#else
+#define ASSERT(x)
+#endif /* DBG */
+
+void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen);
+
+
+/*********************************************************************************************************
+ The following code are not revised, temporary put it here.
+ *********************************************************************************************************/
+
+
+/***********************************************************************************
+ * Device DMA Access related definitions and data structures.
+ **********************************************************************************/
+/*#ifdef RTMP_MAC_PCI*/
+#define size_t ULONG
+
+ra_dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, int sd_idx, int direction);
+void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, int direction);
+
+#define pci_enable_msi RtmpOsPciMsiEnable
+#define pci_disable_msi RtmpOsPciMsiDisable
+
+#define PCI_MAP_SINGLE_DEV(_handle, _ptr, _size, _sd_idx, _dir) \
+ linux_pci_map_single(_handle, _ptr, _size, _sd_idx, _dir)
+
+#define PCI_UNMAP_SINGLE(_pAd, _ptr, _size, _dir) \
+ linux_pci_unmap_single(((POS_COOKIE)(_pAd->OS_Cookie))->pci_dev, _ptr, _size, _dir)
+
+#define PCI_ALLOC_CONSISTENT(_pci_dev, _size, _ptr) \
+ pci_alloc_consistent(_pci_dev, _size, _ptr)
+
+#define PCI_FREE_CONSISTENT(_pci_dev, _size, _virtual_addr, _physical_addr) \
+ pci_free_consistent(_pci_dev, _size, _virtual_addr, _physical_addr)
+/*#endif RTMP_MAC_PCI*/
+
+#define DEV_ALLOC_SKB(_pAd, _Pkt, _length) \
+ _Pkt = RtmpOSNetPktAlloc(_pAd, _length);
+
+/*#ifdef RTMP_MAC_USB */
+/*#define PCI_MAP_SINGLE(_handle, _ptr, _size, _dir) (ULONG)0 */
+/*#define PCI_UNMAP_SINGLE(_handle, _ptr, _size, _dir) */
+/*#endif RTMP_MAC_USB */
+
+
+/*
+ * ULONG
+ * RTMP_GetPhysicalAddressLow(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
+ */
+#define RTMP_GetPhysicalAddressLow(phy_addr) (phy_addr)
+
+/*
+ * ULONG
+ * RTMP_GetPhysicalAddressHigh(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
+ */
+#define RTMP_GetPhysicalAddressHigh(phy_addr) (0)
+
+/*
+ * VOID
+ * RTMP_SetPhysicalAddressLow(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
+ * IN ULONG Value);
+ */
+#define RTMP_SetPhysicalAddressLow(phy_addr, Value) \
+ phy_addr = Value;
+
+/*
+ * VOID
+ * RTMP_SetPhysicalAddressHigh(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
+ * IN ULONG Value);
+ */
+#define RTMP_SetPhysicalAddressHigh(phy_addr, Value)
+
+#define NdisMIndicateStatus(_w, _x, _y, _z)
+
+
+
+/***********************************************************************************
+ * Device Register I/O Access related definitions and data structures.
+ **********************************************************************************/
+#define readl RTMP_PCI_Readl
+#define readw RTMP_PCI_Readw
+#define readb RTMP_PCI_Readb
+#define writel RTMP_PCI_Writel
+#define writew RTMP_PCI_Writew
+#define writeb RTMP_PCI_Writeb
+
+/* TODO: We can merge two readl to a function to speed up or one real/writel */
+
+
+#ifdef RTMP_MAC_USB
+#define RTMP_IO_FORCE_READ32(_A, _R, _pV) \
+ RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
+
+#define RTMP_IO_FORCE_WRITE32(_A, _R, _V) \
+ do{\
+ /* if ((_R) != 0x404)*/ /* TODO:shiang-6590, depends on sw porting guide, don't acccess it now */\
+ RTUSBWriteMACRegister((_A), (_R), (UINT32) (_V), FALSE); \
+ }while(0)
+
+#define RTMP_IO_READ32(_A, _R, _pV) \
+ RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
+
+#define RTMP_IO_READ8(_A, _R, _pV) \
+{ \
+}
+
+#define RTMP_IO_WRITE32(_A, _R, _V) \
+ RTUSBWriteMACRegister((_A), (_R), (UINT32) (_V), FALSE)
+
+#define RTMP_IO_WRITE8(_A, _R, _V) \
+{ \
+ USHORT _Val = _V; \
+ RTUSBSingleWrite((_A), (_R), (USHORT) (_Val), FALSE); \
+}
+
+
+#define RTMP_IO_WRITE16(_A, _R, _V) \
+{ \
+ RTUSBSingleWrite((_A), (_R), (USHORT) (_V), FALSE); \
+}
+
+#define RTMP_SYS_IO_READ32
+#define RTMP_SYS_IO_WRITE32
+#endif /* RTMP_MAC_USB */
+
+#define pci_read_config_word RtmpOsPciConfigReadWord
+#define pci_write_config_word RtmpOsPciConfigWriteWord
+#define pci_read_config_dword RtmpOsPciConfigReadDWord
+#define pci_write_config_dword RtmpOsPciConfigWriteDWord
+#define pci_find_capability RtmpOsPciFindCapability
+
+#define RTMP_USB_URB_DATA_GET RtmpOsUsbUrbDataGet
+#define RTMP_USB_URB_STATUS_GET RtmpOsUsbUrbStatusGet
+#define RTMP_USB_URB_LEN_GET RtmpOsUsbUrbLenGet
+
+#define IW_SCAN_MAX_DATA RTMP_OS_MAX_SCAN_DATA_GET()
+
+/***********************************************************************************
+ * Network Related data structure and marco definitions
+ ***********************************************************************************/
+#define PKTSRC_NDIS 0x7f
+#define PKTSRC_DRIVER 0x0f
+
+#define RTMP_OS_NETDEV_GET_PHYADDR RtmpOsNetDevGetPhyAddr
+#define SET_OS_PKT_NETDEV RtmpOsSetPktNetDev
+#define RTMP_OS_NETDEV_GET_DEVNAME RtmpOsGetNetDevName
+#define RTMP_OS_NETDEV_SET_TYPE RtmpOsSetNetDevType
+#define RTMP_OS_NETDEV_SET_TYPE_MONITOR RtmpOsSetNetDevTypeMonitor
+
+#define QUEUE_ENTRY_TO_PACKET(pEntry) \
+ (PNDIS_PACKET)(pEntry)
+
+#define PACKET_TO_QUEUE_ENTRY(pPacket) \
+ (PQUEUE_ENTRY)(pPacket)
+
+#define RTMP_OS_NETDEV_STATE_RUNNING(_pNetDev) (RtmpOSNetDevIsUp(_pNetDev) == TRUE)
+
+#define RELEASE_NDIS_PACKET(_pReserved, _pPacket, _Status) \
+{ \
+ RTMPFreeNdisPacket(_pReserved, _pPacket); \
+}
+
+/*
+ * packet helper
+ * - convert internal rt packet to os packet or
+ * os packet to rt packet
+ */
+extern ULONG RTPktOffsetData, RTPktOffsetLen, RTPktOffsetCB;
+
+#define RTPKT_TO_OSPKT(_p) (_p)
+#define OSPKT_TO_RTPKT(_p) (_p)
+
+#define GET_OS_PKT_DATAPTR(_pkt) \
+ ((UCHAR *)(*(ULONG *)((UCHAR *)_pkt + RTPktOffsetData)))
+
+#define SET_OS_PKT_DATAPTR \
+ RtmpOsPktDataPtrAssign
+
+#define GET_OS_PKT_LEN(_pkt) \
+ (*(UINT32 *)((UCHAR *)_pkt + RTPktOffsetLen))
+
+#define SET_OS_PKT_LEN \
+ RtmpOsPktLenAssign
+
+#define GET_OS_PKT_CB(_pkt) \
+ ((UCHAR *)((UCHAR *)_pkt + RTPktOffsetCB))
+
+#define GET_OS_PKT_NETDEV(_pkt) RtmpOsPktNetDevGet
+
+#define OS_PKT_CLONED \
+ RtmpOsIsPktCloned
+
+#define OS_PKT_COPY \
+ RtmpOsPktCopy
+
+#define OS_PKT_TAIL_ADJUST \
+ RtmpOsPktTailAdjust
+
+#define OS_PKT_HEAD_BUF_EXTEND \
+ RtmpOsPktHeadBufExtend
+
+#define OS_PKT_TAIL_BUF_EXTEND \
+ RtmpOsPktTailBufExtend
+
+#define OS_PKT_RESERVE \
+ RtmpOsPktReserve
+
+#define OS_PKT_CLONE(_pAd, _pkt, _src, _flag) \
+ _src = RtmpOsPktClone((_pkt));
+
+#define RTMP_OS_PKT_INIT RtmpOsPktInit
+
+extern UINT32 RtmpOsGetUnaligned32(
+ IN UINT32 *pWord);
+
+extern ULONG RtmpOsGetUnalignedlong(
+ IN ULONG *pWord);
+
+#define get_unaligned RtmpOsGetUnaligned
+#define get_unaligned32 RtmpOsGetUnaligned32
+#define get_unalignedlong RtmpOsGetUnalignedlong
+
+#define OS_NTOHS RtmpOsNtohs
+#define OS_HTONS RtmpOsHtons
+#define OS_NTOHL RtmpOsNtohl
+#define OS_HTONL RtmpOsHtonl
+
+#ifndef ntohs
+#define ntohs OS_NTOHS
+#endif /* ntohs */
+#ifndef htons
+#define htons OS_HTONS
+#endif /* htons */
+#ifndef ntohl
+#define ntohl OS_NTOHL
+#endif /* ntohl */
+#ifndef htonl
+#define htonl OS_HTONL
+#endif /* htonl */
+
+#define RTMP_OS_NETDEV_START_QUEUE RtmpOsNetQueueStart
+#define RTMP_OS_NETDEV_STOP_QUEUE RtmpOsNetQueueStop
+#define RTMP_OS_NETDEV_WAKE_QUEUE RtmpOsNetQueueWake
+
+
+#define CB_OFF 10
+
+#define PACKET_CB_ASSIGN(_p, _offset) \
+ (*((UINT8 *)_p + RTPktOffsetCB + _offset))
+
+#define PACKET_CB(_p, _offset) \
+ (*((UINT8 *)_p + RTPktOffsetCB + CB_OFF + _offset))
+
+/* User Priority */
+#define RTMP_SET_PACKET_UP(_p, _prio) (PACKET_CB(_p, 0) = _prio)
+#define RTMP_GET_PACKET_UP(_p) (PACKET_CB(_p, 0))
+
+/* Fragment # */
+#define RTMP_SET_PACKET_FRAGMENTS(_p, _num) (PACKET_CB(_p, 1) = _num)
+#define RTMP_GET_PACKET_FRAGMENTS(_p) (PACKET_CB(_p, 1))
+
+/* 0x0 ~0x7f: TX to AP's own BSS which has the specified AID. if AID>127, set bit 7 in RTMP_SET_PACKET_EMACTAB too. */
+/*(this value also as MAC(on-chip WCID) table index) */
+/* 0x80~0xff: TX to a WDS link. b0~6: WDS index */
+#define RTMP_SET_PACKET_WCID(_p, _wdsidx) (PACKET_CB(_p, 2) = _wdsidx)
+#define RTMP_GET_PACKET_WCID(_p) (PACKET_CB(_p, 2))
+
+/* 0xff: PKTSRC_NDIS, others: local TX buffer index. This value affects how to a packet */
+#define RTMP_SET_PACKET_SOURCE(_p, _pktsrc) (PACKET_CB(_p, 3) = _pktsrc)
+#define RTMP_GET_PACKET_SOURCE(_p) (PACKET_CB(_p, 3))
+
+/* RTS/CTS-to-self protection method */
+#define RTMP_SET_PACKET_RTS(_p, _num) (PACKET_CB(_p, 4) = _num)
+#define RTMP_GET_PACKET_RTS(_p) (PACKET_CB(_p, 4))
+/* see RTMP_S(G)ET_PACKET_EMACTAB */
+
+/* TX rate index */
+#define RTMP_SET_PACKET_TXRATE(_p, _rate) (PACKET_CB(_p, 5) = _rate)
+#define RTMP_GET_PACKET_TXRATE(_p) (PACKET_CB(_p, 5))
+
+/* From which Interface */
+#define RTMP_SET_PACKET_IF(_p, _ifdx) (PACKET_CB(_p, 6) = _ifdx)
+#define RTMP_GET_PACKET_IF(_p) (PACKET_CB(_p, 6))
+#define RTMP_SET_PACKET_NET_DEVICE_MBSSID(_p, _bss) RTMP_SET_PACKET_IF((_p), (_bss))
+#define RTMP_SET_PACKET_NET_DEVICE_WDS(_p, _bss) RTMP_SET_PACKET_IF((_p), ((_bss) + MIN_NET_DEVICE_FOR_WDS))
+#define RTMP_SET_PACKET_NET_DEVICE_APCLI(_p, _idx) RTMP_SET_PACKET_IF((_p), ((_idx) + MIN_NET_DEVICE_FOR_APCLI))
+#define RTMP_SET_PACKET_NET_DEVICE_MESH(_p, _idx) RTMP_SET_PACKET_IF((_p), ((_idx) + MIN_NET_DEVICE_FOR_MESH))
+#define RTMP_SET_PACKET_NET_DEVICE_P2P(_p, _idx) RTMP_SET_PACKET_IF((_p), ((_idx) + MIN_NET_DEVICE_FOR_P2P_GO))
+#define RTMP_GET_PACKET_NET_DEVICE_MBSSID(_p) RTMP_GET_PACKET_IF((_p))
+#define RTMP_GET_PACKET_NET_DEVICE(_p) RTMP_GET_PACKET_IF((_p))
+
+#define RTMP_SET_PACKET_MOREDATA(_p, _morebit) (PACKET_CB(_p, 7) = _morebit)
+#define RTMP_GET_PACKET_MOREDATA(_p) (PACKET_CB(_p, 7))
+
+
+
+#ifdef UAPSD_SUPPORT
+/* if we queue a U-APSD packet to any software queue, we will set the U-APSD
+ flag and its physical queue ID for it */
+#define RTMP_SET_PACKET_UAPSD(_p, _flg_uapsd, _que_id) \
+ (PACKET_CB(_p, 9) = ((_flg_uapsd<<7) | _que_id))
+
+#define RTMP_SET_PACKET_QOS_NULL(_p) (PACKET_CB(_p, 9) = 0xff)
+#define RTMP_GET_PACKET_QOS_NULL(_p) (PACKET_CB(_p, 9))
+#define RTMP_SET_PACKET_NON_QOS_NULL(_p) (PACKET_CB(_p, 9) = 0x00)
+#define RTMP_GET_PACKET_UAPSD_Flag(_p) ((PACKET_CB(_p, 9) & 0x80) >> 7)
+#define RTMP_GET_PACKET_UAPSD_QUE_ID(_p) (PACKET_CB(_p, 9) & 0x7f)
+
+#define RTMP_SET_PACKET_EOSP(_p, _flg) (PACKET_CB(_p, 10) = _flg)
+#define RTMP_GET_PACKET_EOSP(_p) (PACKET_CB(_p, 10))
+#endif /* UAPSD_SUPPORT */
+
+
+/* */
+/* Sepcific Pakcet Type definition */
+/* */
+#define RTMP_PACKET_SPECIFIC_CB_OFFSET 11
+
+#define RTMP_PACKET_SPECIFIC_DHCP 0x01
+#define RTMP_PACKET_SPECIFIC_EAPOL 0x02
+#define RTMP_PACKET_SPECIFIC_IPV4 0x04
+#define RTMP_PACKET_SPECIFIC_WAI 0x08
+#define RTMP_PACKET_SPECIFIC_VLAN 0x10
+#define RTMP_PACKET_SPECIFIC_LLCSNAP 0x20
+#define RTMP_PACKET_SPECIFIC_TDLS 0x40
+
+/*Specific */
+#define RTMP_SET_PACKET_SPECIFIC(_p, _flg) (PACKET_CB(_p, 11) = _flg)
+
+/*DHCP */
+#define RTMP_SET_PACKET_DHCP(_p, _flg) \
+ do{ \
+ if (_flg) \
+ PACKET_CB(_p, 11) |= (RTMP_PACKET_SPECIFIC_DHCP); \
+ else \
+ PACKET_CB(_p, 11) &= (~RTMP_PACKET_SPECIFIC_DHCP); \
+ }while(0)
+#define RTMP_GET_PACKET_DHCP(_p) (PACKET_CB(_p, 11) & RTMP_PACKET_SPECIFIC_DHCP)
+
+/*EAPOL */
+#define RTMP_SET_PACKET_EAPOL(_p, _flg) \
+ do{ \
+ if (_flg) \
+ PACKET_CB(_p, 11) |= (RTMP_PACKET_SPECIFIC_EAPOL); \
+ else \
+ PACKET_CB(_p, 11) &= (~RTMP_PACKET_SPECIFIC_EAPOL); \
+ }while(0)
+#define RTMP_GET_PACKET_EAPOL(_p) (PACKET_CB(_p, 11) & RTMP_PACKET_SPECIFIC_EAPOL)
+
+/*WAI */
+#define RTMP_SET_PACKET_WAI(_p, _flg) \
+ do{ \
+ if (_flg) \
+ PACKET_CB(_p, 11) |= (RTMP_PACKET_SPECIFIC_WAI); \
+ else \
+ PACKET_CB(_p, 11) &= (~RTMP_PACKET_SPECIFIC_WAI); \
+ }while(0)
+#define RTMP_GET_PACKET_WAI(_p) (PACKET_CB(_p, 11) & RTMP_PACKET_SPECIFIC_WAI)
+
+#define RTMP_GET_PACKET_LOWRATE(_p) (PACKET_CB(_p, 11) & (RTMP_PACKET_SPECIFIC_EAPOL | RTMP_PACKET_SPECIFIC_DHCP | RTMP_PACKET_SPECIFIC_WAI))
+
+/*VLAN */
+#define RTMP_SET_PACKET_VLAN(_p, _flg) \
+ do{ \
+ if (_flg) \
+ PACKET_CB(_p, 11) |= (RTMP_PACKET_SPECIFIC_VLAN); \
+ else \
+ PACKET_CB(_p, 11) &= (~RTMP_PACKET_SPECIFIC_VLAN); \
+ }while(0)
+#define RTMP_GET_PACKET_VLAN(_p) (PACKET_CB(_p, 11) & RTMP_PACKET_SPECIFIC_VLAN)
+
+/*LLC/SNAP */
+#define RTMP_SET_PACKET_LLCSNAP(_p, _flg) \
+ do{ \
+ if (_flg) \
+ PACKET_CB(_p, 11) |= (RTMP_PACKET_SPECIFIC_LLCSNAP); \
+ else \
+ PACKET_CB(_p, 11) &= (~RTMP_PACKET_SPECIFIC_LLCSNAP); \
+ }while(0)
+
+#define RTMP_GET_PACKET_LLCSNAP(_p) (PACKET_CB(_p, 11) & RTMP_PACKET_SPECIFIC_LLCSNAP)
+
+/* IP */
+#define RTMP_SET_PACKET_IPV4(_p, _flg) \
+ do{ \
+ if (_flg) \
+ PACKET_CB(_p, 11) |= (RTMP_PACKET_SPECIFIC_IPV4); \
+ else \
+ PACKET_CB(_p, 11) &= (~RTMP_PACKET_SPECIFIC_IPV4); \
+ }while(0)
+
+#define RTMP_GET_PACKET_IPV4(_p) (PACKET_CB(_p, 11) & RTMP_PACKET_SPECIFIC_IPV4)
+
+/* TDLS */
+#define RTMP_SET_PACKET_TDLS(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_TDLS); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_TDLS); \
+ }while(0)
+
+#define RTMP_GET_PACKET_TDLS(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_TDLS)
+
+/* If this flag is set, it indicates that this EAPoL frame MUST be clear. */
+#define RTMP_SET_PACKET_CLEAR_EAP_FRAME(_p, _flg) (PACKET_CB(_p, 12) = _flg)
+#define RTMP_GET_PACKET_CLEAR_EAP_FRAME(_p) (PACKET_CB(_p, 12))
+
+
+#ifdef DOT11_VHT_AC
+#define MAX_PACKETS_IN_QUEUE 1024 /*(512)*/
+#else
+#define MAX_PACKETS_IN_QUEUE (512)
+#endif /* DOT11_VHT_AC */
+
+
+/* use bit3 of cb[CB_OFF+16] */
+#define RTMP_SET_PACKET_MGMT_PKT(_p, _flg) \
+ PACKET_CB(_p, 16) = (PACKET_CB(_p, 16) & 0xF7) | ((_flg & 0x01) << 3);
+#define RTMP_GET_PACKET_MGMT_PKT(_p) \
+ ((PACKET_CB(_p, 16) & 0x08) >> 3)
+
+/* use bit0 of cb[CB_OFF+20] */
+#define RTMP_SET_PACKET_MGMT_PKT_DATA_QUE(_p, _flg) \
+ PACKET_CB(_p, 20) = (PACKET_CB(_p, 20) & 0xFE) | (_flg & 0x01);
+#define RTMP_GET_PACKET_MGMT_PKT_DATA_QUE(_p) \
+ (PACKET_CB(_p, 20) & 0x01)
+
+#define RTMP_SET_PACKET_5VT(_p, _flg) (PACKET_CB(_p, 22) = _flg)
+#define RTMP_GET_PACKET_5VT(_p) (PACKET_CB(_p, 22))
+
+#define RTMP_SET_PACKET_PROTOCOL(_p, _protocol) {\
+ (PACKET_CB(_p, 23) = (UINT8)((_protocol) & 0x00ff)); \
+ (PACKET_CB(_p, 24) = (UINT8)(((_protocol) & 0xff00) >> 8)); \
+}
+
+#define RTMP_GET_PACKET_PROTOCOL(_p) \
+ ((((UINT16)PACKET_CB(_p, 23)) << 8) \
+ | ((UINT16)PACKET_CB(_p, 24)))
+
+#ifdef INF_AMAZON_SE
+/* [CB_OFF+28], 1B, Iverson patch for WMM A5-T07 ,WirelessStaToWirelessSta do not bulk out aggregate */
+#define RTMP_SET_PACKET_NOBULKOUT(_p, _morebit) (PACKET_CB(_p, 28) = _morebit)
+#define RTMP_GET_PACKET_NOBULKOUT(_p) (PACKET_CB(_p, 28))
+#endif /* INF_AMAZON_SE */
+/* Max skb->cb = 48B = [CB_OFF+38] */
+
+
+
+
+#if defined(CONFIG_CSO_SUPPORT) || defined(CONFIG_RX_CSO_SUPPORT)
+#define RTMP_SET_TCP_CHKSUM_FAIL(_p, _flg) (PACKET_CB(_p, 30) = _flg);
+#define RTMP_GET_TCP_CHKSUM_FAIL(_p) (PACKET_CB(_p, 30))
+#endif /* defined(CONFIG_CSO_SUPPORT) || defined(CONFIG_RX_CSO_SUPPORT) */
+
+
+
+/***********************************************************************************
+ * Other function prototypes definitions
+ ***********************************************************************************/
+void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time);
+
+
+
+
+#ifdef RTMP_USB_SUPPORT
+/******************************************************************************
+
+ USB related definitions
+
+******************************************************************************/
+
+#define RTMP_USB_PKT_COPY RtmpOsPktBodyCopy
+
+/*typedef struct usb_device_id USB_DEVICE_ID; */
+
+#ifdef INF_AMAZON_SE
+#define BULKAGGRE_SIZE 30
+#else
+#define BULKAGGRE_SIZE 60
+#endif /* INF_AMAZON_SE */
+
+/*#define RT28XX_PUT_DEVICE rausb_put_dev */
+#define RTUSB_ALLOC_URB rausb_alloc_urb
+#define RTUSB_SUBMIT_URB rausb_submit_urb
+#define RTUSB_URB_ALLOC_BUFFER rausb_buffer_alloc
+#define RTUSB_URB_FREE_BUFFER rausb_buffer_free
+#define RTUSB_FREE_URB rausb_free_urb
+#define RTUSB_UNLINK_URB rausb_kill_urb
+#define USB_CONTROL_MSG rausb_control_msg
+#define usb_sndctrlpipe rausb_sndctrlpipe
+#define usb_rcvctrlpipe rausb_rcvctrlpipe
+#define RTUSB_AUTOPM_PUT_INTERFACE rausb_autopm_put_interface
+#define RTUSB_AUTOPM_GET_INTERFACE rausb_autopm_get_interface
+
+
+
+#define RTUSB_CONTROL_MSG(pUsb_Dev, uEndpointAddress, Request, RequestType, Value,Index, tmpBuf, TransferBufferLength, timeout, ret) \
+ do{ \
+ if (RequestType == DEVICE_VENDOR_REQUEST_OUT) \
+ ret = USB_CONTROL_MSG(pUsb_Dev, usb_sndctrlpipe(pUsb_Dev, uEndpointAddress), Request, RequestType, Value, Index, tmpBuf, TransferBufferLength, timeout); \
+ else if (RequestType == DEVICE_VENDOR_REQUEST_IN) \
+ ret = USB_CONTROL_MSG(pUsb_Dev, usb_rcvctrlpipe(pUsb_Dev, uEndpointAddress), Request, RequestType, Value, Index, tmpBuf, TransferBufferLength, timeout); \
+ else \
+ { \
+ DBGPRINT(RT_DEBUG_ERROR, ("vendor request direction is failed\n")); \
+ ret = -1; \
+ } \
+ }while(0)
+
+
+extern VOID dump_urb(VOID *purb);
+
+typedef VOID USBHST_STATUS;
+typedef INT32 URBCompleteStatus;
+#define RTMP_OS_WAIT_QUEUE_HEAD VOID
+typedef VOID (*usb_complete_t)(VOID *);
+
+#define RtmpUsbBulkOutDataPacketComplete pRtmpDrvNetOps->RtmpNetUsbBulkOutDataPacketComplete
+#define RtmpUsbBulkOutMLMEPacketComplete pRtmpDrvNetOps->RtmpNetUsbBulkOutMLMEPacketComplete
+#define RtmpUsbBulkOutNullFrameComplete pRtmpDrvNetOps->RtmpNetUsbBulkOutNullFrameComplete
+#ifdef CONFIG_MULTI_CHANNEL
+#define RtmpUsbBulkOutHCCANullFrameComplete pRtmpDrvNetOps->RtmpNetUsbBulkOutHCCANullFrameComplete
+#endif /* CONFIG_MULTI_CHANNEL */
+
+#define RtmpUsbBulkOutRTSFrameComplete pRtmpDrvNetOps->RtmpNetUsbBulkOutRTSFrameComplete
+#define RtmpUsbBulkOutPsPollComplete pRtmpDrvNetOps->RtmpNetUsbBulkOutPsPollComplete
+#define RtmpUsbBulkRxComplete pRtmpDrvNetOps->RtmpNetUsbBulkRxComplete
+#define RtmpUsbBulkCmdRspEventComplete pRtmpDrvNetOps->RtmpNetUsbBulkCmdRspEventComplete
+
+#define RTUSBBulkOutDataPacketComplete(Status, pURB, pt_regs) RTUSBBulkOutDataPacketComplete(pURB)
+#define RTUSBBulkOutMLMEPacketComplete(Status, pURB, pt_regs) RTUSBBulkOutMLMEPacketComplete(pURB)
+#define RTUSBBulkOutNullFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutNullFrameComplete(pURB)
+#define RTUSBBulkOutRTSFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutRTSFrameComplete(pURB)
+#define RTUSBBulkOutPsPollComplete(Status, pURB, pt_regs) RTUSBBulkOutPsPollComplete(pURB)
+#define RTUSBBulkRxComplete(Status, pURB, pt_regs) RTUSBBulkRxComplete(pURB)
+#define RTUSBBulkCmdRspEventComplete(Status, pURB, pt_regs) RTUSBBulkCmdRspEventComplete(pURB)
+#define USBUploadFWComplete(Status, pURB, pt_regs) USBUploadFWComplete(pURB)
+#define USBKickOutCmdComplete(Status, pURB, pt_regs) USBKickOutCmdComplete(pURB)
+#ifdef CONFIG_MULTI_CHANNEL
+#define RTUSBBulkOutHCCANullFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutHCCANullFrameComplete(pURB)
+#endif /* CONFIG_MULTI_CHANNEL */
+
+
+USBHST_STATUS RTUSBBulkOutDataPacketComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutMLMEPacketComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutNullFrameComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutRTSFrameComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutPsPollComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkRxComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkCmdRspEventComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+#ifdef CONFIG_MULTI_CHANNEL
+USBHST_STATUS RTUSBBulkOutHCCANullFrameComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+#endif /* CONFIG_MULTI_CHANNEL */
+
+#define rtusb_urb_context context
+#define rtusb_urb_status status
+
+#define RTMP_OS_USB_CONTEXT_GET RtmpOsUsbContextGet
+#define RTMP_OS_USB_STATUS_GET RtmpOsUsbStatusGet
+
+#define RTUSB_URB_DMA_MAPPING RtmpOsUsbDmaMapping
+
+#define RTUSB_FILL_TX_BULK_URB RtmpOsUsbInitHTTxDesc
+#define RTUSB_FILL_HTTX_BULK_URB RtmpOsUsbInitHTTxDesc
+#define RTUSB_FILL_RX_BULK_URB RtmpOsUsbInitRxDesc
+
+#undef in_interrupt
+#define in_interrupt RtmpOsIsInInterrupt
+
+extern VOID *rausb_alloc_urb(INT32 iso_packets);
+extern VOID rausb_free_urb(VOID *urb);
+extern INT32 rausb_submit_urb(VOID *urb);
+extern VOID *rausb_buffer_alloc(VOID *dev,
+ size_t size,
+ ra_dma_addr_t *dma);
+extern VOID rausb_buffer_free(VOID *dev,
+ size_t size,
+ VOID *addr,
+ ra_dma_addr_t dma);
+extern VOID rausb_kill_urb(VOID *urb);
+
+extern int rausb_control_msg(VOID *dev,
+ unsigned int pipe,
+ __u8 request,
+ __u8 requesttype,
+ __u16 value,
+ __u16 index,
+ void *data,
+ __u16 size,
+ int timeout);
+
+#endif /* RTMP_USB_SUPPORT */
+
+
+#ifdef RALINK_ATE
+/******************************************************************************
+
+ ATE related definitions
+
+******************************************************************************/
+#define ate_print printk
+#define ATEDBGPRINT DBGPRINT
+
+#ifdef RTMP_MAC_USB
+#ifdef CONFIG_AP_SUPPORT
+#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2870AP/e2p.bin"
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* RTMP_MAC_USB */
+
+#endif /* RALINK_ATE */
+
+
+/* OS definition re-declaration */
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef ETH_P_IPV6
+#define ETH_P_IPV6 0x86DD
+#endif
+
+#ifndef ETH_P_IP
+#define ETH_P_IP 0x0800 /* Internet Protocol packet */
+#endif
+
+#ifndef ETH_ALEN
+#define ETH_ALEN 6
+#endif
+
+#undef KERN_EMERG
+#define KERN_EMERG
+#undef KERN_WARNING
+#define KERN_WARNING
+
+#undef copy_from_user
+#undef copy_to_user
+
+#define RTMP_OS_MAX_SCAN_DATA_GET RtmpOsMaxScanDataGet
+#define vmalloc RtmpOsVmalloc
+#define vfree RtmpOsVfree
+#define copy_from_user RtmpOsCopyFromUser
+#define copy_to_user RtmpOsCopyToUser
+#define simple_strtol RtmpOsSimpleStrtol
+
+#undef atomic_read
+#undef atomic_dec
+#undef InterlockedExchange
+#define atomic_read RtmpOsAtomicRead
+#define atomic_dec RtmpOsAtomicDec
+#define InterlockedExchange RtmpOsAtomicInterlockedExchange
+
+extern int sprintf(char * buf, const char * fmt, ...);
+extern int sscanf(const char *, const char *, ...);
+
+#define printk pRaOsOps->ra_printk
+#define snprintf pRaOsOps->ra_snprintf
+
+#endif /* __RT_LINUX_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/os/rt_linux.h b/cleopatre/devkit/mt7601udrv/include/os/rt_linux.h
new file mode 100644
index 0000000000..af57cd58b5
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/os/rt_linux.h
@@ -0,0 +1,1575 @@
+/****************************************************************************
+
+ Module Name:
+ rt_linux.h
+
+ Abstract:
+ Any OS related definition/MACRO is defined here.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+
+***************************************************************************/
+
+#ifndef __RT_LINUX_H__
+#define __RT_LINUX_H__
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/spinlock.h>
+#include <linux/init.h>
+#include <linux/string.h>
+#include <linux/timer.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/ethtool.h>
+#include <linux/wireless.h>
+#include <linux/proc_fs.h>
+#include <linux/delay.h>
+#include <linux/if_arp.h>
+#include <linux/ctype.h>
+#include <linux/vmalloc.h>
+#ifdef RTMP_USB_SUPPORT
+#include <linux/usb.h>
+#endif /* RTMP_USB_SUPPORT */
+#include <linux/wireless.h>
+#include <net/iw_handler.h>
+
+#ifdef INF_PPA_SUPPORT
+#include <net/ifx_ppa_api.h>
+#include <net/ifx_ppa_hook.h>
+#endif /* INF_PPA_SUPPORT */
+
+/* load firmware */
+#define __KERNEL_SYSCALLS__
+#include <linux/unistd.h>
+#include <asm/uaccess.h>
+#include <asm/types.h>
+#include <asm/unaligned.h> /* for get_unaligned() */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#include <linux/pid.h>
+#endif
+
+#ifdef RT_CFG80211_SUPPORT
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+#include <net/mac80211.h>
+#define EXT_BUILD_CHANNEL_LIST /* must define with CRDA */
+#else /* LINUX_VERSION_CODE */
+#undef RT_CFG80211_SUPPORT
+#endif /* LINUX_VERSION_CODE */
+#endif /* RT_CFG80211_SUPPORT */
+
+#ifdef MAT_SUPPORT
+#include <linux/if_ether.h>
+#include <linux/if_arp.h>
+#include <linux/ip.h>
+#endif /* MAT_SUPPORT */
+
+/* must put the definition before include "os/rt_linux_cmm.h" */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
+#define KTHREAD_SUPPORT 1
+#endif /* LINUX_VERSION_CODE */
+
+#ifdef KTHREAD_SUPPORT
+#include <linux/err.h>
+#include <linux/kthread.h>
+#endif /* KTHREAD_SUPPORT */
+
+
+#include "os/rt_linux_cmm.h"
+
+#ifdef RT_CFG80211_SUPPORT
+#include "cfg80211.h"
+#endif /* RT_CFG80211_SUPPORT */
+
+#undef AP_WSC_INCLUDED
+#undef STA_WSC_INCLUDED
+#undef WSC_INCLUDED
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef WSC_AP_SUPPORT
+#define AP_WSC_INCLUDED
+#endif /* WSC_AP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#if defined(WSC_AP_SUPPORT) || defined(WSC_STA_SUPPORT)
+#define WSC_INCLUDED
+#endif
+
+#ifdef KTHREAD_SUPPORT
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4)
+#error "This kerne version doesn't support kthread!!"
+#endif
+#endif /* KTHREAD_SUPPORT */
+
+/*#ifdef RTMP_USB_SUPPORT // os abl move */
+typedef struct usb_device *PUSB_DEV;
+typedef struct urb *purbb_t;
+typedef struct usb_ctrlrequest devctrlrequest;
+/*#endif */
+
+/***********************************************************************************
+ * Profile related sections
+ ***********************************************************************************/
+#ifdef CONFIG_AP_SUPPORT
+#ifdef RTMP_MAC_USB
+#ifdef INF_AMAZON_SE
+#define AP_PROFILE_PATH "/ramdisk/etc/Wireless/RT2870AP/RT2870AP.dat"
+#define AP_RTMP_FIRMWARE_FILE_NAME "/ramdisk/etc/Wireless/RT2870AP/RT2870AP.bin"
+#else
+#define AP_PROFILE_PATH "/etc/Wireless/RT2870AP/RT2870AP.dat"
+#define AP_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2870AP/RT2870AP.bin"
+#endif
+#define AP_NIC_DEVICE_NAME "RT2870AP"
+#define AP_DRIVER_VERSION "3.0.0.1"
+#ifdef MULTIPLE_CARD_SUPPORT
+#define CARD_INFO_PATH "/etc/Wireless/RT2870AP/RT2870APCard.dat"
+#endif /* MULTIPLE_CARD_SUPPORT */
+#endif /* RTMP_MAC_USB */
+
+
+#ifdef SINGLE_SKU_V2
+#define SINGLE_SKU_TABLE_FILE_NAME "/etc/Wireless/RT2860STA/SingleSKU.dat"
+#endif /* SINGLE_SKU_V2 */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+
+
+#ifdef CONFIG_APSTA_MIXED_SUPPORT
+extern const struct iw_handler_def rt28xx_ap_iw_handler_def;
+#endif /* CONFIG_APSTA_MIXED_SUPPORT */
+
+/***********************************************************************************
+ * Compiler related definitions
+ ***********************************************************************************/
+#undef __inline
+#define __inline static inline
+#define IN
+#define OUT
+#define INOUT
+#define NDIS_STATUS INT
+
+
+/***********************************************************************************
+ * OS Specific definitions and data structures
+ ***********************************************************************************/
+typedef struct net_device_stats NET_DEV_STATS;
+typedef struct pci_dev * PPCI_DEV;
+typedef struct net_device * PNET_DEV;
+typedef void * PNDIS_PACKET;
+typedef char NDIS_PACKET;
+typedef PNDIS_PACKET * PPNDIS_PACKET;
+typedef ra_dma_addr_t NDIS_PHYSICAL_ADDRESS;
+typedef ra_dma_addr_t * PNDIS_PHYSICAL_ADDRESS;
+typedef void * NDIS_HANDLE;
+typedef char * PNDIS_BUFFER;
+
+typedef struct ifreq NET_IOCTL;
+typedef struct ifreq * PNET_IOCTL;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+typedef struct pid * RTMP_OS_PID;
+#else
+typedef pid_t RTMP_OS_PID;
+#endif
+
+typedef struct semaphore OS_SEM;
+
+typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_dev);
+
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define RT_MOD_INC_USE_COUNT() \
+ if (!try_module_get(THIS_MODULE)) \
+ { \
+ DBGPRINT(RT_DEBUG_ERROR, ("%s: cannot reserve module\n", __FUNCTION__)); \
+ return -1; \
+ }
+
+#define RT_MOD_DEC_USE_COUNT() module_put(THIS_MODULE);
+#else
+#define RT_MOD_INC_USE_COUNT() MOD_INC_USE_COUNT;
+#define RT_MOD_DEC_USE_COUNT() MOD_DEC_USE_COUNT;
+#endif
+
+#define RTMP_INC_REF(_A) 0
+#define RTMP_DEC_REF(_A) 0
+#define RTMP_GET_REF(_A) 0
+
+
+#if WIRELESS_EXT >= 12
+/* This function will be called when query /proc */
+struct iw_statistics *rt28xx_get_wireless_stats(
+ IN struct net_device *net_dev);
+#endif
+
+
+/***********************************************************************************
+ * Network related constant definitions
+ ***********************************************************************************/
+#ifndef IFNAMSIZ
+#define IFNAMSIZ 16
+#endif
+
+#define ETH_LENGTH_OF_ADDRESS 6
+
+#define NDIS_STATUS_SUCCESS 0x00
+#define NDIS_STATUS_FAILURE 0x01
+#define NDIS_STATUS_INVALID_DATA 0x02
+#define NDIS_STATUS_RESOURCES 0x03
+
+#define NDIS_SET_PACKET_STATUS(_p, _status) do{} while(0)
+#define NdisWriteErrorLogEntry(_a, _b, _c, _d) do{} while(0)
+
+/* statistics counter */
+#define STATS_INC_RX_PACKETS(_pAd, _dev)
+#define STATS_INC_TX_PACKETS(_pAd, _dev)
+
+#define STATS_INC_RX_BYTESS(_pAd, _dev, len)
+#define STATS_INC_TX_BYTESS(_pAd, _dev, len)
+
+#define STATS_INC_RX_ERRORS(_pAd, _dev)
+#define STATS_INC_TX_ERRORS(_pAd, _dev)
+
+#define STATS_INC_RX_DROPPED(_pAd, _dev)
+#define STATS_INC_TX_DROPPED(_pAd, _dev)
+
+
+/***********************************************************************************
+ * Ralink Specific network related constant definitions
+ ***********************************************************************************/
+#define MIN_NET_DEVICE_FOR_MBSSID 0x00 /*0x00,0x10,0x20,0x30 */
+#define MIN_NET_DEVICE_FOR_WDS 0x10 /*0x40,0x50,0x60,0x70 */
+#define MIN_NET_DEVICE_FOR_APCLI 0x20
+#define MIN_NET_DEVICE_FOR_MESH 0x30
+
+#define NET_DEVICE_REAL_IDX_MASK 0x0f /* for each operation mode, we maximum support 15 entities. */
+
+
+
+
+/***********************************************************************************
+ * OS signaling related constant definitions
+ ***********************************************************************************/
+
+
+/***********************************************************************************
+ * OS file operation related data structure definitions
+ ***********************************************************************************/
+typedef struct file* RTMP_OS_FD;
+
+typedef struct _OS_FS_INFO_
+{
+ int fsuid;
+ int fsgid;
+ mm_segment_t fs;
+} OS_FS_INFO;
+
+#define IS_FILE_OPEN_ERR(_fd) ((_fd == NULL) || IS_ERR((_fd)))
+
+
+/***********************************************************************************
+ * OS semaphore related data structure and definitions
+ ***********************************************************************************/
+struct os_lock {
+ spinlock_t lock;
+ unsigned long flags;
+};
+
+typedef spinlock_t OS_NDIS_SPIN_LOCK;
+
+/* */
+/* spin_lock enhanced for Nested spin lock */
+/* */
+#define OS_NdisAllocateSpinLock(__lock) \
+{ \
+ spin_lock_init((spinlock_t *)(__lock)); \
+}
+
+#define OS_NdisFreeSpinLock(lock) \
+ do{}while(0)
+
+
+#define OS_SEM_LOCK(__lock) \
+{ \
+ spin_lock_bh((spinlock_t *)(__lock)); \
+}
+
+#define OS_SEM_UNLOCK(__lock) \
+{ \
+ spin_unlock_bh((spinlock_t *)(__lock)); \
+}
+
+
+/* sample, use semaphore lock to replace IRQ lock, 2007/11/15 */
+#ifdef MULTI_CORE_SUPPORT
+
+#define OS_IRQ_LOCK(__lock, __irqflags) \
+{ \
+ __irqflags = 0; \
+ spin_lock_irqsave((spinlock_t *)(__lock), __irqflags); \
+}
+
+#define OS_IRQ_UNLOCK(__lock, __irqflag) \
+{ \
+ spin_unlock_irqrestore((spinlock_t *)(__lock), __irqflag); \
+}
+#else
+#define OS_IRQ_LOCK(__lock, __irqflags) \
+{ \
+ __irqflags = 0; \
+ spin_lock_bh((spinlock_t *)(__lock)); \
+}
+
+#define OS_IRQ_UNLOCK(__lock, __irqflag) \
+{ \
+ spin_unlock_bh((spinlock_t *)(__lock)); \
+}
+#endif // MULTI_CORE_SUPPORT //
+#define OS_INT_LOCK(__lock, __irqflags) \
+{ \
+ spin_lock_irqsave((spinlock_t *)__lock, __irqflags); \
+}
+
+#define OS_INT_UNLOCK(__lock, __irqflag) \
+{ \
+ spin_unlock_irqrestore((spinlock_t *)(__lock), ((unsigned long)__irqflag)); \
+}
+
+#define OS_NdisAcquireSpinLock OS_SEM_LOCK
+#define OS_NdisReleaseSpinLock OS_SEM_UNLOCK
+
+/*
+ Following lock/unlock definition used for BBP/RF register read/write.
+ Currently we don't use it to protect MAC register access.
+
+ For USB:
+ we use binary semaphore to do the protection because all register
+ access done in kernel thread and should allow task go sleep when
+ in protected status.
+
+ For PCI/PCI-E/RBUS:
+ We use interrupt to do the protection because the register may accessed
+ in thread/tasklet/timer/inteerupt, so we use interrupt_disable to protect
+ the access.
+*/
+#define RTMP_MCU_RW_LOCK(_pAd, _irqflags) \
+ do{ \
+ if (_pAd->infType == RTMP_DEV_INF_USB) \
+ {\
+ RTMP_SEM_EVENT_WAIT(&_pAd->McuCmdSem, _irqflags);\
+ }\
+ else\
+ {\
+ RTMP_SEM_LOCK(&_pAd->McuCmdLock, _irqflags);\
+ }\
+ }while(0)
+
+#define RTMP_MCU_RW_UNLOCK(_pAd, _irqflags) \
+ do{ \
+ if(_pAd->infType == RTMP_DEV_INF_USB)\
+ { \
+ RTMP_SEM_EVENT_UP(&_pAd->McuCmdSem);\
+ } \
+ else\
+ {\
+ RTMP_SEM_UNLOCK(&_pAd->McuCmdLock, _irqflags);\
+ }\
+ }while(0)
+
+
+#ifndef wait_event_interruptible_timeout
+#define __wait_event_interruptible_timeout(wq, condition, ret) \
+do { \
+ wait_queue_t __wait; \
+ init_waitqueue_entry(&__wait, current); \
+ add_wait_queue(&wq, &__wait); \
+ for (;;) { \
+ set_current_state(TASK_INTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ if (!signal_pending(current)) { \
+ ret = schedule_timeout(ret); \
+ if (!ret) \
+ break; \
+ continue; \
+ } \
+ ret = -ERESTARTSYS; \
+ break; \
+ } \
+ current->state = TASK_RUNNING; \
+ remove_wait_queue(&wq, &__wait); \
+} while (0)
+
+#define wait_event_interruptible_timeout(wq, condition, timeout) \
+({ \
+ long __ret = timeout; \
+ if (!(condition)) \
+ __wait_event_interruptible_timeout(wq, condition, __ret); \
+ __ret; \
+})
+#endif
+
+#define OS_SEM_EVENT_INIT_LOCKED(_pSema) sema_init((_pSema), 0)
+#define OS_SEM_EVENT_INIT(_pSema) sema_init((_pSema), 1)
+#define OS_SEM_EVENT_DESTORY(_pSema) do{}while(0)
+#define OS_SEM_EVENT_WAIT(_pSema, _status) ((_status) = down_interruptible((_pSema)))
+#define OS_SEM_EVENT_UP(_pSema) up(_pSema)
+
+#define RTCMDUp OS_RTCMDUp
+
+#ifdef KTHREAD_SUPPORT
+#define RTMP_WAIT_EVENT_INTERRUPTIBLE(_Status, _pTask) \
+do { \
+ wait_event_interruptible(_pTask->kthread_q, \
+ _pTask->kthread_running || kthread_should_stop()); \
+ _pTask->kthread_running = FALSE; \
+ if (kthread_should_stop()) \
+ { \
+ (_Status) = -1; \
+ break; \
+ } \
+ else (_Status) = 0; \
+} while(0)
+#endif
+
+#ifdef KTHREAD_SUPPORT
+#define WAKE_UP(_pTask) \
+ do{ \
+ if ((_pTask)->kthread_task) \
+ { \
+ (_pTask)->kthread_running = TRUE; \
+ wake_up(&(_pTask)->kthread_q); \
+ } \
+ }while(0)
+#endif
+
+/***********************************************************************************
+ * OS Memory Access related data structure and definitions
+ ***********************************************************************************/
+#define MEM_ALLOC_FLAG (GFP_ATOMIC) /*(GFP_DMA | GFP_ATOMIC) */
+
+#define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
+#define NdisCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
+#define NdisZeroMemory(Destination, Length) memset(Destination, 0, Length)
+#define NdisFillMemory(Destination, Length, Fill) memset(Destination, Fill, Length)
+#define NdisCmpMemory(Destination, Source, Length) memcmp(Destination, Source, Length)
+#define NdisEqualMemory(Source1, Source2, Length) (!memcmp(Source1, Source2, Length))
+#define RTMPEqualMemory(Source1, Source2, Length) (!memcmp(Source1, Source2, Length))
+
+#define MlmeAllocateMemory(_pAd, _ppVA) os_alloc_mem(_pAd, _ppVA, MGMT_DMA_BUFFER_SIZE)
+#define MlmeFreeMemory(_pAd, _pVA) os_free_mem(_pAd, _pVA)
+
+#define COPY_MAC_ADDR(Addr1, Addr2) memcpy((Addr1), (Addr2), MAC_ADDR_LEN)
+
+
+/***********************************************************************************
+ * OS task related data structure and definitions
+ ***********************************************************************************/
+#define RTMP_OS_MGMT_TASK_FLAGS CLONE_VM
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+/*typedef struct pid * THREAD_PID; // no use */
+#define THREAD_PID_INIT_VALUE NULL
+/* TODO: Use this IOCTL carefully when linux kernel version larger than 2.6.27, because the PID only correct when the user space task do this ioctl itself. */
+/*#define RTMP_GET_OS_PID(_x, _y) _x = get_task_pid(current, PIDTYPE_PID); */
+#define RT_GET_OS_PID(_x, _y) do{rcu_read_lock(); _x=(ULONG)current->pids[PIDTYPE_PID].pid; rcu_read_unlock();}while(0)
+#ifdef OS_ABL_FUNC_SUPPORT
+#define RTMP_GET_OS_PID(_a, _b) RtmpOsGetPid(&_a, _b)
+#else
+#define RTMP_GET_OS_PID(_a, _b) RT_GET_OS_PID(_a, _b)
+#endif
+#define GET_PID_NUMBER(_v) pid_nr((_v))
+#define CHECK_PID_LEGALITY(_pid) if (pid_nr((_pid)) > 0)
+#define KILL_THREAD_PID(_A, _B, _C) kill_pid((_A), (_B), (_C))
+#else
+/*typedef pid_t THREAD_PID; // no use */
+#define THREAD_PID_INIT_VALUE -1
+#define RT_GET_OS_PID(_x, _pid) _x = _pid
+#define RTMP_GET_OS_PID(_x, _pid) _x = _pid
+#define GET_PID_NUMBER(_v) (_v)
+#define CHECK_PID_LEGALITY(_pid) if ((_pid) >= 0)
+#define KILL_THREAD_PID(_A, _B, _C) kill_proc((_A), (_B), (_C))
+#endif
+
+#define ATE_KILL_THREAD_PID(PID) KILL_THREAD_PID(PID, SIGTERM, 1)
+
+typedef int (*cast_fn)(void *);
+typedef INT (*RTMP_OS_TASK_CALLBACK)(ULONG);
+
+#ifdef WORKQUEUE_BH
+typedef struct work_struct OS_NET_TASK_STRUCT;
+typedef struct work_struct *POS_NET_TASK_STRUCT;
+#else
+typedef struct tasklet_struct OS_NET_TASK_STRUCT;
+typedef struct tasklet_struct *POS_NET_TASK_STRUCT;
+#endif /* WORKQUEUE_BH */
+
+/***********************************************************************************
+ * Timer related definitions and data structures.
+ **********************************************************************************/
+#define OS_HZ HZ
+
+typedef struct timer_list OS_NDIS_MINIPORT_TIMER;
+typedef struct timer_list OS_TIMER;
+
+typedef void (*TIMER_FUNCTION)(unsigned long);
+
+
+#define OS_WAIT(_time) \
+{ \
+ if (in_interrupt()) \
+ {\
+ RTMPusecDelay(_time * 1000);\
+ }else \
+ {\
+ int _i; \
+ long _loop = ((_time)/(1000/OS_HZ)) > 0 ? ((_time)/(1000/OS_HZ)) : 1;\
+ wait_queue_head_t _wait; \
+ init_waitqueue_head(&_wait); \
+ for (_i=0; _i<(_loop); _i++) \
+ wait_event_interruptible_timeout(_wait, 0, ONE_TICK); \
+ }\
+}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define RTMP_TIME_AFTER(a,b) \
+ (typecheck(unsigned long, (unsigned long)a) && \
+ typecheck(unsigned long, (unsigned long)b) && \
+ ((long)(b) - (long)(a) < 0))
+
+#define RTMP_TIME_AFTER_EQ(a,b) \
+ (typecheck(unsigned long, (unsigned long)a) && \
+ typecheck(unsigned long, (unsigned long)b) && \
+ ((long)(a) - (long)(b) >= 0))
+#define RTMP_TIME_BEFORE(a,b) RTMP_TIME_AFTER_EQ(b,a)
+#else
+#define typecheck(type,x) \
+({ type __dummy; \
+ typeof(x) __dummy2; \
+ (void)(&__dummy == &__dummy2); \
+ 1; \
+})
+#define RTMP_TIME_AFTER_EQ(a,b) \
+ (typecheck(unsigned long, (unsigned long)a) && \
+ typecheck(unsigned long, (unsigned long)b) && \
+ ((long)(a) - (long)(b) >= 0))
+#define RTMP_TIME_BEFORE(a,b) RTMP_TIME_AFTER_EQ(b,a)
+#define RTMP_TIME_AFTER(a,b) time_after(a, b)
+#endif
+
+#define ONE_TICK 1
+
+static inline void NdisGetSystemUpTime(ULONG *time)
+{
+ *time = jiffies;
+}
+
+
+/***********************************************************************************
+ * OS specific cookie data structure binding to RTMP_ADAPTER
+ ***********************************************************************************/
+
+struct os_cookie {
+
+#ifdef RTMP_MAC_USB
+ struct usb_device *pUsb_Dev;
+#endif /* RTMP_MAC_USB */
+
+#ifdef WORKQUEUE_BH
+ UINT32 pAd_va;
+#endif /* WORKQUEUE_BH */
+
+ RTMP_NET_TASK_STRUCT rx_done_task;
+ RTMP_NET_TASK_STRUCT cmd_rsp_event_task;
+ RTMP_NET_TASK_STRUCT mgmt_dma_done_task;
+ RTMP_NET_TASK_STRUCT ac0_dma_done_task;
+#ifdef RALINK_ATE
+ RTMP_NET_TASK_STRUCT ate_ac0_dma_done_task;
+#endif /* RALINK_ATE */
+ RTMP_NET_TASK_STRUCT ac1_dma_done_task;
+ RTMP_NET_TASK_STRUCT ac2_dma_done_task;
+ RTMP_NET_TASK_STRUCT ac3_dma_done_task;
+ RTMP_NET_TASK_STRUCT hcca_dma_done_task;
+ RTMP_NET_TASK_STRUCT tbtt_task;
+
+
+#ifdef UAPSD_SUPPORT
+ RTMP_NET_TASK_STRUCT uapsd_eosp_sent_task;
+#endif /* UAPSD_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef DFS_SUPPORT
+#ifdef DFS_SOFTWARE_SUPPORT
+ RTMP_NET_TASK_STRUCT pulse_radar_detect_task;
+ RTMP_NET_TASK_STRUCT width_radar_detect_task;
+#endif /* DFS_SOFTWARE_SUPPORT */
+#endif /* DFS_SUPPORT */
+
+#ifdef CARRIER_DETECTION_SUPPORT
+ RTMP_NET_TASK_STRUCT carrier_sense_task;
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#ifdef DFS_SUPPORT
+ struct tasklet_struct dfs_task;
+#endif /* DFS_SUPPORT */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef RTMP_MAC_USB
+ RTMP_NET_TASK_STRUCT null_frame_complete_task;
+ RTMP_NET_TASK_STRUCT pspoll_frame_complete_task;
+#endif /* RTMP_MAC_USB */
+
+#ifdef CONFIG_MULTI_CHANNEL
+ RTMP_NET_TASK_STRUCT hcca_null_frame_complete_task;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+ RTMP_OS_PID apd_pid; /*802.1x daemon pid */
+ unsigned long apd_pid_nr;
+#ifdef CONFIG_AP_SUPPORT
+#ifdef IAPP_SUPPORT
+/* RT_SIGNAL_STRUC RTSignal; */
+ RTMP_OS_PID IappPid; /*IAPP daemon pid */
+ unsigned long IappPid_nr;
+#endif /* IAPP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+#ifdef WAPI_SUPPORT
+ RTMP_OS_PID wapi_pid; /*wapi daemon pid */
+ unsigned long wapi_pid_nr;
+#endif /* WAPI_SUPPORT */
+ INT ioctl_if_type;
+ INT ioctl_if;
+};
+
+typedef struct os_cookie * POS_COOKIE;
+
+
+
+/***********************************************************************************
+ * OS debugging and printing related definitions and data structure
+ ***********************************************************************************/
+#define PRINT_MAC(addr) \
+ addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
+
+#ifdef DBG
+extern ULONG RTDebugLevel;
+extern ULONG RTDebugFunc;
+
+#define DBGPRINT_RAW(Level, Fmt) \
+do{ \
+ ULONG __gLevel = (Level) & 0xff;\
+ ULONG __fLevel = ((Level)>>8) & 0xffffff;\
+ if (__gLevel <= RTDebugLevel) \
+ { \
+ if ((RTDebugFunc == 0) || \
+ ((RTDebugFunc != 0) && (((__fLevel & RTDebugFunc)!= 0) || (__gLevel <= RT_DEBUG_ERROR))))\
+ printk Fmt; \
+ } \
+}while(0)
+
+#define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt)
+
+
+#define DBGPRINT_ERR(Fmt) \
+{ \
+ printk("ERROR!!! "); \
+ printk Fmt; \
+}
+
+#define DBGPRINT_S(Status, Fmt) \
+{ \
+ printk Fmt; \
+}
+#else
+#define DBGPRINT(Level, Fmt)
+#define DBGPRINT_RAW(Level, Fmt)
+#define DBGPRINT_S(Status, Fmt)
+#define DBGPRINT_ERR(Fmt)
+#endif
+
+#undef ASSERT
+#ifdef DBG
+#define ASSERT(x) \
+{ \
+ if (!(x)) \
+ { \
+ printk(KERN_WARNING __FILE__ ":%d assert " #x "failed\n", __LINE__); \
+ } \
+}
+#else
+#define ASSERT(x)
+#endif /* DBG */
+
+void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen);
+
+
+/*********************************************************************************************************
+ The following code are not revised, temporary put it here.
+ *********************************************************************************************************/
+
+
+/***********************************************************************************
+ * Device DMA Access related definitions and data structures.
+ **********************************************************************************/
+ra_dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, int sd_idx, int direction);
+void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, int direction);
+
+#define PCI_MAP_SINGLE_DEV(_handle, _ptr, _size, _sd_idx, _dir) \
+ linux_pci_map_single(_handle, _ptr, _size, _sd_idx, _dir)
+
+#define PCI_UNMAP_SINGLE(_pAd, _ptr, _size, _dir) \
+ linux_pci_unmap_single(((POS_COOKIE)(_pAd->OS_Cookie))->pci_dev, _ptr, _size, _dir)
+
+#define PCI_ALLOC_CONSISTENT(_pci_dev, _size, _ptr) \
+ pci_alloc_consistent(_pci_dev, _size, _ptr)
+
+#define PCI_FREE_CONSISTENT(_pci_dev, _size, _virtual_addr, _physical_addr) \
+ pci_free_consistent(_pci_dev, _size, _virtual_addr, _physical_addr)
+
+#ifdef VENDOR_FEATURE2_SUPPORT
+#define DEV_ALLOC_SKB(_pAd, _Pkt, _length) \
+ _Pkt = dev_alloc_skb(_length); \
+ if (_Pkt != NULL) {MEM_DBG_PKT_ALLOC_INC(_Pkt);};
+#else
+
+#define DEV_ALLOC_SKB(_pAd, _Pkt, _length) \
+ _Pkt = dev_alloc_skb(_length);
+#endif /* VENDOR_FEATURE2_SUPPORT */
+
+/*#define PCI_MAP_SINGLE(_handle, _ptr, _size, _dir) (ULONG)0 */
+/*#define PCI_UNMAP_SINGLE(_handle, _ptr, _size, _dir) */
+
+
+/*
+ * ULONG
+ * RTMP_GetPhysicalAddressLow(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
+ */
+#define RTMP_GetPhysicalAddressLow(PhysicalAddress) (PhysicalAddress)
+
+/*
+ * ULONG
+ * RTMP_GetPhysicalAddressHigh(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
+ */
+#define RTMP_GetPhysicalAddressHigh(PhysicalAddress) (0)
+
+/*
+ * VOID
+ * RTMP_SetPhysicalAddressLow(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
+ * IN ULONG Value);
+ */
+#define RTMP_SetPhysicalAddressLow(PhysicalAddress, Value) \
+ PhysicalAddress = Value;
+
+/*
+ * VOID
+ * RTMP_SetPhysicalAddressHigh(
+ * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
+ * IN ULONG Value);
+ */
+#define RTMP_SetPhysicalAddressHigh(PhysicalAddress, Value)
+
+#define NdisMIndicateStatus(_w, _x, _y, _z)
+
+
+
+/***********************************************************************************
+ * Device Register I/O Access related definitions and data structures.
+ **********************************************************************************/
+
+#ifdef RTMP_MAC_USB
+#define RTMP_IO_FORCE_READ32(_A, _R, _pV) \
+ RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
+
+#define RTMP_IO_READ32(_A, _R, _pV) \
+ RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
+
+#define RTMP_IO_FORCE_WRITE32(_A, _R, _V) \
+ do{\
+ /*if ((_R) != 0x404)*/ /* TODO:shiang-6590, depends on sw porting guide, don't acccess it now */\
+ RTUSBWriteMACRegister((_A), (_R), (UINT32) (_V), FALSE); \
+ }while(0)
+
+#define RTMP_IO_READ8(_A, _R, _pV) \
+{ \
+}
+
+#define RTMP_IO_WRITE32(_A, _R, _V) \
+ RTUSBWriteMACRegister((_A), (_R), (UINT32) (_V), FALSE)
+
+#define RTMP_IO_WRITE8(_A, _R, _V) \
+{ \
+ USHORT _Val = _V; \
+ RTUSBSingleWrite((_A), (_R), (USHORT) (_Val), FALSE); \
+}
+
+
+#define RTMP_IO_WRITE16(_A, _R, _V) \
+{ \
+ RTUSBSingleWrite((_A), (_R), (USHORT) (_V), FALSE); \
+}
+
+#define RTMP_SYS_IO_READ32
+#define RTMP_SYS_IO_WRITE32
+#endif /* RTMP_MAC_USB */
+
+#define RTMP_USB_URB_DATA_GET(__pUrb) ((purbb_t)__pUrb)->context
+#define RTMP_USB_URB_STATUS_GET(__pUrb) ((purbb_t)__pUrb)->status
+#define RTMP_USB_URB_LEN_GET(__pUrb) ((purbb_t)__pUrb)->actual_length
+
+/***********************************************************************************
+ * Network Related data structure and marco definitions
+ ***********************************************************************************/
+#define PKTSRC_NDIS 0x7f
+#define PKTSRC_DRIVER 0x0f
+
+#define RTMP_OS_NETDEV_STATE_RUNNING(_pNetDev) ((_pNetDev)->flags & IFF_UP)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
+#define _RTMP_OS_NETDEV_GET_PRIV(_pNetDev) ((_pNetDev)->ml_priv)
+#define _RTMP_OS_NETDEV_SET_PRIV(_pNetDev, _pPriv) ((_pNetDev)->ml_priv = (_pPriv))
+#else
+#define _RTMP_OS_NETDEV_GET_PRIV(_pNetDev) ((_pNetDev)->priv)
+#define _RTMP_OS_NETDEV_SET_PRIV(_pNetDev, _pPriv) ((_pNetDev)->priv = (_pPriv))
+#endif
+
+#define RTMP_OS_NETDEV_GET_DEVNAME(_pNetDev) ((_pNetDev)->name)
+#define RTMP_OS_NETDEV_GET_PHYADDR(_pNetDev) ((_pNetDev)->dev_addr)
+
+/* Get & Set NETDEV interface hardware type */
+#define RTMP_OS_NETDEV_GET_TYPE(_pNetDev) ((_pNetDev)->type)
+#define RTMP_OS_NETDEV_SET_TYPE(_pNetDev, _type) ((_pNetDev)->type = (_type))
+#define RTMP_OS_NETDEV_SET_TYPE_MONITOR(_pNetDev) RTMP_OS_NETDEV_SET_TYPE(_pNetDev, ARPHRD_IEEE80211_PRISM)
+
+#define RTMP_OS_NETDEV_START_QUEUE(_pNetDev) netif_start_queue((_pNetDev))
+#define RTMP_OS_NETDEV_STOP_QUEUE(_pNetDev) netif_stop_queue((_pNetDev))
+#define RTMP_OS_NETDEV_WAKE_QUEUE(_pNetDev) netif_wake_queue((_pNetDev))
+#define RTMP_OS_NETDEV_CARRIER_OFF(_pNetDev) netif_carrier_off((_pNetDev))
+
+#define QUEUE_ENTRY_TO_PACKET(pEntry) \
+ (PNDIS_PACKET)(pEntry)
+
+#define PACKET_TO_QUEUE_ENTRY(pPacket) \
+ (PQUEUE_ENTRY)(pPacket)
+
+#ifdef CONFIG_5VT_ENHANCE
+#define BRIDGE_TAG 0x35564252 /* depends on 5VT define in br_input.c */
+#endif
+
+#define GET_SG_LIST_FROM_PACKET(_p, _sc) \
+ rt_get_sg_list_from_packet(_p, _sc)
+
+#define RELEASE_NDIS_PACKET(_pAd, _pPacket, _Status) \
+{ \
+ RTMPFreeNdisPacket(_pAd, _pPacket); \
+}
+
+
+/*
+ * packet helper
+ * - convert internal rt packet to os packet or
+ * os packet to rt packet
+ */
+#define RTPKT_TO_OSPKT(_p) ((struct sk_buff *)(_p))
+#define OSPKT_TO_RTPKT(_p) ((PNDIS_PACKET)(_p))
+
+#define GET_OS_PKT_DATAPTR(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->data)
+#define SET_OS_PKT_DATAPTR(_pkt, _dataPtr) \
+ (RTPKT_TO_OSPKT(_pkt)->data) = (_dataPtr)
+
+#define GET_OS_PKT_LEN(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->len)
+#define SET_OS_PKT_LEN(_pkt, _len) \
+ (RTPKT_TO_OSPKT(_pkt)->len) = (_len)
+
+#define GET_OS_PKT_DATATAIL(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->tail)
+#define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
+ ((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))
+
+#define GET_OS_PKT_HEAD(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->head)
+
+#define GET_OS_PKT_END(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->end)
+
+#define GET_OS_PKT_NETDEV(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->dev)
+#define SET_OS_PKT_NETDEV(_pkt, _pNetDev) \
+ (RTPKT_TO_OSPKT(_pkt)->dev) = (_pNetDev)
+
+#define GET_OS_PKT_TYPE(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt))
+
+#define GET_OS_PKT_NEXT(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->next)
+
+
+#define OS_PKT_CLONED(_pkt) skb_cloned(RTPKT_TO_OSPKT(_pkt))
+#define OS_PKT_COPY(_pkt) skb_copy(RTPKT_TO_OSPKT(_pkt), GFP_ATOMIC)
+
+#define OS_PKT_TAIL_ADJUST(_pkt, _removedTagLen) \
+ SET_OS_PKT_DATATAIL(_pkt, GET_OS_PKT_DATATAIL(_pkt), (-_removedTagLen)); \
+ GET_OS_PKT_LEN(_pkt) -= _removedTagLen;
+
+#define OS_PKT_HEAD_BUF_EXTEND(_pkt, _offset) \
+ skb_push(RTPKT_TO_OSPKT(_pkt), _offset)
+
+#define OS_PKT_TAIL_BUF_EXTEND(_pkt, _Len) \
+ skb_put(RTPKT_TO_OSPKT(_pkt), _Len)
+
+#define OS_PKT_RESERVE(_pkt, _Len) \
+ skb_reserve(RTPKT_TO_OSPKT(_pkt), _Len)
+
+#define RTMP_OS_PKT_INIT(__pRxPacket, __pNetDev, __pData, __DataSize) \
+{ \
+ PNDIS_PACKET __pRxPkt; \
+ __pRxPkt = RTPKT_TO_OSPKT(__pRxPacket); \
+ SET_OS_PKT_NETDEV(__pRxPkt, __pNetDev); \
+ SET_OS_PKT_DATAPTR(__pRxPkt, __pData); \
+ SET_OS_PKT_LEN(__pRxPkt, __DataSize); \
+ SET_OS_PKT_DATATAIL(__pRxPkt, __pData, __DataSize); \
+}
+
+#ifdef VENDOR_FEATURE2_SUPPORT
+#define OS_PKT_CLONE(_pAd, _pkt, _src, _flag) \
+ _src = skb_clone(RTPKT_TO_OSPKT(_pkt), _flag); \
+ if (_src != NULL) OS_NumOfPktAlloc ++;
+#else
+
+#define OS_PKT_CLONE(_pAd, _pkt, _src, _flag) \
+ _src = skb_clone(RTPKT_TO_OSPKT(_pkt), _flag);
+#endif /* VENDOR_FEATURE2_SUPPORT */
+
+#define get_unaligned32 get_unaligned
+#define get_unalignedlong get_unaligned
+
+#define OS_NTOHS(_Val) \
+ (ntohs((_Val)))
+#define OS_HTONS(_Val) \
+ (htons((_Val)))
+#define OS_NTOHL(_Val) \
+ (ntohl((_Val)))
+#define OS_HTONL(_Val) \
+ (htonl((_Val)))
+
+#define CB_OFF 10
+
+#define GET_OS_PKT_CB(_p) (RTPKT_TO_OSPKT(_p)->cb)
+
+/* User Priority */
+#define RTMP_SET_PACKET_UP(_p, _prio) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+0] = _prio)
+#define RTMP_GET_PACKET_UP(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+0])
+
+/* Fragment # */
+#define RTMP_SET_PACKET_FRAGMENTS(_p, _num) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+1] = _num)
+#define RTMP_GET_PACKET_FRAGMENTS(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+1])
+
+/* 0x0 ~0x7f: TX to AP's own BSS which has the specified AID. if AID>127, set bit 7 in RTMP_SET_PACKET_EMACTAB too. */
+/*(this value also as MAC(on-chip WCID) table index) */
+/* 0x80~0xff: TX to a WDS link. b0~6: WDS index */
+#define RTMP_SET_PACKET_WCID(_p, _wdsidx) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+2] = _wdsidx)
+#define RTMP_GET_PACKET_WCID(_p) ((UCHAR)(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+2]))
+
+/* 0xff: PKTSRC_NDIS, others: local TX buffer index. This value affects how to a packet */
+#define RTMP_SET_PACKET_SOURCE(_p, _pktsrc) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+3] = _pktsrc)
+#define RTMP_GET_PACKET_SOURCE(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+3])
+
+/* RTS/CTS-to-self protection method */
+#define RTMP_SET_PACKET_RTS(_p, _num) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+4] = _num)
+#define RTMP_GET_PACKET_RTS(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+4])
+/* see RTMP_S(G)ET_PACKET_EMACTAB */
+
+/* TX rate index */
+#define RTMP_SET_PACKET_TXRATE(_p, _rate) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+5] = _rate)
+#define RTMP_GET_PACKET_TXRATE(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+5])
+
+/* From which Interface */
+#define RTMP_SET_PACKET_IF(_p, _ifdx) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+6] = _ifdx)
+#define RTMP_GET_PACKET_IF(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+6])
+#define RTMP_SET_PACKET_NET_DEVICE_MBSSID(_p, _bss) RTMP_SET_PACKET_IF((_p), (_bss))
+#define RTMP_SET_PACKET_NET_DEVICE_WDS(_p, _bss) RTMP_SET_PACKET_IF((_p), ((_bss) + MIN_NET_DEVICE_FOR_WDS))
+#define RTMP_SET_PACKET_NET_DEVICE_APCLI(_p, _idx) RTMP_SET_PACKET_IF((_p), ((_idx) + MIN_NET_DEVICE_FOR_APCLI))
+#define RTMP_SET_PACKET_NET_DEVICE_MESH(_p, _idx) RTMP_SET_PACKET_IF((_p), ((_idx) + MIN_NET_DEVICE_FOR_MESH))
+#define RTMP_SET_PACKET_NET_DEVICE_P2P(_p, _idx) RTMP_SET_PACKET_IF((_p), ((_idx) + MIN_NET_DEVICE_FOR_P2P_GO))
+#define RTMP_GET_PACKET_NET_DEVICE_MBSSID(_p) RTMP_GET_PACKET_IF((_p))
+#define RTMP_GET_PACKET_NET_DEVICE(_p) RTMP_GET_PACKET_IF((_p))
+
+#define RTMP_SET_PACKET_MOREDATA(_p, _morebit) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7] = _morebit)
+#define RTMP_GET_PACKET_MOREDATA(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7])
+
+
+
+#ifdef UAPSD_SUPPORT
+/* if we queue a U-APSD packet to any software queue, we will set the U-APSD
+ flag and its physical queue ID for it */
+#define RTMP_SET_PACKET_UAPSD(_p, _flg_uapsd, _que_id) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+9] = ((_flg_uapsd<<7) | _que_id))
+
+#define RTMP_SET_PACKET_QOS_NULL(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+9] = 0xff)
+#define RTMP_GET_PACKET_QOS_NULL(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+9])
+#define RTMP_SET_PACKET_NON_QOS_NULL(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+9] = 0x00)
+#define RTMP_GET_PACKET_UAPSD_Flag(_p) (((RTPKT_TO_OSPKT(_p)->cb[CB_OFF+9]) & 0x80) >> 7)
+#define RTMP_GET_PACKET_UAPSD_QUE_ID(_p) ((RTPKT_TO_OSPKT(_p)->cb[CB_OFF+9]) & 0x7f)
+
+#define RTMP_SET_PACKET_EOSP(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+10] = _flg)
+#define RTMP_GET_PACKET_EOSP(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+10])
+#endif /* UAPSD_SUPPORT */
+
+/* */
+/* Sepcific Pakcet Type definition */
+/* */
+#define RTMP_PACKET_SPECIFIC_CB_OFFSET 11
+
+#define RTMP_PACKET_SPECIFIC_DHCP 0x01
+#define RTMP_PACKET_SPECIFIC_EAPOL 0x02
+#define RTMP_PACKET_SPECIFIC_IPV4 0x04
+#define RTMP_PACKET_SPECIFIC_WAI 0x08
+#define RTMP_PACKET_SPECIFIC_VLAN 0x10
+#define RTMP_PACKET_SPECIFIC_LLCSNAP 0x20
+#define RTMP_PACKET_SPECIFIC_TDLS 0x40
+
+/*Specific */
+#define RTMP_SET_PACKET_SPECIFIC(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] = _flg)
+
+/*DHCP */
+#define RTMP_SET_PACKET_DHCP(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_DHCP); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_DHCP); \
+ }while(0)
+#define RTMP_GET_PACKET_DHCP(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_DHCP)
+
+/*EAPOL */
+#define RTMP_SET_PACKET_EAPOL(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_EAPOL); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_EAPOL); \
+ }while(0)
+#define RTMP_GET_PACKET_EAPOL(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_EAPOL)
+
+/*WAI */
+#define RTMP_SET_PACKET_WAI(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_WAI); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_WAI); \
+ }while(0)
+#define RTMP_GET_PACKET_WAI(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_WAI)
+
+#define RTMP_GET_PACKET_LOWRATE(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & (RTMP_PACKET_SPECIFIC_EAPOL | RTMP_PACKET_SPECIFIC_DHCP | RTMP_PACKET_SPECIFIC_WAI))
+
+/*VLAN */
+#define RTMP_SET_PACKET_VLAN(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_VLAN); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_VLAN); \
+ }while(0)
+#define RTMP_GET_PACKET_VLAN(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_VLAN)
+
+/*LLC/SNAP */
+#define RTMP_SET_PACKET_LLCSNAP(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_LLCSNAP); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_LLCSNAP); \
+ }while(0)
+
+#define RTMP_GET_PACKET_LLCSNAP(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_LLCSNAP)
+
+/* IP */
+#define RTMP_SET_PACKET_IPV4(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_IPV4); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_IPV4); \
+ }while(0)
+
+#define RTMP_GET_PACKET_IPV4(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_IPV4)
+
+// TDLS
+#define RTMP_SET_PACKET_TDLS(_p, _flg) \
+ do{ \
+ if (_flg) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) |= (RTMP_PACKET_SPECIFIC_TDLS); \
+ else \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11]) &= (~RTMP_PACKET_SPECIFIC_TDLS); \
+ }while(0)
+
+#define RTMP_GET_PACKET_TDLS(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_TDLS)
+
+/* If this flag is set, it indicates that this EAPoL frame MUST be clear. */
+#define RTMP_SET_PACKET_CLEAR_EAP_FRAME(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+12] = _flg)
+#define RTMP_GET_PACKET_CLEAR_EAP_FRAME(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+12])
+
+
+#ifdef DOT11_VHT_AC
+#define MAX_PACKETS_IN_QUEUE 1024 /*(512)*/
+#else
+#define MAX_PACKETS_IN_QUEUE (512)
+#endif /* DOT11_VHT_AC */
+
+
+/* use bit3 of cb[CB_OFF+16] */
+#define RTMP_SET_PACKET_MGMT_PKT(_p, _flg) \
+ RTPKT_TO_OSPKT(_p)->cb[CB_OFF+16] = (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+16] & 0xF7) | ((_flg & 0x01) << 3);
+#define RTMP_GET_PACKET_MGMT_PKT(_p) \
+ ((RTPKT_TO_OSPKT(_p)->cb[CB_OFF+16] & 0x08) >> 3)
+
+/* use bit0 of cb[CB_OFF+20] */
+#define RTMP_SET_PACKET_MGMT_PKT_DATA_QUE(_p, _flg) \
+ RTPKT_TO_OSPKT(_p)->cb[CB_OFF+20] = (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+20] & 0xFE) | (_flg & 0x01);
+#define RTMP_GET_PACKET_MGMT_PKT_DATA_QUE(_p) \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+20] & 0x01)
+
+#define RTMP_SET_PACKET_5VT(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+22] = _flg)
+#define RTMP_GET_PACKET_5VT(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+22])
+
+#define RTMP_SET_PACKET_PROTOCOL(_p, _protocol) {\
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+23] = (UINT8)((_protocol) & 0x00ff)); \
+ (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+24] = (UINT8)(((_protocol) & 0xff00) >> 8)); \
+}
+
+#define RTMP_GET_PACKET_PROTOCOL(_p) \
+ ((((UINT16)(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+24]) & 0x00ff) << 8) \
+ | ((UINT16)(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+23]) & 0x00ff))
+
+#ifdef INF_AMAZON_SE
+/* [CB_OFF+28], 1B, Iverson patch for WMM A5-T07 ,WirelessStaToWirelessSta do not bulk out aggregate */
+#define RTMP_SET_PACKET_NOBULKOUT(_p, _morebit) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+28] = _morebit)
+#define RTMP_GET_PACKET_NOBULKOUT(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+28])
+#endif /* INF_AMAZON_SE */
+
+
+
+#if defined(CONFIG_CSO_SUPPORT) || defined(CONFIG_RX_CSO_SUPPORT)
+#define RTMP_SET_TCP_CHKSUM_FAIL(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+30] = _flg);
+#define RTMP_GET_TCP_CHKSUM_FAIL(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+30])
+#endif /* defined(CONFIG_CSO_SUPPORT) || defined(CONFIG_RX_CSO_SUPPORT) */
+
+
+/* Max skb->cb = 48B = [CB_OFF+38] */
+
+
+
+/***********************************************************************************
+ * Other function prototypes definitions
+ ***********************************************************************************/
+void RTMP_GetCurrentSystemTime(LARGE_INTEGER *time);
+int rt28xx_packet_xmit(VOID *skb);
+
+
+#if LINUX_VERSION_CODE <= 0x20402 /* Red Hat 7.1 */
+struct net_device *alloc_netdev(int sizeof_priv, const char *mask, void (*setup)(struct net_device *));
+#endif /* LINUX_VERSION_CODE */
+
+
+
+INT rt28xx_ioctl(
+ IN PNET_DEV net_dev,
+ IN OUT struct ifreq *rq,
+ IN INT cmd);
+
+extern int ra_mtd_write(int num, loff_t to, size_t len, const u_char *buf);
+extern int ra_mtd_read(int num, loff_t from, size_t len, u_char *buf);
+
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
+#define _GET_PAD_FROM_NET_DEV(_pAd, _net_dev) (_pAd) = (_net_dev)->ml_priv;
+#else
+#define _GET_PAD_FROM_NET_DEV(_pAd, _net_dev) (_pAd) = (_net_dev)->priv;
+#endif
+
+#define GET_PAD_FROM_NET_DEV(_pAd, _net_dev) \
+ _pAd = RTMP_OS_NETDEV_GET_PRIV(_net_dev);
+
+/*#ifdef RTMP_USB_SUPPORT */
+/******************************************************************************
+
+ USB related definitions
+
+******************************************************************************/
+
+#define RTMP_USB_PKT_COPY(__pNetDev, __pNetPkt, __Len, __pData) \
+{ \
+ memcpy(skb_put(__pNetPkt, __Len), __pData, __Len); \
+ GET_OS_PKT_NETDEV(__pNetPkt) = __pNetDev; \
+ RTMP_SET_PACKET_SOURCE(OSPKT_TO_RTPKT(__pNetPkt), PKTSRC_NDIS); \
+}
+
+typedef struct usb_device_id USB_DEVICE_ID;
+
+#ifdef INF_AMAZON_SE
+#define BULKAGGRE_SIZE 30
+#else
+#define BULKAGGRE_SIZE 60 /* 100 */
+#endif /* INF_AMAZON_SE */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+
+#ifndef OS_ABL_SUPPORT
+/*#define RT28XX_PUT_DEVICE usb_put_dev */
+#define RTUSB_ALLOC_URB(iso) usb_alloc_urb(iso, GFP_ATOMIC)
+#define RTUSB_SUBMIT_URB(pUrb) usb_submit_urb(pUrb, GFP_ATOMIC)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
+#define RTUSB_URB_ALLOC_BUFFER(_dev, _size, _dma) usb_alloc_coherent(_dev, _size, GFP_ATOMIC, _dma)
+#define RTUSB_URB_FREE_BUFFER(_dev, _size, _addr, _dma) usb_free_coherent(_dev, _size, _addr, _dma)
+#else
+#define RTUSB_URB_ALLOC_BUFFER(_dev, _size, _dma) usb_buffer_alloc(_dev, _size, GFP_ATOMIC, _dma)
+#define RTUSB_URB_FREE_BUFFER(_dev, _size, _addr, _dma) usb_buffer_free(_dev, _size, _addr, _dma)
+#endif
+#else
+#define RTUSB_URB_ALLOC_BUFFER(_dev, _size, _dma) kmalloc(_size, GFP_ATOMIC)
+#define RTUSB_URB_FREE_BUFFER(_dev, _size, _addr, _dma) kfree(_addr)
+#endif
+
+#else
+
+/*#define RT28XX_PUT_DEVICE rausb_put_dev */
+#define RTUSB_ALLOC_URB(iso) rausb_alloc_urb(iso)
+#define RTUSB_SUBMIT_URB(pUrb) rausb_submit_urb(pUrb)
+#define RTUSB_URB_ALLOC_BUFFER rausb_buffer_alloc
+#define RTUSB_URB_FREE_BUFFER rausb_buffer_free
+#endif /* OS_ABL_SUPPORT */
+
+#else
+
+#define RT28XX_PUT_DEVICE(dev_p)
+
+#ifndef OS_ABL_SUPPORT
+#define RTUSB_ALLOC_URB(iso) usb_alloc_urb(iso)
+#define RTUSB_SUBMIT_URB(pUrb) usb_submit_urb(pUrb)
+#else
+#define RTUSB_ALLOC_URB(iso) rausb_alloc_urb(iso)
+#define RTUSB_SUBMIT_URB(pUrb) rausb_submit_urb(pUrb)
+#endif /* OS_ABL_SUPPORT */
+
+#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) kmalloc(BufSize, GFP_ATOMIC)
+#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) kfree(pTransferBuf)
+#endif
+
+#ifndef OS_ABL_SUPPORT
+#define RTUSB_FREE_URB(pUrb) usb_free_urb(pUrb)
+#else
+#define RTUSB_FREE_URB(pUrb) rausb_free_urb(pUrb)
+#endif /* OS_ABL_SUPPORT */
+
+/* unlink urb */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+
+#ifndef OS_ABL_SUPPORT
+#define RTUSB_UNLINK_URB(pUrb) usb_kill_urb(pUrb)
+#else
+#define RTUSB_UNLINK_URB(pUrb) rausb_kill_urb(pUrb)
+#endif /* OS_ABL_SUPPORT */
+
+#else
+#define RTUSB_UNLINK_URB(pUrb) usb_unlink_urb(pUrb)
+#endif /* LINUX_VERSION_CODE */
+
+/* Prototypes of completion funuc. */
+#define RtmpUsbBulkOutDataPacketComplete RTUSBBulkOutDataPacketComplete
+#define RtmpUsbBulkOutMLMEPacketComplete RTUSBBulkOutMLMEPacketComplete
+#define RtmpUsbBulkOutNullFrameComplete RTUSBBulkOutNullFrameComplete
+#ifdef CONFIG_MULTI_CHANNEL
+#define RtmpUsbBulkOutHCCANullFrameComplete RTUSBBulkOutHCCANullFrameComplete
+#endif /* CONFIG_MULTI_CHANNEL */
+#define RtmpUsbBulkOutRTSFrameComplete RTUSBBulkOutRTSFrameComplete
+#define RtmpUsbBulkOutPsPollComplete RTUSBBulkOutPsPollComplete
+#define RtmpUsbBulkRxComplete RTUSBBulkRxComplete
+#define RTUSBBulkCmdRspEventComplete(Status, pURB, pt_regs) RTUSBBulkCmdRspEventComplete(pURB)
+
+#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 51)) || (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)))
+#define RTUSBBulkOutDataPacketComplete(Status, pURB, pt_regs) RTUSBBulkOutDataPacketComplete(pURB)
+#define RTUSBBulkOutMLMEPacketComplete(Status, pURB, pt_regs) RTUSBBulkOutMLMEPacketComplete(pURB)
+#define RTUSBBulkOutNullFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutNullFrameComplete(pURB)
+#ifdef CONFIG_MULTI_CHANNEL
+#define RTUSBBulkOutHCCANullFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutHCCANullFrameComplete(pURB)
+#endif /* CONFIG_MULTI_CHANNEL */
+#define RTUSBBulkOutRTSFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutRTSFrameComplete(pURB)
+#define RTUSBBulkOutPsPollComplete(Status, pURB, pt_regs) RTUSBBulkOutPsPollComplete(pURB)
+#define RTUSBBulkRxComplete(Status, pURB, pt_regs) RTUSBBulkRxComplete(pURB)
+#define RTUSBBulkCmdRspEventComplete(Status, pURB, pt_regs) RTUSBBulkCmdRspEventComplete(pURB)
+#define USBUploadFWComplete(Status, pURB, pt_regs) USBUploadFWComplete(pURB)
+#define USBKickOutCmdComplete(Status, pURB, pt_regs) USBKickOutCmdComplete(pURB)
+#else
+#define RTUSBBulkOutDataPacketComplete(Status, pURB, pt_regs) RTUSBBulkOutDataPacketComplete(pURB, pt_regs)
+#define RTUSBBulkOutMLMEPacketComplete(Status, pURB, pt_regs) RTUSBBulkOutMLMEPacketComplete(pURB, pt_regs)
+#define RTUSBBulkOutNullFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutNullFrameComplete(pURB, pt_regs)
+#ifdef CONFIG_MULTI_CHANNEL
+#define RTUSBBulkOutHCCANullFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutHCCANullFrameComplete(pURB, pt_regs)
+#endif /* CONFIG_MULTI_CHANNEL */
+#define RTUSBBulkOutRTSFrameComplete(Status, pURB, pt_regs) RTUSBBulkOutRTSFrameComplete(pURB, pt_regs)
+#define RTUSBBulkOutPsPollComplete(Status, pURB, pt_regs) RTUSBBulkOutPsPollComplete(pURB, pt_regs)
+#define RTUSBBulkRxComplete(Status, pURB, pt_regs) RTUSBBulkRxComplete(pURB, pt_regs)
+#define RTUSBBulkCmdRspEventComplete(Status, pURB, pt_regs) RTUSBBulkCmdRspEventComplete(pURB, pt_regs)
+#define USBUploadFWComplete(Status, pURB, pt_regs) USBUploadFWComplete(pURB, pt_regs)
+#define USBKickOutCmdComplete(Status, pURB, pt_regs) USBKickOutCmdComplete(pURB, pt_regs)
+#endif /* */
+
+/*extern void dump_urb(struct urb *purb); */
+
+#define InterlockedIncrement atomic_inc
+#define NdisInterlockedIncrement atomic_inc
+#define InterlockedDecrement atomic_dec
+#define NdisInterlockedDecrement atomic_dec
+#define InterlockedExchange atomic_set
+
+typedef void USBHST_STATUS;
+typedef INT32 URBCompleteStatus;
+typedef struct pt_regs pregs;
+
+USBHST_STATUS RTUSBBulkOutDataPacketComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutMLMEPacketComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutNullFrameComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+#ifdef CONFIG_MULTI_CHANNEL
+USBHST_STATUS RTUSBBulkOutHCCANullFrameComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+#endif /* CONFIG_MULTI_CHANNEL */
+USBHST_STATUS RTUSBBulkOutRTSFrameComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkOutPsPollComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkRxComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS RTUSBBulkCmdRspEventComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS USBUploadFWComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+USBHST_STATUS USBKickOutCmdComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+
+
+/* Fill Bulk URB Macro */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define RTUSB_FILL_TX_BULK_URB(pUrb, \
+ pUsb_Dev, \
+ uEndpointAddress, \
+ pTransferBuf, \
+ BufSize, \
+ Complete, \
+ pContext, \
+ TransferDma) \
+ do{ \
+ usb_fill_bulk_urb(pUrb, pUsb_Dev, usb_sndbulkpipe(pUsb_Dev, uEndpointAddress), \
+ pTransferBuf, BufSize, Complete, pContext); \
+ pUrb->transfer_dma = TransferDma; \
+ pUrb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; \
+ }while(0)
+#else
+#define RTUSB_FILL_TX_BULK_URB(pUrb, \
+ pUsb_Dev, \
+ uEndpointAddress, \
+ pTransferBuf, \
+ BufSize, \
+ Complete, \
+ pContext, \
+ TransferDma) \
+ do{ \
+ FILL_BULK_URB(pUrb, pUsb_Dev, usb_sndbulkpipe(pUsb_Dev, uEndpointAddress), \
+ pTransferBuf, BufSize, Complete, pContext); \
+ }while(0)
+
+#endif
+
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define RTUSB_FILL_HTTX_BULK_URB(pUrb, \
+ pUsb_Dev, \
+ uEndpointAddress, \
+ pTransferBuf, \
+ BufSize, \
+ Complete, \
+ pContext, \
+ TransferDma) \
+ do{ \
+ usb_fill_bulk_urb(pUrb, pUsb_Dev, usb_sndbulkpipe(pUsb_Dev, uEndpointAddress), \
+ pTransferBuf, BufSize, Complete, pContext); \
+ pUrb->transfer_dma = TransferDma; \
+ pUrb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; \
+ }while(0)
+#else
+#define RTUSB_FILL_HTTX_BULK_URB(pUrb, \
+ pUsb_Dev, \
+ uEndpointAddress, \
+ pTransferBuf, \
+ BufSize, \
+ Complete, \
+ pContext, \
+ TransferDma) \
+ do{ \
+ FILL_BULK_URB(pUrb, pUsb_Dev, usb_sndbulkpipe(pUsb_Dev, uEndpointAddress), \
+ pTransferBuf, BufSize, Complete, pContext); \
+ }while(0)
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define RTUSB_FILL_RX_BULK_URB(pUrb, \
+ pUsb_Dev, \
+ uEndpointAddress, \
+ pTransferBuf, \
+ BufSize, \
+ Complete, \
+ pContext, \
+ TransferDma) \
+ do{ \
+ usb_fill_bulk_urb(pUrb, pUsb_Dev, usb_rcvbulkpipe(pUsb_Dev, uEndpointAddress), \
+ pTransferBuf, BufSize, Complete, pContext); \
+ pUrb->transfer_dma = TransferDma; \
+ pUrb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; \
+ }while(0)
+/* pRxContext->data_dma + pAd->NextRxBulkInPosition; */
+#else
+#define RTUSB_FILL_RX_BULK_URB(pUrb, \
+ pUsb_Dev, \
+ uEndpointAddress, \
+ pTransferBuf, \
+ BufSize, \
+ Complete, \
+ pContext, \
+ TransferDma) \
+ do{ \
+ FILL_BULK_URB(pUrb, pUsb_Dev, usb_rcvbulkpipe(pUsb_Dev, uEndpointAddress), \
+ pTransferBuf, BufSize, Complete, pContext); \
+ }while(0)
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define RTUSB_URB_DMA_MAPPING(pUrb) \
+ { \
+ pUrb->transfer_dma = 0; \
+ pUrb->transfer_flags &= (~URB_NO_TRANSFER_DMA_MAP); \
+ }
+#else
+#define RTUSB_URB_DMA_MAPPING(pUrb)
+#endif
+
+#define RTUSB_CONTROL_MSG(pUsb_Dev, uEndpointAddress, Request, RequestType, Value,Index, tmpBuf, TransferBufferLength, timeout, ret) \
+ do{ \
+ if (RequestType == DEVICE_VENDOR_REQUEST_OUT) \
+ ret = USB_CONTROL_MSG(pUsb_Dev, usb_sndctrlpipe(pUsb_Dev, uEndpointAddress), Request, RequestType, Value, Index, tmpBuf, TransferBufferLength, timeout); \
+ else if (RequestType == DEVICE_VENDOR_REQUEST_IN) \
+ ret = USB_CONTROL_MSG(pUsb_Dev, usb_rcvctrlpipe(pUsb_Dev, uEndpointAddress), Request, RequestType, Value, Index, tmpBuf, TransferBufferLength, timeout); \
+ else \
+ { \
+ DBGPRINT(RT_DEBUG_ERROR, ("vendor request direction is failed\n")); \
+ ret = -1; \
+ } \
+ }while(0)
+
+#define rtusb_urb_context context
+#define rtusb_urb_status status
+
+#define RTMP_OS_USB_CONTEXT_GET(__pURB) __pURB->rtusb_urb_context
+#define RTMP_OS_USB_STATUS_GET(__pURB) __pURB->rtusb_urb_status
+
+#ifndef OS_ABL_SUPPORT
+#define USB_CONTROL_MSG usb_control_msg
+
+#else
+
+#define USB_CONTROL_MSG rausb_control_msg
+
+/*extern int rausb_register(struct usb_driver * new_driver); */
+/*extern void rausb_deregister(struct usb_driver * driver); */
+
+extern struct urb *rausb_alloc_urb(int iso_packets);
+extern void rausb_free_urb(VOID *urb);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+extern void rausb_put_dev(VOID *dev);
+extern struct usb_device *rausb_get_dev(VOID *dev);
+#endif /* LINUX_VERSION_CODE */
+
+extern int rausb_submit_urb(VOID *urb);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#ifndef gfp_t
+#define gfp_t INT32
+#endif /* gfp_t */
+
+extern void *rausb_buffer_alloc(VOID *dev,
+ size_t size,
+ ra_dma_addr_t *dma);
+extern void rausb_buffer_free(VOID *dev,
+ size_t size,
+ void *addr,
+ ra_dma_addr_t dma);
+#endif /* LINUX_VERSION_CODE */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+extern void rausb_kill_urb(VOID *urb);
+#endif /* LINUX_VERSION_CODE */
+
+extern int rausb_control_msg(VOID *dev,
+ unsigned int pipe,
+ __u8 request,
+ __u8 requesttype,
+ __u16 value,
+ __u16 index,
+ void *data,
+ __u16 size,
+ int timeout);
+
+#endif /* OS_ABL_SUPPORT */
+
+/*#endif // RTMP_USB_SUPPORT */
+
+#ifdef RALINK_ATE
+/******************************************************************************
+
+ ATE related definitions
+
+******************************************************************************/
+#define ate_print printk
+#define ATEDBGPRINT DBGPRINT
+
+#ifdef RTMP_MAC_USB
+#ifdef CONFIG_AP_SUPPORT
+#define EEPROM_BIN_FILE_NAME "/etc/Wireless/RT2870AP/e2p.bin"
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* RTMP_MAC_USB */
+
+#ifdef RTMP_USB_SUPPORT
+
+#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 51)) || (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)))
+/* Prototypes of completion funuc. */
+#define ATE_RTUSBBulkOutDataPacketComplete(Status, pURB, pt_regs) ATE_RTUSBBulkOutDataPacketComplete(pURB)
+#else
+#define ATE_RTUSBBulkOutDataPacketComplete(Status, pURB, pt_regs) ATE_RTUSBBulkOutDataPacketComplete(pURB, pt_regs)
+#endif /* LINUX_VERSION_CODE */
+
+USBHST_STATUS ATE_RTUSBBulkOutDataPacketComplete(URBCompleteStatus Status, purbb_t pURB, pregs *pt_regs);
+
+#endif /* RTMP_USB_SUPPORT */
+
+#endif /* RALINK_ATE */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+INT RtmpOSNetDevOpsAlloc(
+ IN PVOID *pNetDevOps);
+#endif
+
+#define RTMP_OS_MAX_SCAN_DATA_GET() IW_SCAN_MAX_DATA
+
+#include "os/rt_os.h"
+
+#endif /* __RT_LINUX_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/os/rt_linux_cmm.h b/cleopatre/devkit/mt7601udrv/include/os/rt_linux_cmm.h
new file mode 100644
index 0000000000..6d0d0cc38b
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/os/rt_linux_cmm.h
@@ -0,0 +1,412 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt_linux_cmm.h
+
+ Abstract:
+ Common OS structure/definition in LINUX whatever OS ABL.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+
+#ifndef __RT_LINUX_CMM_H__
+#define __RT_LINUX_CMM_H__
+
+
+typedef struct _OS_RSTRUC {
+ UCHAR *pContent; /* pointer to real structure content */
+} OS_RSTRUC;
+
+
+/* declare new chipset function here */
+#ifdef OS_ABL_FUNC_SUPPORT
+
+#define RTMP_DECLARE_DRV_OPS_FUNCTION(_func) \
+ void Rtmp_Drv_Ops_##_func(VOID *__pDrvOps, VOID *__pNetOps, \
+ VOID *__pPciConfig, VOID *__pUsbConfig)
+
+#define RTMP_BUILD_DRV_OPS_FUNCTION(_func) \
+void Rtmp_Drv_Ops_##_func(VOID *__pDrvOps, VOID *__pNetOps, \
+ VOID *__pPciConfig, VOID *__pUsbConfig) \
+{ \
+ RtmpDrvOpsInit(__pDrvOps, __pNetOps, __pPciConfig, __pUsbConfig);\
+}
+
+#define RTMP_GET_DRV_OPS_FUNCTION(_func) \
+ (PVOID)Rtmp_Drv_Ops_##_func
+
+#define RTMP_DRV_OPS_FUNCTION_BODY(_func) \
+ Rtmp_Drv_Ops_##_func
+
+
+#define xdef_to_str(s) def_to_str(s)
+#define def_to_str(s) #s
+
+
+#ifdef RTMP_MAC_USB
+#define RTMP_DRV_NAME "rtusb" xdef_to_str(RT28xx_MODE)
+RTMP_DECLARE_DRV_OPS_FUNCTION(usb);
+#define RTMP_DRV_OPS_FUNCTION RTMP_DRV_OPS_FUNCTION_BODY(usb)
+#define RTMP_BUILD_DRV_OPS_FUNCTION_BODY RTMP_BUILD_DRV_OPS_FUNCTION(usb)
+#endif /* RTMP_MAC_USB */
+
+#else
+
+#ifdef RTMP_MAC_USB
+#define RTMP_DRV_NAME "rt2870"
+#else
+#define RTMP_DRV_NAME "rt2860"
+#endif /* RTMP_MAC_USB */
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+
+/*****************************************************************************
+ * OS task related data structure and definitions
+ ******************************************************************************/
+#define RTMP_OS_TASK_INIT(__pTask, __pTaskName, __pAd) \
+ RtmpOSTaskInit(__pTask, __pTaskName, __pAd, &(__pAd)->RscTaskMemList, &(__pAd)->RscSemMemList);
+
+#ifndef OS_ABL_FUNC_SUPPORT
+
+/* rt_linux.h */
+#define RTMP_OS_TASK OS_TASK
+
+#define RTMP_OS_TASK_GET(__pTask) \
+ (__pTask)
+
+#define RTMP_OS_TASK_DATA_GET(__pTask) \
+ ((__pTask)->priv)
+
+#define RTMP_OS_TASK_IS_KILLED(__pTask) \
+ ((__pTask)->task_killed)
+
+#ifdef KTHREAD_SUPPORT
+#define RTMP_OS_TASK_WAKE_UP(__pTask) \
+ WAKE_UP(pTask);
+#else
+#define RTMP_OS_TASK_WAKE_UP(__pTask) \
+ RTMP_SEM_EVENT_UP(&(pTask)->taskSema);
+#endif /* KTHREAD_SUPPORT */
+
+#ifdef KTHREAD_SUPPORT
+#define RTMP_OS_TASK_LEGALITY(__pTask) \
+ if ((__pTask)->kthread_task != NULL)
+#else
+#define RTMP_OS_TASK_LEGALITY(__pTask) \
+ CHECK_PID_LEGALITY((__pTask)->taskPID)
+#endif /* KTHREAD_SUPPORT */
+
+#else
+
+/* rt_linux_cmm.h */
+#define RTMP_OS_TASK OS_RSTRUC
+
+#define RTMP_OS_TASK_GET(__pTask) \
+ ((OS_TASK *)((__pTask)->pContent))
+
+#define RTMP_OS_TASK_DATA_GET(__pTask) \
+ RtmpOsTaskDataGet(__pTask)
+
+#define RTMP_OS_TASK_IS_KILLED(__pTask) \
+ RtmpOsTaskIsKilled(__pTask)
+
+#define RTMP_OS_TASK_WAKE_UP(__pTask) \
+ RtmpOsTaskWakeUp(pTask)
+
+#define RTMP_OS_TASK_LEGALITY(__pTask) \
+ if (RtmpOsCheckTaskLegality(__pTask))
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+
+/*****************************************************************************
+ * Timer related definitions and data structures.
+ ******************************************************************************/
+#ifndef OS_ABL_FUNC_SUPPORT
+
+/* rt_linux.h */
+#define NDIS_MINIPORT_TIMER OS_NDIS_MINIPORT_TIMER
+#define RTMP_OS_TIMER OS_TIMER
+
+#define RTMP_OS_FREE_TIMER(__pAd)
+#define RTMP_OS_FREE_LOCK(__pAd)
+#define RTMP_OS_FREE_TASKLET(__pAd)
+#define RTMP_OS_FREE_TASK(__pAd)
+#define RTMP_OS_FREE_SEM(__pAd)
+#define RTMP_OS_FREE_ATOMIC(__pAd)
+
+#else
+
+/* rt_linux_cmm.h */
+#define NDIS_MINIPORT_TIMER OS_RSTRUC
+#define RTMP_OS_TIMER OS_RSTRUC
+
+#define RTMP_OS_FREE_TIMER(__pAd)
+#define RTMP_OS_FREE_LOCK(__pAd)
+#define RTMP_OS_FREE_TASKLET(__pAd)
+#define RTMP_OS_FREE_TASK(__pAd)
+#define RTMP_OS_FREE_SEM(__pAd)
+#define RTMP_OS_FREE_ATOMIC(__pAd)
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+
+/*****************************************************************************
+ * OS file operation related data structure definitions
+ ******************************************************************************/
+/* if you add any new type, please also modify RtmpOSFileOpen() */
+#define RTMP_FILE_RDONLY 0x0F01
+#define RTMP_FILE_WRONLY 0x0F02
+#define RTMP_FILE_CREAT 0x0F03
+#define RTMP_FILE_TRUNC 0x0F04
+
+#ifndef OS_ABL_FUNC_SUPPORT
+
+/* rt_linux.h */
+#define RTMP_OS_FS_INFO OS_FS_INFO
+
+#else
+
+/* rt_linux_cmm.h */
+#define RTMP_OS_FS_INFO OS_RSTRUC
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+
+/*****************************************************************************
+ * OS semaphore related data structure and definitions
+ ******************************************************************************/
+
+#ifndef OS_ABL_FUNC_SUPPORT
+
+#define NDIS_SPIN_LOCK OS_NDIS_SPIN_LOCK
+#define NdisAllocateSpinLock(__pReserved, __pLock) OS_NdisAllocateSpinLock(__pLock)
+#define NdisFreeSpinLock OS_NdisFreeSpinLock
+#define RTMP_SEM_LOCK OS_SEM_LOCK
+#define RTMP_SEM_UNLOCK OS_SEM_UNLOCK
+#define RTMP_IRQ_LOCK OS_IRQ_LOCK
+#define RTMP_IRQ_UNLOCK OS_IRQ_UNLOCK
+#define RTMP_INT_LOCK OS_INT_LOCK
+#define RTMP_INT_UNLOCK OS_INT_UNLOCK
+#define RTMP_OS_SEM OS_SEM
+#define RTMP_OS_ATOMIC atomic_t
+
+#define NdisAcquireSpinLock RTMP_SEM_LOCK
+#define NdisReleaseSpinLock RTMP_SEM_UNLOCK
+
+#define RTMP_SEM_EVENT_INIT_LOCKED(__pSema, __pSemaList) OS_SEM_EVENT_INIT_LOCKED(__pSema)
+#define RTMP_SEM_EVENT_INIT(__pSema, __pSemaList) OS_SEM_EVENT_INIT(__pSema)
+#define RTMP_SEM_EVENT_DESTORY OS_SEM_EVENT_DESTORY
+#define RTMP_SEM_EVENT_WAIT OS_SEM_EVENT_WAIT
+#define RTMP_SEM_EVENT_UP OS_SEM_EVENT_UP
+
+#define RTUSBMlmeUp OS_RTUSBMlmeUp
+
+#define RTMP_OS_ATMOIC_INIT(__pAtomic, __pAtomicList)
+#define RTMP_OS_ATMOIC_DESTROY(__pAtomic)
+#define RTMP_THREAD_PID_KILL(__PID) KILL_THREAD_PID(__PID, SIGTERM, 1)
+
+#else
+
+#define NDIS_SPIN_LOCK OS_RSTRUC
+#define RTMP_OS_SEM OS_RSTRUC
+#define RTMP_OS_ATOMIC OS_RSTRUC
+
+#define RTMP_SEM_EVENT_INIT_LOCKED RtmpOsSemaInitLocked
+#define RTMP_SEM_EVENT_INIT RtmpOsSemaInit
+#define RTMP_SEM_EVENT_DESTORY RtmpOsSemaDestory
+#define RTMP_SEM_EVENT_WAIT(_pSema, _status) ((_status) = RtmpOsSemaWaitInterruptible((_pSema)))
+#define RTMP_SEM_EVENT_UP RtmpOsSemaWakeUp
+
+#define RTUSBMlmeUp RtmpOsMlmeUp
+
+#define RTMP_OS_ATMOIC_INIT RtmpOsAtomicInit
+#define RTMP_OS_ATMOIC_DESTROY RtmpOsAtomicDestroy
+#define RTMP_THREAD_PID_KILL RtmpThreadPidKill
+
+/* */
+/* spin_lock enhanced for Nested spin lock */
+/* */
+#define NdisAllocateSpinLock(__pAd, __pLock) RtmpOsAllocateLock(__pLock, &(__pAd)->RscLockMemList)
+#define NdisFreeSpinLock RtmpOsFreeSpinLock
+
+#define RTMP_SEM_LOCK(__lock) \
+{ \
+ RtmpOsSpinLockBh(__lock); \
+}
+
+#define RTMP_SEM_UNLOCK(__lock) \
+{ \
+ RtmpOsSpinUnLockBh(__lock); \
+}
+
+/* sample, use semaphore lock to replace IRQ lock, 2007/11/15 */
+#ifdef MULTI_CORE_SUPPORT
+
+#define RTMP_IRQ_LOCK(__lock, __irqflags) \
+{ \
+ __irqflags = 0; \
+ spin_lock_irqsave((spinlock_t *)(__lock), __irqflags); \
+}
+
+#define RTMP_IRQ_UNLOCK(__lock, __irqflag) \
+{ \
+ spin_unlock_irqrestore((spinlock_t *)(__lock), __irqflag); \
+}
+#else
+#define RTMP_IRQ_LOCK(__lock, __irqflags) \
+{ \
+ __irqflags = 0; \
+ RtmpOsSpinLockBh(__lock); \
+}
+
+#define RTMP_IRQ_UNLOCK(__lock, __irqflag) \
+{ \
+ RtmpOsSpinUnLockBh(__lock); \
+}
+#endif // MULTI_CORE_SUPPORT //
+#define RTMP_INT_LOCK(__Lock, __Flag) RtmpOsIntLock(__Lock, &__Flag)
+#define RTMP_INT_UNLOCK RtmpOsIntUnLock
+
+#define NdisAcquireSpinLock RTMP_SEM_LOCK
+#define NdisReleaseSpinLock RTMP_SEM_UNLOCK
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+
+/*****************************************************************************
+ * OS task related data structure and definitions
+ ******************************************************************************/
+
+#ifndef OS_ABL_FUNC_SUPPORT
+
+/* rt_linux.h */
+#define RTMP_NET_TASK_STRUCT OS_NET_TASK_STRUCT
+#define PRTMP_NET_TASK_STRUCT POS_NET_TASK_STRUCT
+
+#ifdef WORKQUEUE_BH
+#define RTMP_OS_TASKLET_SCHE(__pTasklet) \
+ schedule_work(__pTasklet)
+#define RTMP_OS_TASKLET_INIT(__pAd, __pTasklet, __pFunc, __Data) \
+ INIT_WORK((struct work_struct *)__pTasklet, (work_func_t)__pFunc)
+#define RTMP_OS_TASKLET_KILL(__pTasklet)
+#else
+#define RTMP_OS_TASKLET_SCHE(__pTasklet) \
+ tasklet_hi_schedule(__pTasklet)
+#define RTMP_OS_TASKLET_INIT(__pAd, __pTasklet, __pFunc, __Data) \
+ tasklet_init(__pTasklet, __pFunc, __Data)
+#define RTMP_OS_TASKLET_KILL(__pTasklet) \
+ tasklet_kill(__pTasklet)
+#endif /* WORKQUEUE_BH */
+
+#define RTMP_NET_TASK_DATA_ASSIGN(__Tasklet, __Data) \
+ (__Tasklet)->data = (unsigned long)__Data
+
+#else
+
+/* rt_linux_cmm.h */
+typedef OS_RSTRUC RTMP_NET_TASK_STRUCT;
+typedef OS_RSTRUC *PRTMP_NET_TASK_STRUCT;
+
+#define RTMP_OS_TASKLET_SCHE(__pTasklet) \
+ RtmpOsTaskletSche(__pTasklet)
+
+#define RTMP_OS_TASKLET_INIT(__pAd, __pTasklet, __pFunc, __Data) \
+ RtmpOsTaskletInit(__pTasklet, __pFunc, __Data, &(__pAd)->RscTaskletMemList)
+
+#define RTMP_OS_TASKLET_KILL(__pTasklet) \
+ RtmpOsTaskletKill(__pTasklet)
+
+#define RTMP_NET_TASK_DATA_ASSIGN(__pTasklet, __Data) \
+ RtmpOsTaskletDataAssign(__pTasklet, __Data)
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+
+
+
+/*****************************************************************************
+ * OS definition related data structure and definitions
+ ******************************************************************************/
+
+#ifdef OS_ABL_SUPPORT
+
+#define RTMP_USB_CONTROL_MSG_ENODEV -1
+#define RTMP_USB_CONTROL_MSG_FAIL -2
+
+typedef struct __RTMP_PCI_CONFIG {
+
+ UINT32 ConfigVendorID;
+} RTMP_PCI_CONFIG;
+
+typedef struct __RTMP_USB_CONFIG {
+
+ UINT32 Reserved;
+} RTMP_USB_CONFIG;
+
+extern RTMP_PCI_CONFIG *pRtmpPciConfig;
+extern RTMP_USB_CONFIG *pRtmpUsbConfig;
+
+#define RTMP_OS_PCI_VENDOR_ID pRtmpPciConfig->ConfigVendorID
+
+/*
+ Declare dma_addr_t here, can not define it in rt_drv.h
+
+ If you define it in include/os/rt_drv.h, then the size in DRIVER module
+ will be 64-bit, but in UTIL/NET modules, it maybe 32-bit.
+ This will cause size mismatch problem when OS_ABL = yes.
+*/
+/*
+ In big-endian & 32-bit DMA address platform, if you use long long to
+ record DMA address, when you call kernel function to set DMA address,
+ the address will be 0 because you need to do swap I think.
+ So if you sure your DMA address is 32-bit, do not use RTMP_DMA_ADDR_64.
+*/
+#define ra_dma_addr_t unsigned long long
+
+#else
+
+#ifdef RTMP_USB_SUPPORT
+#define RTMP_USB_CONTROL_MSG_ENODEV (-ENODEV)
+#define RTMP_USB_CONTROL_MSG_FAIL (-EFAULT)
+#endif /* RTMP_USB_SUPPORT */
+
+#define RTMP_OS_PCI_VENDOR_ID PCI_VENDOR_ID
+
+#define ra_dma_addr_t dma_addr_t
+
+#endif /* OS_ABL_SUPPORT */
+
+#define PCI_MAP_SINGLE RtmpDrvPciMapSingle
+
+
+/***********************************************************************************
+ * Others
+ ***********************************************************************************/
+#define APCLI_IF_UP_CHECK(pAd, ifidx) (RtmpOSNetDevIsUp((pAd)->ApCfg.ApCliTab[(ifidx)].dev) == TRUE)
+
+
+#define RTMP_OS_NETDEV_SET_PRIV RtmpOsSetNetDevPriv
+#define RTMP_OS_NETDEV_GET_PRIV RtmpOsGetNetDevPriv
+#define RT_DEV_PRIV_FLAGS_GET RtmpDevPrivFlagsGet
+#define RT_DEV_PRIV_FLAGS_SET RtmpDevPrivFlagsSet
+
+#endif /* __RT_LINUX_CMM_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/os/rt_os.h b/cleopatre/devkit/mt7601udrv/include/os/rt_os.h
new file mode 100644
index 0000000000..3f3b8fc741
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/os/rt_os.h
@@ -0,0 +1,83 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rt_os.h
+
+ Abstract:
+ Put all OS related definition/structure/MACRO here.
+
+ Note:
+ Used in UTIL/NETIF module.
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+*/
+
+#ifndef _RT_OS_H_
+#define _RT_OS_H_
+
+
+#ifdef LINUX
+#if WIRELESS_EXT <= 11
+#ifndef SIOCDEVPRIVATE
+#define SIOCDEVPRIVATE 0x8BE0
+#endif
+#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
+#endif
+#endif /* LINUX */
+
+
+
+#ifdef CONFIG_AP_SUPPORT
+/* Ralink defined OIDs */
+#define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x01)
+#define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
+#define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x0E) /* Sync. with RT61 (for wpa_supplicant) */
+#ifdef DBG
+#define RTPRIV_IOCTL_BBP (SIOCIWFIRSTPRIV + 0x03)
+#define RTPRIV_IOCTL_MAC (SIOCIWFIRSTPRIV + 0x05)
+
+#define RTPRIV_IOCTL_RF (SIOCIWFIRSTPRIV + 0x13)
+
+#endif /* DBG */
+#define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
+
+#define RTPRIV_IOCTL_ATE (SIOCIWFIRSTPRIV + 0x08)
+
+#define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
+#define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
+#define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
+#define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D)
+#define RTPRIV_IOCTL_ADD_WPA_KEY (SIOCIWFIRSTPRIV + 0x0E)
+#define RTPRIV_IOCTL_GET_MAC_TABLE (SIOCIWFIRSTPRIV + 0x0F)
+#define RTPRIV_IOCTL_GET_MAC_TABLE_STRUCT (SIOCIWFIRSTPRIV + 0x1F) /* modified by Red@Ralink, 2009/09/30 */
+#define RTPRIV_IOCTL_STATIC_WEP_COPY (SIOCIWFIRSTPRIV + 0x10)
+
+#define RTPRIV_IOCTL_SHOW (SIOCIWFIRSTPRIV + 0x11)
+#define RTPRIV_IOCTL_WSC_PROFILE (SIOCIWFIRSTPRIV + 0x12)
+#define RTPRIV_IOCTL_QUERY_BATABLE (SIOCIWFIRSTPRIV + 0x16)
+#ifdef INF_AR9
+#define RTPRIV_IOCTL_GET_AR9_SHOW (SIOCIWFIRSTPRIV + 0x17)
+#endif/* INF_AR9 */
+#define RTPRIV_IOCTL_SET_WSCOOB (SIOCIWFIRSTPRIV + 0x19)
+#define RTPRIV_IOCTL_WSC_CALLBACK (SIOCIWFIRSTPRIV + 0x1A)
+#endif /* CONFIG_AP_SUPPORT */
+
+#endif /* _RT_OS_H_ */
diff --git a/cleopatre/devkit/mt7601udrv/include/phy/rlt_phy.h b/cleopatre/devkit/mt7601udrv/include/phy/rlt_phy.h
new file mode 100644
index 0000000000..df418d71bf
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/phy/rlt_phy.h
@@ -0,0 +1,275 @@
+
+/*
+
+*/
+
+
+#ifndef __RLT_PHY_H__
+#define __RLT_PHY_H_
+
+
+#define BBP_CORE 0x2000
+#define BBP_IBI 0x2100
+#define BBP_AGC1 0x2300
+#define BBP_TXC 0x2400
+#define BBP_RXC 0x2500
+#define BBP_TXO 0x2600
+#define BBP_TXBE 0x2700
+#define BBP_RXFE 0x2800
+#define BBP_RXO 0x2900
+#define BBP_DFS 0x2a00
+#define BBP_TR 0x2b00
+#define BBP_CAL 0x2c00
+#define BBP_DSC 0x2d00
+#define BBP_PFMU 0x2f00
+
+
+/* 0x2000 ~ */
+#define CORE_R0 (BBP_CORE + 0x00)
+#define CORE_R1 (BBP_CORE + 0x04)
+#define CORE_R4 (BBP_CORE + 0x10)
+#define CORE_R24 (BBP_CORE + 0x60)
+#define CORE_R32 (BBP_CORE + 0x80)
+#define CORE_R35 (BBP_CORE + 0x8c)
+#define CORE_R42 (BBP_CORE + 0xa8)
+#define CORE_R44 (BBP_CORE + 0xb0)
+
+/* 0x2100 ~ */
+#define IBI_R0 (BBP_IBI + 0x00)
+#define IBI_R1 (BBP_IBI + 0x04)
+#define IBI_R2 (BBP_IBI + 0x08)
+#define IBI_R3 (BBP_IBI + 0x0c)
+#define IBI_R4 (BBP_IBI + 0x10)
+#define IBI_R5 (BBP_IBI + 0x14)
+#define IBI_R6 (BBP_IBI + 0x18)
+#define IBI_R7 (BBP_IBI + 0x1c)
+#define IBI_R9 (BBP_IBI + 0x24)
+#define IBI_R11 (BBP_IBI + 0x2c)
+
+/* 0x2300 ~ */
+#define AGC1_R0 (BBP_AGC1 + 0x00)
+#define AGC1_R1 (BBP_AGC1 + 0x04)
+#define AGC1_R2 (BBP_AGC1 + 0x08)
+#define AGC1_R4 (BBP_AGC1 + 0x10)
+#define AGC1_R5 (BBP_AGC1 + 0x14)
+#define AGC1_R8 (BBP_AGC1 + 0x20)
+#define AGC1_R9 (BBP_AGC1 + 0x24)
+#define AGC1_R12 (BBP_AGC1 + 0x30)
+#define AGC1_R13 (BBP_AGC1 + 0x34)
+#define AGC1_R14 (BBP_AGC1 + 0x38)
+#define AGC1_R16 (BBP_AGC1 + 0x40)
+#define AGC1_R18 (BBP_AGC1 + 0x48)
+#define AGC1_R19 (BBP_AGC1 + 0x4c)
+#define AGC1_R20 (BBP_AGC1 + 0x50)
+#define AGC1_R21 (BBP_AGC1 + 0x54)
+#define AGC1_R22 (BBP_AGC1 + 0x58)
+#define AGC1_R23 (BBP_AGC1 + 0x5c)
+#define AGC1_R24 (BBP_AGC1 + 0x60)
+#define AGC1_R25 (BBP_AGC1 + 0x64)
+#define AGC1_R26 (BBP_AGC1 + 0x68)
+#define AGC1_R27 (BBP_AGC1 + 0x6c)
+#define AGC1_R28 (BBP_AGC1 + 0x70)
+#define AGC1_R30 (BBP_AGC1 + 0x78)
+#define AGC1_R31 (BBP_AGC1 + 0x7c)
+#define AGC1_R32 (BBP_AGC1 + 0x80)
+#define AGC1_R33 (BBP_AGC1 + 0x84)
+#define AGC1_R34 (BBP_AGC1 + 0x88)
+#define AGC1_R35 (BBP_AGC1 + 0x8c)
+#define AGC1_R37 (BBP_AGC1 + 0x94)
+#define AGC1_R39 (BBP_AGC1 + 0x9c)
+#define AGC1_R41 (BBP_AGC1 + 0xa4)
+#define AGC1_R43 (BBP_AGC1 + 0xac)
+#define AGC1_R45 (BBP_AGC1 + 0xb4)
+#define AGC1_R47 (BBP_AGC1 + 0xbc)
+#define AGC1_R49 (BBP_AGC1 + 0xc4)
+#define AGC1_R51 (BBP_AGC1 + 0xcc)
+#define AGC1_R53 (BBP_AGC1 + 0xd4)
+#define AGC1_R55 (BBP_AGC1 + 0xdc)
+#define AGC1_R57 (BBP_AGC1 + 0xe4)
+#define AGC1_R58 (BBP_AGC1 + 0xe8)
+#define AGC1_R59 (BBP_AGC1 + 0xec)
+#define AGC1_R60 (BBP_AGC1 + 0xf0)
+#define AGC1_R61 (BBP_AGC1 + 0xf4)
+#define AGC1_R62 (BBP_AGC1 + 0xf8)
+#define AGC1_R63 (BBP_AGC1 + 0xfc)
+
+/* 0x2400 ~ */
+#define TXC_R0 (BBP_TXC + 0x00)
+#define TXC_R1 (BBP_TXC + 0x04)
+
+/* 0x2500 ~ */
+#define RXC_R0 (BBP_RXC + 0x00)
+#define RXC_R1 (BBP_RXC + 0x04)
+#define RXC_R2 (BBP_RXC + 0x08)
+#define RXC_R3 (BBP_RXC + 0x0c)
+#define RXC_R4 (BBP_RXC + 0x10)
+
+/* 0x2600 ~ */
+#define TXO_R0 (BBP_TXO + 0x00)
+#define TXO_R1 (BBP_TXO + 0x04)
+#define TXO_R2 (BBP_TXO + 0x08)
+#define TXO_R3 (BBP_TXO + 0x0c)
+#define TXO_R4 (BBP_TXO + 0x10)
+#define TXO_R5 (BBP_TXO + 0x14)
+#define TXO_R6 (BBP_TXO + 0x18)
+#define TXO_R7 (BBP_TXO + 0x1c)
+#define TXO_R8 (BBP_TXO + 0x20)
+
+/* 0x2700 ~ */
+#define TXBE_R0 (BBP_TXBE + 0x00)
+#define TXBE_R1 (BBP_TXBE + 0x04)
+#define TXBE_R2 (BBP_TXBE + 0x08)
+#define TXBE_R3 (BBP_TXBE + 0x0c)
+#define TXBE_R4 (BBP_TXBE + 0x10)
+#define TXBE_R5 (BBP_TXBE + 0x14)
+#define TXBE_R6 (BBP_TXBE + 0x18)
+#define TXBE_R8 (BBP_TXBE + 0x20)
+#define TXBE_R9 (BBP_TXBE + 0x24)
+#define TXBE_R10 (BBP_TXBE + 0x28)
+#define TXBE_R12 (BBP_TXBE + 0x30)
+#define TXBE_R13 (BBP_TXBE + 0x34)
+#define TXBE_R14 (BBP_TXBE + 0x38)
+#define TXBE_R15 (BBP_TXBE + 0x3c)
+#define TXBE_R16 (BBP_TXBE + 0x40)
+#define TXBE_R17 (BBP_TXBE + 0x44)
+
+/* 0x2800 ~ */
+#define RXFE_R0 (BBP_RXFE + 0x00)
+#define RXFE_R2 (BBP_RXFE + 0x08)
+#define RXFE_R3 (BBP_RXFE + 0x0c)
+#define RXFE_R4 (BBP_RXFE + 0x10)
+
+/* 0x2900 ~ */
+#define RXO_R9 (BBP_RXO + 0x24)
+#define RXO_R13 (BBP_RXO + 0x34)
+#define RXO_R14 (BBP_RXO + 0x38)
+#define RXO_R15 (BBP_RXO + 0x3c)
+#define RXO_R16 (BBP_RXO + 0x40)
+#define RXO_R17 (BBP_RXO + 0x44)
+#define RXO_R21 (BBP_RXO + 0x54)
+#define RXO_R24 (BBP_RXO + 0x60)
+#define RXO_R28 (BBP_RXO + 0x70)
+#define RXO_R29 (BBP_RXO + 0x74)
+
+/* 0x2a00 ~ */
+#define DFS_R0 (BBP_DFS + 0x00)
+#define DFS_R1 (BBP_DFS + 0x04)
+#define DFS_R2 (BBP_DFS + 0x08)
+#define DFS_R3 (BBP_DFS + 0x0c)
+#define DFS_R4 (BBP_DFS + 0x10)
+#define DFS_R5 (BBP_DFS + 0x14)
+#define DFS_R7 (BBP_DFS + 0x1c)
+#define DFS_R9 (BBP_DFS + 0x24)
+#define DFS_R11 (BBP_DFS + 0x2c)
+#define DFS_R13 (BBP_DFS + 0x34)
+#define DFS_R14 (BBP_DFS + 0x38)
+#define DFS_R15 (BBP_DFS + 0x3c)
+#define DFS_R17 (BBP_DFS + 0x44)
+#define DFS_R19 (BBP_DFS + 0x4c)
+#define DFS_R20 (BBP_DFS + 0x50)
+#define DFS_R22 (BBP_DFS + 0x58)
+#define DFS_R23 (BBP_DFS + 0x5c)
+#define DFS_R25 (BBP_DFS + 0x64)
+#define DFS_R26 (BBP_DFS + 0x68)
+#define DFS_R28 (BBP_DFS + 0x70)
+#define DFS_R30 (BBP_DFS + 0x78)
+#define DFS_R31 (BBP_DFS + 0x7c)
+
+/* 0x2c00 ~ */
+#define CAL_R0 (BBP_CAL + 0x00)
+#define CAL_R1 (BBP_CAL + 0x04)
+#define CAL_R2 (BBP_CAL + 0x08)
+#define CAL_R3 (BBP_CAL + 0x0c)
+#define CAL_R4 (BBP_CAL + 0x10)
+#define CAL_R5 (BBP_CAL + 0x14)
+#define CAL_R6 (BBP_CAL + 0x18)
+#define CAL_R7 (BBP_CAL + 0x1C)
+#define CAL_R8 (BBP_CAL + 0x20)
+#define CAL_R9 (BBP_CAL + 0x24)
+#define CAL_R10 (BBP_CAL + 0x28)
+#define CAL_R11 (BBP_CAL + 0x2C)
+#define CAL_R12 (BBP_CAL + 0x30)
+#define CAL_R13 (BBP_CAL + 0x34)
+#define CAL_R14 (BBP_CAL + 0x38)
+#define CAL_R15 (BBP_CAL + 0x3C)
+#define CAL_R16 (BBP_CAL + 0x40)
+#define CAL_R17 (BBP_CAL + 0x44)
+#define CAL_R18 (BBP_CAL + 0x48)
+#define CAL_R19 (BBP_CAL + 0x4C)
+#define CAL_R20 (BBP_CAL + 0x50)
+#define CAL_R21 (BBP_CAL + 0x54)
+#define CAL_R22 (BBP_CAL + 0x58)
+#define CAL_R23 (BBP_CAL + 0x5C)
+#define CAL_R24 (BBP_CAL + 0x60)
+#define CAL_R25 (BBP_CAL + 0x64)
+#define CAL_R26 (BBP_CAL + 0x68)
+#define CAL_R27 (BBP_CAL + 0x6C)
+#define CAL_R28 (BBP_CAL + 0x70)
+#define CAL_R29 (BBP_CAL + 0x74)
+#define CAL_R30 (BBP_CAL + 0x78)
+#define CAL_R31 (BBP_CAL + 0x7C)
+#define CAL_R32 (BBP_CAL + 0x80)
+#define CAL_R33 (BBP_CAL + 0x84)
+#define CAL_R34 (BBP_CAL + 0x88)
+#define CAL_R35 (BBP_CAL + 0x8C)
+#define CAL_R36 (BBP_CAL + 0x90)
+#define CAL_R37 (BBP_CAL + 0x94)
+#define CAL_R38 (BBP_CAL + 0x98)
+#define CAL_R39 (BBP_CAL + 0x9C)
+#define CAL_R40 (BBP_CAL + 0xA0)
+#define CAL_R41 (BBP_CAL + 0xA4)
+#define CAL_R42 (BBP_CAL + 0xA8)
+#define CAL_R43 (BBP_CAL + 0xAC)
+#define CAL_R44 (BBP_CAL + 0xB0)
+#define CAL_R45 (BBP_CAL + 0xB4)
+#define CAL_R46 (BBP_CAL + 0xB8)
+#define CAL_R47 (BBP_CAL + 0xBC)
+#define CAL_R48 (BBP_CAL + 0xC0)
+#define CAL_R49 (BBP_CAL + 0xC4)
+#define CAL_R50 (BBP_CAL + 0xC8)
+#define CAL_R51 (BBP_CAL + 0xCC)
+#define CAL_R52 (BBP_CAL + 0xD0)
+#define CAL_R53 (BBP_CAL + 0xD4)
+#define CAL_R54 (BBP_CAL + 0xD8)
+#define CAL_R55 (BBP_CAL + 0xDC)
+#define CAL_R56 (BBP_CAL + 0xE0)
+#define CAL_R57 (BBP_CAL + 0xE4)
+#define CAL_R58 (BBP_CAL + 0xE8)
+#define CAL_R59 (BBP_CAL + 0xEC)
+#define CAL_R60 (BBP_CAL + 0xF0)
+#define CAL_R61 (BBP_CAL + 0xF4)
+#define CAL_R62 (BBP_CAL + 0xF8)
+#define CAL_R63 (BBP_CAL + 0xFC)
+#define CAL_R64 (BBP_CAL + 0x100)
+#define CAL_R65 (BBP_CAL + 0x104)
+#define CAL_R66 (BBP_CAL + 0x108)
+#define CAL_R67 (BBP_CAL + 0x10C)
+#define CAL_R68 (BBP_CAL + 0x110)
+#define CAL_R69 (BBP_CAL + 0x114)
+#define CAL_R70 (BBP_CAL + 0x118)
+
+
+#define RTMP_BBP_IO_READ32(_p, _i, _pV) RTMP_IO_READ32(_p, _i, _pV)
+#define RTMP_BBP_IO_WRITE32(_p, _i, _v) RTMP_IO_WRITE32(_p, _i, _v)
+
+#define RF_BANK0 0
+#define RF_BANK1 1
+#define RF_BANK2 2
+#define RF_BANK3 3
+#define RF_BANK4 4
+#define RF_BANK5 5
+#define RF_BANK6 6
+#define RF_BANK7 7
+#define RF_BANK8 8
+#define RF_BANK9 9
+#define RF_BANK10 10
+#define RF_BANK11 11
+#define RF_BANK12 12
+#define RF_BANK13 13
+#define RF_BANK14 14
+#define RF_BANK15 15
+
+INT rlt_bbp_is_ready(struct _RTMP_ADAPTER *pAd);
+
+#endif /* __RLT_PHY_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/radar.h b/cleopatre/devkit/mt7601udrv/include/radar.h
new file mode 100644
index 0000000000..ce3f27f2d3
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/radar.h
@@ -0,0 +1,89 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ radar.h
+
+ Abstract:
+ CS/DFS common functions.
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+#ifndef __RADAR_H__
+#define __RADAR_H__
+
+/* RESTRICTION_BAND_1: 5600MHz ~ 5650MHz */
+#define RESTRICTION_BAND_1(_pAd) \
+ _pAd->CommonCfg.RegTransmitSetting.field.BW == BW_40 ? \
+ ((_pAd->CommonCfg.Channel >= 116) && (_pAd->CommonCfg.Channel <= 128)) : \
+ ((_pAd->CommonCfg.Channel >= 120) && (_pAd->CommonCfg.Channel <= 128))
+
+/* 802.11H */
+typedef struct _DOT11_H {
+ /* 802.11H and DFS related params */
+ UCHAR CSCount; /*Channel switch counter */
+ UCHAR CSPeriod; /*Channel switch period (beacon count) */
+ USHORT RDCount; /*Radar detection counter, if RDCount > ChMovingTime, start to send beacons*/
+ UCHAR RDMode; /*Radar Detection mode */
+ USHORT ChMovingTime;
+ BOOLEAN bDFSIndoor;
+ ULONG InServiceMonitorCount; /* unit: sec */
+} DOT11_H, *PDOT11_H;
+
+BOOLEAN RadarChannelCheck(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Ch);
+
+ULONG JapRadarType(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef CONFIG_AP_SUPPORT
+VOID ChannelSwitchingCountDownProc(
+ IN PRTMP_ADAPTER pAd);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID RadarDetectPeriodic(
+ IN PRTMP_ADAPTER pAd);
+
+INT Set_CSPeriod_Proc(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+INT Set_ChMovingTime_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BlockChReset_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#if defined(DFS_SUPPORT) || defined(CARRIER_DETECTION_SUPPORT)
+INT Set_RadarShow_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+VOID CckMrcStatusCtrl(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RadarGLRTCompensate(
+ IN PRTMP_ADAPTER pAd);
+
+#endif /*defined(DFS_SUPPORT) || defined(CARRIER_DETECTION_SUPPORT)*/
+
+#endif /* __RADAR_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rt_config.h b/cleopatre/devkit/mt7601udrv/include/rt_config.h
new file mode 100644
index 0000000000..d1b382b357
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rt_config.h
@@ -0,0 +1,211 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rt_config.h
+
+ Abstract:
+ Central header file to maintain all include files for all NDIS
+ miniport driver routines.
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Paul Lin 08-01-2002 created
+
+*/
+#ifndef __RT_CONFIG_H__
+#define __RT_CONFIG_H__
+
+/* #define WDS_VLAN_SUPPORT */
+
+#include "rtmp_comm.h"
+/*#include "rtmp_type.h" */
+/*#include "rtmp_os.h" */
+
+#include "rtmp_def.h"
+#include "rtmp_chip.h"
+#include "rtmp_timer.h"
+
+
+#ifdef LINUX
+#ifdef RT_CFG80211_SUPPORT
+#include "cfg80211extr.h"
+#endif /* RT_CFG80211_SUPPORT */
+#endif /* LINUX */
+
+#ifdef AGS_SUPPORT
+#include "ags.h"
+#endif /* AGS_SUPPORT */
+
+#include "mlme.h"
+#include "crypt_md5.h"
+#include "crypt_sha2.h"
+#include "crypt_hmac.h"
+#include "crypt_aes.h"
+#include "crypt_arc4.h"
+/*#include "rtmp_cmd.h" */
+#include "rtmp.h"
+#include "ap.h"
+#include "wpa.h"
+#include "chlist.h"
+#include "spectrum.h"
+#ifdef CONFIG_AP_SUPPORT
+#include "ap_autoChSel.h"
+#endif /* CONFIG_AP_SUPPORT */
+#include "rt_os_util.h"
+
+#include "eeprom.h"
+#if defined(RTMP_PCI_SUPPORT) || defined(RTMP_USB_SUPPORT)
+#include "rtmp_mcu.h"
+#endif
+
+#undef AP_WSC_INCLUDED
+#undef STA_WSC_INCLUDED
+#undef WSC_INCLUDED
+
+#include "rt_os_net.h"
+
+#ifdef UAPSD_SUPPORT
+#include "uapsd.h"
+#endif /* UAPSD_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef MBSS_SUPPORT
+#include "ap_mbss.h"
+#endif /* MBSS_SUPPORT */
+
+#ifdef WDS_SUPPORT
+#include "ap_wds.h"
+#endif /* WDS_SUPPORT */
+
+#ifdef APCLI_SUPPORT
+#include "ap_apcli.h"
+#endif /* APCLI_SUPPORT */
+
+#ifdef WSC_AP_SUPPORT
+#define AP_WSC_INCLUDED
+#endif /* WSC_AP_SUPPORT */
+
+#include "ap_ids.h"
+#include "ap_cfg.h"
+
+#ifdef CLIENT_WDS
+#include "client_wds.h"
+#endif /* CLIENT_WDS */
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef MAT_SUPPORT
+#include "mat.h"
+#endif /* MAT_SUPPORT */
+
+
+
+#ifdef BLOCK_NET_IF
+#include "netif_block.h"
+#endif /* BLOCK_NET_IF */
+
+#ifdef IGMP_SNOOP_SUPPORT
+#include "igmp_snoop.h"
+#endif /* IGMP_SNOOP_SUPPORT */
+
+#ifdef RALINK_ATE
+#include "rt_ate.h"
+#endif /* RALINK_ATE */
+
+#ifdef RALINK_QA
+#include "rt_qa.h"
+#endif /* RALINK_QA */
+
+#ifdef RALINK_QA
+#ifndef RALINK_ATE
+#error "For supporting QA GUI, please set HAS_ATE=y and HAS_QA_SUPPORT=y."
+#endif /* RALINK_ATE */
+#endif /* RALINK_QA */
+
+
+
+#ifdef WAPI_SUPPORT
+#include "wapi.h"
+#endif /* WAPI_SUPPORT */
+
+
+
+#if defined(AP_WSC_INCLUDED) || defined(STA_WSC_INCLUDED)
+#define WSC_INCLUDED
+#endif
+
+//#ifdef CONFIG_AP_SUPPORT
+//#ifdef WDS_SUPPORT
+#define RALINK_PASSPHRASE "Ralink"
+//#endif /* WDS_SUPPORT */
+//#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+#ifndef APCLI_SUPPORT
+#error "Build Apcli for being controlled by NetworkManager or wext, please set HAS_APCLI_SUPPORT=y and HAS_APCLI_WPA_SUPPLICANT=y"
+#endif /* APCLI_SUPPORT */
+#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
+
+
+
+#ifdef WSC_INCLUDED
+#include "crypt_biginteger.h"
+#include "crypt_dh.h"
+#include "wsc_tlv.h"
+#endif /* WSC_INCLUDED */
+
+
+#ifdef IKANOS_VX_1X0
+#include "vr_ikans.h"
+#endif /* IKANOS_VX_1X0 */
+
+
+
+
+
+#ifdef WAPI_SUPPORT
+#include "wapi.h"
+#endif /* WAPI_SUPPORT */
+
+
+#ifdef WFD_SUPPORT
+#include "wfd.h"
+#endif /* WFD_SUPPORT */
+
+#ifdef DOT11_VHT_AC
+#include "vht.h"
+#endif /* DOT11_VHT_AC */
+
+
+
+
+#ifdef WORKQUEUE_BH
+#include <linux/workqueue.h>
+#endif /* WORKQUEUE_BH / */
+
+
+#ifdef TXBF_SUPPORT
+#include "rt_txbf.h"
+#endif /* TXBF_SUPPORT */
+
+
+#include "mac_ral/fce.h"
+
+#endif /* __RT_CONFIG_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/rt_os_net.h b/cleopatre/devkit/mt7601udrv/include/rt_os_net.h
new file mode 100644
index 0000000000..b4a69b44e4
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rt_os_net.h
@@ -0,0 +1,583 @@
+/****************************************************************************
+
+ Module Name:
+ rt_os_net.h
+
+ Abstract:
+ All function prototypes are defined in NETIF modules.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+
+***************************************************************************/
+
+#ifndef __RT_OS_NET_H__
+#define __RT_OS_NET_H__
+
+#include "chip/chip_id.h"
+
+typedef VOID *(*RTMP_NET_ETH_CONVERT_DEV_SEARCH)(VOID *net_dev, UCHAR *pData);
+typedef int (*RTMP_NET_PACKET_TRANSMIT)(VOID *pPacket);
+
+#ifdef LINUX
+#ifdef OS_ABL_FUNC_SUPPORT
+
+/* ========================================================================== */
+/* operators used in NETIF module */
+/* Note: No need to put any compile option here */
+typedef struct _RTMP_DRV_ABL_OPS {
+
+NDIS_STATUS (*RTMPAllocAdapterBlock)(PVOID handle, VOID **ppAdapter);
+VOID (*RTMPFreeAdapter)(VOID *pAd);
+BOOLEAN (*RtmpRaDevCtrlExit)(VOID *pAd);
+INT (*RtmpRaDevCtrlInit)(VOID *pAd, RTMP_INF_TYPE infType);
+VOID (*RTMPHandleInterrupt)(VOID *pAd);
+INT (*RTMP_COM_IoctlHandle)(
+ IN VOID *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+
+int (*RTMPSendPackets)(
+ IN NDIS_HANDLE MiniportAdapterContext,
+ IN PPNDIS_PACKET ppPacketArray,
+ IN UINT NumberOfPackets,
+ IN UINT32 PktTotalLen,
+ IN RTMP_NET_ETH_CONVERT_DEV_SEARCH Func);
+
+int (*MBSS_PacketSend)(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int (*WDS_PacketSend)(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int (*APC_PacketSend)(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int (*MESH_PacketSend)(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int (*P2P_PacketSend)(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+INT (*RTMP_AP_IoctlHandle)(
+ IN VOID *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+
+INT (*RTMP_STA_IoctlHandle)(
+ IN VOID *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data,
+ IN USHORT priv_flags);
+
+VOID (*RTMPDrvOpen)(VOID *pAd);
+
+VOID (*RTMPDrvClose)(VOID *pAd, VOID *net_dev);
+
+VOID (*RTMPInfClose)(VOID *pAd);
+
+int (*rt28xx_init)(VOID *pAd, PSTRING pDefaultMac, PSTRING pHostName);
+} RTMP_DRV_ABL_OPS;
+
+extern RTMP_DRV_ABL_OPS *pRtmpDrvOps;
+
+VOID RtmpDrvOpsInit(
+ OUT VOID *pDrvOpsOrg,
+ INOUT VOID *pDrvNetOpsOrg,
+ IN RTMP_PCI_CONFIG *pPciConfig,
+ IN RTMP_USB_CONFIG *pUsbConfig);
+#endif /* OS_ABL_FUNC_SUPPORT */
+#endif /* LINUX */
+
+
+
+
+/* ========================================================================== */
+/* operators used in DRIVER module */
+typedef void (*RTMP_DRV_USB_COMPLETE_HANDLER)(VOID *pURB);
+
+typedef struct _RTMP_NET_ABL_OPS {
+
+#ifdef RTMP_USB_SUPPORT
+/* net complete handlers */
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkOutDataPacketComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkOutMLMEPacketComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkOutNullFrameComplete;
+
+#ifdef CONFIG_MULTI_CHANNEL
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkOutHCCANullFrameComplete;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkOutRTSFrameComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkOutPsPollComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkRxComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpNetUsbBulkCmdRspEventComplete;
+
+/* drv complete handlers */
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkOutDataPacketComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkOutMLMEPacketComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkOutNullFrameComplete;
+
+#ifdef CONFIG_MULTI_CHANNEL
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkOutHCCANullFrameComplete;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkOutRTSFrameComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkOutPsPollComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkRxComplete;
+RTMP_DRV_USB_COMPLETE_HANDLER RtmpDrvUsbBulkCmdRspEventComplete;
+
+#endif /* RTMP_USB_SUPPORT */
+
+} RTMP_NET_ABL_OPS;
+
+extern RTMP_NET_ABL_OPS *pRtmpDrvNetOps;
+
+VOID RtmpNetOpsInit(VOID *pNetOpsOrg);
+VOID RtmpNetOpsSet(VOID *pNetOpsOrg);
+
+
+/* ========================================================================== */
+#if defined(RTMP_MODULE_OS) && defined(OS_ABL_FUNC_SUPPORT)
+/* for UTIL/NETIF module in OS ABL mode */
+
+#define RTMPAllocAdapterBlock (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPAllocAdapterBlock)
+#define RTMPFreeAdapter (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPFreeAdapter)
+#define RtmpRaDevCtrlExit (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RtmpRaDevCtrlExit)
+#define RtmpRaDevCtrlInit (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RtmpRaDevCtrlInit)
+#define RTMPHandleInterrupt (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPHandleInterrupt)
+#define RTMP_COM_IoctlHandle (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMP_COM_IoctlHandle)
+#define RTMPSendPackets (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPSendPackets)
+#define MBSS_PacketSend (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->MBSS_PacketSend)
+#define WDS_PacketSend (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->WDS_PacketSend)
+#define APC_PacketSend (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->APC_PacketSend)
+#define MESH_PacketSend (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->MESH_PacketSend)
+#define P2P_PacketSend (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->P2P_PacketSend)
+#define RTMP_AP_IoctlHandle (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMP_AP_IoctlHandle)
+#define RTMP_STA_IoctlHandle (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMP_STA_IoctlHandle)
+#define RTMPDrvOpen (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPDrvOpen)
+#define RTMPDrvClose (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPDrvClose)
+#define RTMPInfClose (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->RTMPInfClose)
+#define rt28xx_init (((RTMP_DRV_ABL_OPS *)(pRtmpDrvOps))->rt28xx_init)
+
+#else /* RTMP_MODULE_OS && OS_ABL_FUNC_SUPPORT */
+
+NDIS_STATUS RTMPAllocAdapterBlock(PVOID handle, VOID **ppAdapter);
+VOID RTMPFreeAdapter(VOID *pAd);
+BOOLEAN RtmpRaDevCtrlExit(VOID *pAd);
+INT RtmpRaDevCtrlInit(VOID *pAd, RTMP_INF_TYPE infType);
+VOID RTMPHandleInterrupt(VOID *pAd);
+
+INT RTMP_COM_IoctlHandle(
+ IN VOID *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+
+int RTMPSendPackets(
+ IN NDIS_HANDLE MiniportAdapterContext,
+ IN PPNDIS_PACKET ppPacketArray,
+ IN UINT NumberOfPackets,
+ IN UINT32 PktTotalLen,
+ IN RTMP_NET_ETH_CONVERT_DEV_SEARCH Func);
+
+int MBSS_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int WDS_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int APC_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int MESH_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+int P2P_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev,
+ IN RTMP_NET_PACKET_TRANSMIT Func);
+
+#ifdef CONFIG_AP_SUPPORT
+INT RTMP_AP_IoctlHandle(
+ IN VOID *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+VOID RTMPDrvOpen(VOID *pAd);
+VOID RTMPDrvClose(VOID *pAd, VOID *net_dev);
+VOID RTMPInfClose(VOID *pAd);
+
+int rt28xx_init(
+ IN VOID *pAd,
+ IN PSTRING pDefaultMac,
+ IN PSTRING pHostName);
+
+PNET_DEV RtmpPhyNetDevMainCreate(VOID *pAd);
+#endif /* RTMP_MODULE_OS */
+
+
+
+
+/* ========================================================================== */
+int rt28xx_close(VOID *dev);
+int rt28xx_open(VOID *dev);
+
+__inline INT VIRTUAL_IF_UP(VOID *pAd)
+{
+ RT_CMD_INF_UP_DOWN InfConf = { rt28xx_open, rt28xx_close };
+ if (RTMP_COM_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_VIRTUAL_INF_UP,
+ 0, &InfConf, 0) != NDIS_STATUS_SUCCESS)
+ return -1;
+ return 0;
+}
+
+__inline VOID VIRTUAL_IF_DOWN(VOID *pAd)
+{
+ RT_CMD_INF_UP_DOWN InfConf = { rt28xx_open, rt28xx_close };
+ RTMP_COM_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_VIRTUAL_INF_DOWN,
+ 0, &InfConf, 0);
+ return;
+}
+
+#ifdef RTMP_MODULE_OS
+
+#ifdef CONFIG_AP_SUPPORT
+INT rt28xx_ap_ioctl(
+ IN PNET_DEV net_dev,
+ IN OUT struct ifreq *rq,
+ IN INT cmd);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+PNET_DEV RtmpPhyNetDevInit(
+ IN VOID *pAd,
+ IN RTMP_OS_NETDEV_OP_HOOK *pNetHook);
+
+BOOLEAN RtmpPhyNetDevExit(
+ IN VOID *pAd,
+ IN PNET_DEV net_dev);
+
+#endif /* RTMP_MODULE_OS && OS_ABL_FUNC_SUPPORT */
+
+
+VOID RT28xx_MBSS_Init(
+ IN VOID *pAd,
+ IN PNET_DEV main_dev_p);
+VOID RT28xx_MBSS_Remove(
+ IN VOID *pAd);
+INT MBSS_VirtualIF_Open(
+ IN PNET_DEV dev_p);
+INT MBSS_VirtualIF_Close(
+ IN PNET_DEV dev_p);
+INT MBSS_VirtualIF_PacketSend(
+ IN PNDIS_PACKET skb_p,
+ IN PNET_DEV dev_p);
+INT MBSS_VirtualIF_Ioctl(
+ IN PNET_DEV dev_p,
+ IN OUT VOID *rq_p,
+ IN INT cmd);
+
+VOID RT28xx_WDS_Init(
+ IN VOID *pAd,
+ IN PNET_DEV net_dev);
+INT WdsVirtualIFSendPackets(
+ IN PNDIS_PACKET pSkb,
+ IN PNET_DEV dev);
+INT WdsVirtualIF_open(
+ IN PNET_DEV dev);
+INT WdsVirtualIF_close(
+ IN PNET_DEV dev);
+INT WdsVirtualIF_ioctl(
+ IN PNET_DEV net_dev,
+ IN OUT VOID *rq,
+ IN INT cmd);
+VOID RT28xx_WDS_Remove(
+ IN VOID *pAd);
+
+VOID RT28xx_ApCli_Init(
+ IN VOID *pAd,
+ IN PNET_DEV main_dev_p);
+INT ApCli_VirtualIF_Open(
+ IN PNET_DEV dev_p);
+INT ApCli_VirtualIF_Close(
+ IN PNET_DEV dev_p);
+INT ApCli_VirtualIF_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev);
+INT ApCli_VirtualIF_Ioctl(
+ IN PNET_DEV dev_p,
+ IN OUT VOID *rq_p,
+ IN INT cmd);
+VOID RT28xx_ApCli_Remove(
+ IN VOID *pAd);
+
+VOID RTMP_Mesh_Init(
+ IN VOID *pAd,
+ IN PNET_DEV main_dev_p,
+ IN PSTRING pHostName);
+VOID RTMP_Mesh_Remove(
+ IN VOID *pAd);
+INT Mesh_VirtualIF_Open(
+ IN PNET_DEV pDev);
+INT Mesh_VirtualIF_Close(
+ IN PNET_DEV pDev);
+INT Mesh_VirtualIF_PacketSend(
+ IN PNDIS_PACKET pPktSrc,
+ IN PNET_DEV pDev);
+INT Mesh_VirtualIF_Ioctl(
+ IN PNET_DEV dev_p,
+ IN OUT VOID *rq_p,
+ IN INT cmd);
+
+VOID RTMP_P2P_Init(
+ IN VOID *pAd,
+ IN PNET_DEV main_dev_p);
+
+ INT P2P_VirtualIF_Open(
+ IN PNET_DEV dev_p);
+
+ INT P2P_VirtualIF_Close(
+ IN PNET_DEV dev_p);
+
+ INT P2P_VirtualIF_PacketSend(
+ IN PNDIS_PACKET skb_p,
+ IN PNET_DEV dev_p);
+
+ INT P2P_VirtualIF_Ioctl(
+ IN PNET_DEV dev_p,
+ IN OUT VOID *rq_p,
+ IN INT cmd);
+
+VOID RTMP_P2P_Remove(
+ IN VOID *pAd);
+
+
+/* communication with RALINK DRIVER module in NET module */
+/* general */
+#define RTMP_DRIVER_NET_DEV_GET(__pAd, __pNetDev) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_NETDEV_GET, 0, __pNetDev, 0)
+
+#define RTMP_DRIVER_NET_DEV_SET(__pAd, __pNetDev) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_NETDEV_SET, 0, __pNetDev, 0)
+
+#define RTMP_DRIVER_OP_MODE_GET(__pAd, __pOpMode) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_OPMODE_GET, 0, __pOpMode, 0)
+
+#define RTMP_DRIVER_IW_STATS_GET(__pAd, __pIwStats) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_IW_STATUS_GET, 0, __pIwStats, 0)
+
+#define RTMP_DRIVER_INF_STATS_GET(__pAd, __pInfStats) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_STATS_GET, 0, __pInfStats, 0)
+
+#define RTMP_DRIVER_INF_TYPE_GET(__pAd, __pInfType) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_TYPE_GET, 0, __pInfType, 0)
+
+#define RTMP_DRIVER_TASK_LIST_GET(__pAd, __pList) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_TASK_LIST_GET, 0, __pList, 0)
+
+#define RTMP_DRIVER_NIC_NOT_EXIST_SET(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_NIC_NOT_EXIST, 0, NULL, 0)
+
+#define RTMP_DRIVER_MCU_SLEEP_CLEAR(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_MCU_SLEEP_CLEAR, 0, NULL, 0)
+
+#ifdef CONFIG_APSTA_MIXED_SUPPORT
+#define RTMP_DRIVER_MAX_IN_BITS_SET(__pAd, __MaxInBit) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_MAX_IN_BIT, 0, NULL, __MaxInBit)
+#endif /* CONFIG_APSTA_MIXED_SUPPORT */
+
+#define RTMP_DRIVER_ADAPTER_RT28XX_USB_ASICRADIO_OFF(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ADAPTER_RT28XX_USB_ASICRADIO_OFF, 0, NULL, 0)
+
+#define RTMP_DRIVER_ADAPTER_RT28XX_USB_ASICRADIO_ON(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ADAPTER_RT28XX_USB_ASICRADIO_ON, 0, NULL, 0)
+
+#define RTMP_DRIVER_ADAPTER_SUSPEND_SET(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ADAPTER_SUSPEND_SET, 0, NULL, 0)
+
+#define RTMP_DRIVER_ADAPTER_SUSPEND_CLEAR(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ADAPTER_SUSPEND_CLEAR, 0, NULL, 0)
+
+#define RTMP_DRIVER_VIRTUAL_INF_NUM_GET(__pAd, __pIfNum) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_VIRTUAL_INF_GET, 0, __pIfNum, 0)
+
+#define RTMP_DRIVER_CHANNEL_GET(__pAd, __Channel) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_SIOCGIWFREQ, 0, __Channel, 0)
+
+#define RTMP_DRIVER_IOCTL_SANITY_CHECK(__pAd, __SetCmd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_SANITY_CHECK, 0, __SetCmd, 0)
+
+#define RTMP_DRIVER_BITRATE_GET(__pAd, __pBitRate) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_AP_SIOCGIWRATEQ, 0, __pBitRate, 0)
+
+#define RTMP_DRIVER_MAIN_INF_CREATE(__pAd, __ppNetDev) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_MAIN_CREATE, 0, __ppNetDev, 0)
+
+#define RTMP_DRIVER_MAIN_INF_GET(__pAd, __pInfId) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_MAIN_ID_GET, 0, __pInfId, 0)
+
+#define RTMP_DRIVER_MAIN_INF_CHECK(__pAd, __InfId) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_MAIN_CHECK, 0, NULL, __InfId)
+
+#define RTMP_DRIVER_P2P_INF_CHECK(__pAd, __InfId) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_P2P_CHECK, 0, NULL, __InfId)
+
+#ifdef EXT_BUILD_CHANNEL_LIST
+#define RTMP_DRIVER_SET_PRECONFIG_VALUE(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_SET_PRECONFIG_VALUE, 0, NULL, 0)
+#endif /* EXT_BUILD_CHANNEL_LIST */
+
+/* cfg80211 */
+#define RTMP_DRIVER_CFG80211_START(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_CFG80211_CFG_START, 0, NULL, 0)
+
+
+#ifdef RT_CFG80211_SUPPORT
+#define RTMP_DRIVER_80211_CB_GET(__pAd, __ppCB) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_CB_GET, 0, __ppCB, 0)
+#define RTMP_DRIVER_80211_CB_SET(__pAd, __pCB) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_CB_SET, 0, __pCB, 0)
+#define RTMP_DRIVER_80211_CHAN_SET(__pAd, __pChan) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_CHAN_SET, 0, __pChan, 0)
+#define RTMP_DRIVER_80211_VIF_SET(__pAd, __Filter, __IfType) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_VIF_CHG, 0, &__Filter, __IfType)
+#define RTMP_DRIVER_80211_SCAN(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_SCAN, 0, NULL, 0)
+#define RTMP_DRIVER_80211_IBSS_JOIN(__pAd, __pInfo) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_IBSS_JOIN, 0, __pInfo, 0)
+#define RTMP_DRIVER_80211_STA_LEAVE(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_STA_LEAVE, 0, NULL, 0)
+#define RTMP_DRIVER_80211_STA_GET(__pAd, __pStaInfo) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_STA_GET, 0, __pStaInfo, 0)
+#define RTMP_DRIVER_80211_KEY_ADD(__pAd, __pKeyInfo) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_KEY_ADD, 0, __pKeyInfo, 0)
+#define RTMP_DRIVER_80211_KEY_DEFAULT_SET(__pAd, __KeyId) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_KEY_DEFAULT_SET, 0, NULL, __KeyId)
+#define RTMP_DRIVER_80211_CONNECT(__pAd, __pConnInfo) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_CONNECT_TO, 0, __pConnInfo, 0)
+#define RTMP_DRIVER_80211_RFKILL(__pAd, __pActive) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_RFKILL, 0, __pActive, 0)
+#define RTMP_DRIVER_80211_REG_NOTIFY(__pAd, __pNotify) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_REG_NOTIFY_TO, 0, __pNotify, 0)
+#define RTMP_DRIVER_80211_UNREGISTER(__pAd, __pNetDev) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_UNREGISTER, 0, __pNetDev, 0)
+#define RTMP_DRIVER_80211_BANDINFO_GET(__pAd, __pBandInfo) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_BANDINFO_GET, 0, __pBandInfo, 0)
+#define RTMP_DRIVER_80211_SURVEY_GET(__pAd, __pSurveyInfo) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_80211_SURVEY_GET, 0, __pSurveyInfo, 0)
+#define RTMP_DRIVER_80211_PMKID_CTRL(__pAd, __pPmkidInfo) \
+ RTMP_STA_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_STA_SIOCSIWPMKSA, 0, __pPmkidInfo, 0, 0);
+#endif /* RT_CFG80211_SUPPORT */
+
+/* mesh */
+#define RTMP_DRIVER_MESH_REMOVE(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_MESH_REMOVE, 0, NULL, 0)
+
+/* inf ppa */
+#define RTMP_DRIVER_INF_PPA_INIT(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_PPA_INIT, 0, NULL, 0)
+
+#define RTMP_DRIVER_INF_PPA_EXIT(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_INF_PPA_EXIT, 0, NULL, 0)
+
+/* pci */
+#define RTMP_DRIVER_IRQ_INIT(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_IRQ_INIT, 0, NULL, 0)
+
+#define RTMP_DRIVER_IRQ_RELEASE(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_IRQ_RELEASE, 0, NULL, 0)
+
+#define RTMP_DRIVER_PCI_MSI_ENABLE(__pAd, __pPciDev) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_MSI_ENABLE, 0, __pPciDev, 0)
+
+#define RTMP_DRIVER_PCI_SUSPEND(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_PCI_SUSPEND, 0, NULL, 0)
+
+#define RTMP_DRIVER_PCI_RESUME(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_PCI_RESUME, 0, NULL, 0)
+
+#define RTMP_DRIVER_PCI_CSR_SET(__pAd, __Address) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_PCI_CSR_SET, 0, NULL, __Address)
+
+#define RTMP_DRIVER_PCIE_INIT(__pAd, __pPciDev) \
+{ \
+ RT_CMD_PCIE_INIT __Config, *__pConfig = &__Config; \
+ __pConfig->pPciDev = __pPciDev; \
+ __pConfig->ConfigDeviceID = PCI_DEVICE_ID; \
+ __pConfig->ConfigSubsystemVendorID = PCI_SUBSYSTEM_VENDOR_ID; \
+ __pConfig->ConfigSubsystemID = PCI_SUBSYSTEM_ID; \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_PCIE_INIT, 0, __pConfig, 0);\
+}
+
+/* usb */
+#define RTMP_DRIVER_USB_MORE_FLAG_SET(__pAd, __pConfig) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_USB_MORE_FLAG_SET, 0, __pConfig, 0)
+
+#define RTMP_DRIVER_USB_CONFIG_INIT(__pAd, __pConfig) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_USB_CONFIG_INIT, 0, __pConfig, 0)
+
+#define RTMP_DRIVER_USB_SUSPEND(__pAd, __bIsRunning) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_USB_SUSPEND, 0, NULL, __bIsRunning)
+
+#define RTMP_DRIVER_USB_RESUME(__pAd) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_USB_RESUME, 0, NULL, 0)
+
+/* ap */
+#define RTMP_DRIVER_AP_BITRATE_GET(__pAd, __pConfig) \
+ RTMP_AP_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_AP_SIOCGIWRATEQ, 0, __pConfig, 0)
+
+#define RTMP_DRIVER_AP_MAIN_OPEN(__pAd) \
+ RTMP_AP_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_MAIN_OPEN, 0, NULL, 0)
+
+/* sta */
+#define RTMP_DRIVER_STA_DEV_TYPE_SET(__pAd, __Type) \
+ RTMP_STA_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ORI_DEV_TYPE_SET, 0, NULL, __Type, __Type)
+
+#define RTMP_DRIVER_MAC_ADDR_GET(__pAd, __pMacAddr) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_MAC_ADDR_GET, 0, __pMacAddr, 0)
+
+#define RTMP_DRIVER_ADAPTER_CSO_SUPPORT_TEST(__pAd, __flag) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ADAPTER_CSO_SUPPORT_TEST, 0, __flag, 0)
+
+#define RTMP_DRIVER_ADAPTER_TSO_SUPPORT_TEST(__pAd, __flag) \
+ RTMP_COM_IoctlHandle(__pAd, NULL, CMD_RTPRIV_IOCTL_ADAPTER_TSO_SUPPORT_TEST, 0, __flag, 0)
+
+#endif /* __RT_OS_NET_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/rt_os_util.h b/cleopatre/devkit/mt7601udrv/include/rt_os_util.h
new file mode 100644
index 0000000000..cecc103ecf
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rt_os_util.h
@@ -0,0 +1,1003 @@
+/****************************************************************************
+
+ Module Name:
+ rt_os_util.h
+
+ Abstract:
+ All function prototypes are provided from UTIL modules.
+
+ Note:
+ But can not use any OS key word and compile option here.
+ All functions are provided from UTIL modules.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+
+***************************************************************************/
+
+#ifndef __RT_OS_UTIL_H__
+#define __RT_OS_UTIL_H__
+
+/* ============================ rt_linux.c ================================== */
+/* General */
+VOID RtmpUtilInit(VOID);
+
+/* OS Time */
+VOID RTMPusecDelay(
+ IN ULONG usec);
+
+VOID RtmpOsUsDelay(ULONG value);
+
+VOID RtmpOsMsDelay(
+ IN ULONG msec);
+
+void RTMP_GetCurrentSystemTime(
+ IN LARGE_INTEGER *time);
+
+void RTMP_GetCurrentSystemTick(
+ IN ULONG *pNow);
+
+VOID RtmpOsWait(
+ IN UINT32 Time);
+
+UINT32 RtmpOsTimerAfter(
+ IN ULONG a,
+ IN ULONG b);
+
+UINT32 RtmpOsTimerBefore(
+ IN ULONG a,
+ IN ULONG b);
+
+VOID RtmpOsGetSystemUpTime(
+ IN ULONG *pTime);
+
+UINT32 RtmpOsTickUnitGet(VOID);
+
+/* OS Memory */
+NDIS_STATUS os_alloc_mem(
+ IN VOID *pReserved,
+ OUT UCHAR **mem,
+ IN ULONG size);
+
+NDIS_STATUS os_alloc_mem_suspend(
+ IN VOID *pReserved,
+ OUT UCHAR **mem,
+ IN ULONG size);
+
+NDIS_STATUS os_free_mem(
+ IN VOID *pReserved,
+ IN PVOID mem);
+
+NDIS_STATUS AdapterBlockAllocateMemory(
+ IN PVOID handle,
+ OUT PVOID *ppAd,
+ IN UINT32 SizeOfpAd);
+
+VOID *RtmpOsVmalloc(
+ IN ULONG Size);
+
+VOID RtmpOsVfree(
+ IN VOID *pMem);
+
+ULONG RtmpOsCopyFromUser(
+ OUT VOID *to,
+ IN const void *from,
+ IN ULONG n);
+
+ULONG RtmpOsCopyToUser(
+ OUT VOID *to,
+ IN const void *from,
+ IN ULONG n);
+
+BOOLEAN RtmpOsStatsAlloc(
+ IN VOID **ppStats,
+ IN VOID **ppIwStats);
+
+/* OS Packet */
+PNDIS_PACKET RtmpOSNetPktAlloc(
+ IN VOID *pReserved,
+ IN int size);
+
+PNDIS_PACKET RTMP_AllocateFragPacketBuffer(
+ IN VOID *pReserved,
+ IN ULONG Length);
+
+NDIS_STATUS RTMPAllocateNdisPacket(
+ IN VOID *pReserved,
+ OUT PNDIS_PACKET *ppPacket,
+ IN PUCHAR pHeader,
+ IN UINT HeaderLen,
+ IN PUCHAR pData,
+ IN UINT DataLen);
+
+VOID RTMPFreeNdisPacket(
+ IN VOID *pReserved,
+ IN PNDIS_PACKET pPacket);
+
+NDIS_STATUS Sniff2BytesFromNdisBuffer(
+ IN PNDIS_BUFFER pFirstBuffer,
+ IN UCHAR DesiredOffset,
+ OUT PUCHAR pByte0,
+ OUT PUCHAR pByte1);
+
+void RTMP_QueryPacketInfo(
+ IN PNDIS_PACKET pPacket,
+ OUT PACKET_INFO *pPacketInfo,
+ OUT PUCHAR *pSrcBufVA,
+ OUT UINT *pSrcBufLen);
+
+PNDIS_PACKET DuplicatePacket(
+ IN PNET_DEV pNetDev,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR FromWhichBSSID);
+
+PNDIS_PACKET duplicate_pkt(
+ IN PNET_DEV pNetDev,
+ IN PUCHAR pHeader802_3,
+ IN UINT HdrLen,
+ IN PUCHAR pData,
+ IN ULONG DataSize,
+ IN UCHAR FromWhichBSSID);
+
+PNDIS_PACKET duplicate_pkt_with_TKIP_MIC(
+ IN VOID *pReserved,
+ IN PNDIS_PACKET pOldPkt);
+
+PNDIS_PACKET duplicate_pkt_with_VLAN(
+ IN PNET_DEV pNetDev,
+ IN USHORT VLAN_VID,
+ IN USHORT VLAN_Priority,
+ IN PUCHAR pHeader802_3,
+ IN UINT HdrLen,
+ IN PUCHAR pData,
+ IN ULONG DataSize,
+ IN UCHAR FromWhichBSSID,
+ IN UCHAR *TPID);
+
+typedef void (*RTMP_CB_8023_PACKET_ANNOUNCE)(
+ IN VOID *pCtrlBkPtr,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR OpMode);
+
+BOOLEAN RTMPL2FrameTxAction(
+ IN VOID *pCtrlBkPtr,
+ IN PNET_DEV pNetDev,
+ IN RTMP_CB_8023_PACKET_ANNOUNCE _announce_802_3_packet,
+ IN UCHAR apidx,
+ IN PUCHAR pData,
+ IN UINT32 data_len,
+ IN UCHAR OpMode);
+
+PNDIS_PACKET ExpandPacket(
+ IN VOID *pReserved,
+ IN PNDIS_PACKET pPacket,
+ IN UINT32 ext_head_len,
+ IN UINT32 ext_tail_len);
+
+PNDIS_PACKET ClonePacket(
+ IN VOID *pReserved,
+ IN PNDIS_PACKET pPacket,
+ IN PUCHAR pData,
+ IN ULONG DataSize);
+
+void wlan_802_11_to_802_3_packet(
+ IN PNET_DEV pNetDev,
+ IN UCHAR OpMode,
+ IN USHORT VLAN_VID,
+ IN USHORT VLAN_Priority,
+ IN PNDIS_PACKET pRxPacket,
+ IN UCHAR *pData,
+ IN ULONG DataSize,
+ IN PUCHAR pHeader802_3,
+ IN UCHAR FromWhichBSSID,
+ IN UCHAR *TPID);
+
+#ifdef HDR_TRANS_SUPPORT
+VOID RtmpOsSetPacket(
+ IN PNET_DEV pNetDev,
+ IN PNDIS_PACKET pRxPacket,
+ IN UCHAR *pData,
+ IN ULONG DataSize);
+#endif /* HDR_TRANS_SUPPORT */
+
+void send_monitor_packets(
+ IN PNET_DEV pNetDev,
+ IN PNDIS_PACKET pRxPacket,
+ IN PHEADER_802_11 pHeader,
+ IN UCHAR *pData,
+ IN USHORT DataSize,
+ IN UCHAR L2PAD,
+ IN UCHAR PHYMODE,
+ IN UCHAR BW,
+ IN UCHAR ShortGI,
+ IN UCHAR MCS,
+ IN UCHAR AMPDU,
+ IN UCHAR STBC,
+ IN UCHAR RSSI1,
+ IN UCHAR BssMonitorFlag11n,
+ IN UCHAR *pDevName,
+ IN UCHAR Channel,
+ IN UCHAR CentralChannel,
+ IN UINT32 MaxRssi);
+
+UCHAR VLAN_8023_Header_Copy(
+ IN USHORT VLAN_VID,
+ IN USHORT VLAN_Priority,
+ IN PUCHAR pHeader802_3,
+ IN UINT HdrLen,
+ OUT PUCHAR pData,
+ IN UCHAR FromWhichBSSID,
+ IN UCHAR *TPID);
+
+VOID RtmpOsPktBodyCopy(
+ IN PNET_DEV pNetDev,
+ IN PNDIS_PACKET pNetPkt,
+ IN ULONG ThisFrameLen,
+ IN PUCHAR pData);
+
+INT RtmpOsIsPktCloned(
+ IN PNDIS_PACKET pNetPkt);
+
+PNDIS_PACKET RtmpOsPktCopy(
+ IN PNDIS_PACKET pNetPkt);
+
+PNDIS_PACKET RtmpOsPktClone(
+ IN PNDIS_PACKET pNetPkt);
+
+VOID RtmpOsPktDataPtrAssign(
+ IN PNDIS_PACKET pNetPkt,
+ IN UCHAR *pData);
+
+VOID RtmpOsPktLenAssign(
+ IN PNDIS_PACKET pNetPkt,
+ IN LONG Len);
+
+VOID RtmpOsPktTailAdjust(
+ IN PNDIS_PACKET pNetPkt,
+ IN UINT removedTagLen);
+
+PUCHAR RtmpOsPktTailBufExtend(
+ IN PNDIS_PACKET pNetPkt,
+ IN UINT Len);
+
+PUCHAR RtmpOsPktHeadBufExtend(
+ IN PNDIS_PACKET pNetPkt,
+ IN UINT Len);
+
+VOID RtmpOsPktReserve(
+ IN PNDIS_PACKET pNetPkt,
+ IN UINT Len);
+
+VOID RtmpOsPktProtocolAssign(
+ IN PNDIS_PACKET pNetPkt);
+
+VOID RtmpOsPktInfPpaSend(
+ IN PNDIS_PACKET pNetPkt);
+
+VOID RtmpOsPktRcvHandle(
+ IN PNDIS_PACKET pNetPkt);
+
+VOID RtmpOsPktNatMagicTag(
+ IN PNDIS_PACKET pNetPkt);
+
+VOID RtmpOsPktNatNone(
+ IN PNDIS_PACKET pNetPkt);
+
+VOID RtmpOsPktInit(
+ IN PNDIS_PACKET pNetPkt,
+ IN PNET_DEV pNetDev,
+ IN UCHAR *pData,
+ IN USHORT DataSize);
+
+PNDIS_PACKET RtmpOsPktIappMakeUp(
+ IN PNET_DEV pNetDev,
+ IN UINT8 *pMac);
+
+BOOLEAN RtmpOsPktOffsetInit(VOID);
+
+UINT16 RtmpOsNtohs(
+ IN UINT16 Value);
+
+UINT16 RtmpOsHtons(
+ IN UINT16 Value);
+
+UINT32 RtmpOsNtohl(
+ IN UINT32 Value);
+
+UINT32 RtmpOsHtonl(
+ IN UINT32 Value);
+
+/* OS File */
+RTMP_OS_FD RtmpOSFileOpen(char *pPath, int flag, int mode);
+int RtmpOSFileClose(RTMP_OS_FD osfd);
+void RtmpOSFileSeek(RTMP_OS_FD osfd, int offset);
+int RtmpOSFileRead(RTMP_OS_FD osfd, char *pDataPtr, int readLen);
+int RtmpOSFileWrite(RTMP_OS_FD osfd, char *pDataPtr, int writeLen);
+
+INT32 RtmpOsFileIsErr(
+ IN VOID *pFile);
+
+void RtmpOSFSInfoChange(
+ IN RTMP_OS_FS_INFO *pOSFSInfoOrg,
+ IN BOOLEAN bSet);
+
+/* OS Network Interface */
+int RtmpOSNetDevAddrSet(
+ IN UCHAR OpMode,
+ IN PNET_DEV pNetDev,
+ IN PUCHAR pMacAddr,
+ IN PUCHAR dev_name);
+
+void RtmpOSNetDevClose(
+ IN PNET_DEV pNetDev);
+
+void RtmpOSNetDevFree(
+ IN PNET_DEV pNetDev);
+
+INT RtmpOSNetDevAlloc(
+ IN PNET_DEV *new_dev_p,
+ IN UINT32 privDataSize);
+
+INT RtmpOSNetDevOpsAlloc(
+ IN PVOID *pNetDevOps);
+
+
+PNET_DEV RtmpOSNetDevGetByName(
+ IN PNET_DEV pNetDev,
+ IN PSTRING pDevName);
+
+void RtmpOSNetDeviceRefPut(
+ IN PNET_DEV pNetDev);
+
+INT RtmpOSNetDevDestory(
+ IN VOID *pReserved,
+ IN PNET_DEV pNetDev);
+
+void RtmpOSNetDevDetach(
+ IN PNET_DEV pNetDev);
+
+int RtmpOSNetDevAttach(
+ IN UCHAR OpMode,
+ IN PNET_DEV pNetDev,
+ IN RTMP_OS_NETDEV_OP_HOOK *pDevOpHook);
+
+void RtmpOSNetDevProtect(
+ IN BOOLEAN lock_it);
+
+PNET_DEV RtmpOSNetDevCreate(
+ IN INT32 MC_RowID,
+ IN UINT32 *pIoctlIF,
+ IN INT devType,
+ IN INT devNum,
+ IN INT privMemSize,
+ IN PSTRING pNamePrefix);
+
+BOOLEAN RtmpOSNetDevIsUp(
+ IN VOID *pDev);
+
+unsigned char *RtmpOsNetDevGetPhyAddr(
+ IN VOID *pDev);
+
+VOID RtmpOsNetQueueStart(
+ IN PNET_DEV pDev);
+
+VOID RtmpOsNetQueueStop(
+ IN PNET_DEV pDev);
+
+VOID RtmpOsNetQueueWake(
+ IN PNET_DEV pDev);
+
+VOID RtmpOsSetPktNetDev(
+ IN VOID *pPkt,
+ IN VOID *pDev);
+
+PNET_DEV RtmpOsPktNetDevGet(
+ IN VOID *pPkt);
+
+char *RtmpOsGetNetDevName(
+ IN VOID *pDev);
+
+VOID RtmpOsSetNetDevPriv(
+ IN VOID *pDev,
+ IN VOID *pPriv);
+
+VOID *RtmpOsGetNetDevPriv(
+ IN VOID *pDev);
+
+USHORT RtmpDevPrivFlagsGet(
+ IN VOID *pDev);
+
+VOID RtmpDevPrivFlagsSet(
+ IN VOID *pDev,
+ IN USHORT PrivFlags);
+
+VOID RtmpOsSetNetDevType(VOID *pDev, USHORT Type);
+
+VOID RtmpOsSetNetDevTypeMonitor(VOID *pDev);
+
+
+/* OS Semaphore */
+VOID RtmpOsCmdUp(RTMP_OS_TASK *pCmdQTask);
+BOOLEAN RtmpOsSemaInitLocked(RTMP_OS_SEM *pSemOrg, LIST_HEADER *pSemList);
+BOOLEAN RtmpOsSemaInit(RTMP_OS_SEM *pSemOrg, LIST_HEADER *pSemList);
+BOOLEAN RtmpOsSemaDestory(RTMP_OS_SEM *pSemOrg);
+INT RtmpOsSemaWaitInterruptible(RTMP_OS_SEM *pSemOrg);
+VOID RtmpOsSemaWakeUp(RTMP_OS_SEM *pSemOrg);
+VOID RtmpOsMlmeUp(RTMP_OS_TASK *pMlmeQTask);
+
+/* OS Task */
+BOOLEAN RtmpOsTaskletSche(RTMP_NET_TASK_STRUCT *pTasklet);
+
+BOOLEAN RtmpOsTaskletInit(
+ RTMP_NET_TASK_STRUCT *pTasklet,
+ VOID (*pFunc)(unsigned long data),
+ ULONG Data,
+ LIST_HEADER *pTaskletList);
+
+BOOLEAN RtmpOsTaskletKill(RTMP_NET_TASK_STRUCT *pTasklet);
+
+VOID RtmpOsTaskletDataAssign(
+ RTMP_NET_TASK_STRUCT *pTasklet,
+ ULONG Data);
+
+VOID RtmpOsTaskWakeUp(RTMP_OS_TASK *pTaskOrg);
+
+INT32 RtmpOsTaskIsKilled(RTMP_OS_TASK *pTaskOrg);
+
+BOOLEAN RtmpOsCheckTaskLegality(RTMP_OS_TASK *pTaskOrg);
+
+BOOLEAN RtmpOSTaskAlloc(
+ IN RTMP_OS_TASK *pTask,
+ IN LIST_HEADER *pTaskList);
+
+VOID RtmpOSTaskFree(
+ IN RTMP_OS_TASK *pTask);
+
+NDIS_STATUS RtmpOSTaskKill(
+ IN RTMP_OS_TASK *pTaskOrg);
+
+INT RtmpOSTaskNotifyToExit(
+ IN RTMP_OS_TASK *pTaskOrg);
+
+VOID RtmpOSTaskCustomize(
+ IN RTMP_OS_TASK *pTaskOrg);
+
+NDIS_STATUS RtmpOSTaskAttach(
+ IN RTMP_OS_TASK *pTaskOrg,
+ IN RTMP_OS_TASK_CALLBACK fn,
+ IN ULONG arg);
+
+NDIS_STATUS RtmpOSTaskInit(
+ IN RTMP_OS_TASK *pTaskOrg,
+ IN PSTRING pTaskName,
+ IN VOID *pPriv,
+ IN LIST_HEADER *pTaskList,
+ IN LIST_HEADER *pSemList);
+
+BOOLEAN RtmpOSTaskWait(
+ IN VOID *pReserved,
+ IN RTMP_OS_TASK *pTaskOrg,
+ IN INT32 *pStatus);
+
+VOID *RtmpOsTaskDataGet(RTMP_OS_TASK *pTaskOrg);
+
+INT32 RtmpThreadPidKill(RTMP_OS_PID PID);
+
+/* OS Cache */
+VOID RtmpOsDCacheFlush(ULONG AddrStart, ULONG Size);
+
+/* OS Timer */
+VOID RTMP_SetPeriodicTimer(
+ IN NDIS_MINIPORT_TIMER *pTimerOrg,
+ IN unsigned long timeout);
+
+VOID RTMP_OS_Init_Timer(
+ IN VOID *pReserved,
+ IN NDIS_MINIPORT_TIMER *pTimerOrg,
+ IN TIMER_FUNCTION function,
+ IN PVOID data,
+ IN LIST_HEADER *pTimerList);
+
+VOID RTMP_OS_Add_Timer(
+ IN NDIS_MINIPORT_TIMER *pTimerOrg,
+ IN unsigned long timeout);
+
+VOID RTMP_OS_Mod_Timer(
+ IN NDIS_MINIPORT_TIMER *pTimerOrg,
+ IN unsigned long timeout);
+
+VOID RTMP_OS_Del_Timer(
+ IN NDIS_MINIPORT_TIMER *pTimerOrg,
+ OUT BOOLEAN *pCancelled);
+
+VOID RTMP_OS_Release_Timer(
+ IN NDIS_MINIPORT_TIMER *pTimerOrg);
+
+BOOLEAN RTMP_OS_Alloc_Rsc(
+ IN LIST_HEADER *pRscList,
+ IN VOID *pRsc,
+ IN UINT32 RscLen);
+
+VOID RTMP_OS_Free_Rscs(
+ IN LIST_HEADER *pRscList);
+
+/* OS Lock */
+BOOLEAN RtmpOsAllocateLock(
+ IN NDIS_SPIN_LOCK *pLock,
+ IN LIST_HEADER *pLockList);
+
+VOID RtmpOsFreeSpinLock(
+ IN NDIS_SPIN_LOCK *pLockOrg);
+
+VOID RtmpOsSpinLockBh(
+ IN NDIS_SPIN_LOCK *pLockOrg);
+
+VOID RtmpOsSpinUnLockBh(NDIS_SPIN_LOCK *pLockOrg);
+VOID RtmpOsIntLock(NDIS_SPIN_LOCK *pLockOrg, ULONG *pIrqFlags);
+VOID RtmpOsIntUnLock(NDIS_SPIN_LOCK *pLockOrg, ULONG IrqFlags);
+
+/* OS PID */
+VOID RtmpOsGetPid(ULONG *pDst, ULONG PID);
+VOID RtmpOsTaskPidInit(RTMP_OS_PID *pPid);
+
+/* OS I/O */
+VOID RTMP_PCI_Writel(ULONG Value, VOID *pAddr);
+VOID RTMP_PCI_Writew(ULONG Value, VOID *pAddr);
+VOID RTMP_PCI_Writeb(ULONG Value, VOID *pAddr);
+ULONG RTMP_PCI_Readl(VOID *pAddr);
+ULONG RTMP_PCI_Readw(VOID *pAddr);
+ULONG RTMP_PCI_Readb(VOID *pAddr);
+
+int RtmpOsPciConfigReadWord(
+ IN VOID *pDev,
+ IN UINT32 Offset,
+ OUT UINT16 *pValue);
+
+int RtmpOsPciConfigWriteWord(
+ IN VOID *pDev,
+ IN UINT32 Offset,
+ IN UINT16 Value);
+
+int RtmpOsPciConfigReadDWord(
+ IN VOID *pDev,
+ IN UINT32 Offset,
+ OUT UINT32 *pValue);
+
+int RtmpOsPciConfigWriteDWord(
+ IN VOID *pDev,
+ IN UINT32 Offset,
+ IN UINT32 Value);
+
+int RtmpOsPciFindCapability(
+ IN VOID *pDev,
+ IN int Cap);
+
+VOID *RTMPFindHostPCIDev(VOID *pPciDevSrc);
+
+int RtmpOsPciMsiEnable(VOID *pDev);
+VOID RtmpOsPciMsiDisable(VOID *pDev);
+
+/* OS Wireless */
+ULONG RtmpOsMaxScanDataGet(VOID);
+
+/* OS Interrutp */
+INT32 RtmpOsIsInInterrupt(VOID);
+
+/* OS USB */
+VOID *RtmpOsUsbUrbDataGet(VOID *pUrb);
+NTSTATUS RtmpOsUsbUrbStatusGet(VOID *pUrb);
+ULONG RtmpOsUsbUrbLenGet(VOID *pUrb);
+
+/* OS Atomic */
+BOOLEAN RtmpOsAtomicInit(RTMP_OS_ATOMIC *pAtomic, LIST_HEADER *pAtomicList);
+VOID RtmpOsAtomicDestroy(RTMP_OS_ATOMIC *pAtomic);
+LONG RtmpOsAtomicRead(RTMP_OS_ATOMIC *pAtomic);
+VOID RtmpOsAtomicDec(RTMP_OS_ATOMIC *pAtomic);
+VOID RtmpOsAtomicInterlockedExchange(RTMP_OS_ATOMIC *pAtomicSrc, LONG Value);
+
+/* OS Utility */
+void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen);
+
+typedef VOID (*RTMP_OS_SEND_WLAN_EVENT)(
+ IN VOID *pAdSrc,
+ IN USHORT Event_flag,
+ IN PUCHAR pAddr,
+ IN UCHAR BssIdx,
+ IN CHAR Rssi);
+
+VOID RtmpOsSendWirelessEvent(
+ IN VOID *pAd,
+ IN USHORT Event_flag,
+ IN PUCHAR pAddr,
+ IN UCHAR BssIdx,
+ IN CHAR Rssi,
+ IN RTMP_OS_SEND_WLAN_EVENT pFunc);
+
+#ifdef CONFIG_AP_SUPPORT
+void SendSignalToDaemon(
+ IN INT sig,
+ IN RTMP_OS_PID pid,
+ IN unsigned long pid_no);
+#endif /* CONFIG_AP_SUPPORT */
+
+int RtmpOSWrielessEventSend(
+ IN PNET_DEV pNetDev,
+ IN UINT32 eventType,
+ IN INT flags,
+ IN PUCHAR pSrcMac,
+ IN PUCHAR pData,
+ IN UINT32 dataLen);
+
+int RtmpOSWrielessEventSendExt(
+ IN PNET_DEV pNetDev,
+ IN UINT32 eventType,
+ IN INT flags,
+ IN PUCHAR pSrcMac,
+ IN PUCHAR pData,
+ IN UINT32 dataLen,
+ IN UINT32 family);
+
+UINT RtmpOsWirelessExtVerGet(VOID);
+
+VOID RtmpDrvAllMacPrint(
+ IN VOID *pReserved,
+ IN UINT32 *pBufMac,
+ IN UINT32 AddrStart,
+ IN UINT32 AddrEnd,
+ IN UINT32 AddrStep);
+
+VOID RtmpDrvAllE2PPrint(
+ IN VOID *pReserved,
+ IN USHORT *pMacContent,
+ IN UINT32 AddrEnd,
+ IN UINT32 AddrStep);
+
+VOID RtmpDrvAllRFPrint(
+ IN VOID *pReserved,
+ IN UINT32 *pBuf,
+ IN UINT32 BufLen);
+
+int RtmpOSIRQRelease(
+ IN PNET_DEV pNetDev,
+ IN UINT32 infType,
+ IN PPCI_DEV pci_dev,
+ IN BOOLEAN *pHaveMsi);
+
+VOID RtmpOsWlanEventSet(
+ IN VOID *pReserved,
+ IN BOOLEAN *pCfgWEnt,
+ IN BOOLEAN FlgIsWEntSup);
+
+UINT16 RtmpOsGetUnaligned(UINT16 *pWord);
+
+UINT32 RtmpOsGetUnaligned32(UINT32 *pWord);
+
+ULONG RtmpOsGetUnalignedlong(ULONG *pWord);
+
+long RtmpOsSimpleStrtol(
+ IN const char *cp,
+ IN char **endp,
+ IN unsigned int base);
+
+VOID RtmpOsOpsInit(RTMP_OS_ABL_OPS *pOps);
+
+/* ============================ rt_os_util.c ================================ */
+VOID RtmpDrvMaxRateGet(
+ IN VOID *pReserved,
+ IN UINT8 MODE,
+ IN UINT8 ShortGI,
+ IN UINT8 BW,
+ IN UINT8 MCS,
+ OUT UINT32 *pRate);
+
+char * rtstrchr(const char * s, int c);
+
+PSTRING WscGetAuthTypeStr(USHORT authFlag);
+
+PSTRING WscGetEncryTypeStr(USHORT encryFlag);
+
+USHORT WscGetAuthTypeFromStr(PSTRING arg);
+
+USHORT WscGetEncrypTypeFromStr(PSTRING arg);
+
+VOID RtmpMeshDown(
+ IN VOID *pDrvCtrlBK,
+ IN BOOLEAN WaitFlag,
+ IN BOOLEAN (*RtmpMeshLinkCheck)(IN VOID *pAd));
+
+USHORT RtmpOsNetPrivGet(PNET_DEV pDev);
+
+BOOLEAN RtmpOsCmdDisplayLenCheck(
+ IN UINT32 LenSrc,
+ IN UINT32 Offset);
+
+VOID WpaSendMicFailureToWpaSupplicant(
+ IN PNET_DEV pNetDev,
+ IN BOOLEAN bUnicast);
+
+int wext_notify_event_assoc(
+ IN PNET_DEV pNetDev,
+ IN UCHAR *ReqVarIEs,
+ IN UINT32 ReqVarIELen);
+
+VOID SendAssocIEsToWpaSupplicant(
+ IN PNET_DEV pNetDev,
+ IN UCHAR *ReqVarIEs,
+ IN UINT32 ReqVarIELen);
+
+PVOID RtmpInitCompletion(VOID);
+
+ULONG RtmpWaitForCompletionTimeout(VOID *Completion, ULONG Expire);
+
+VOID RtmpComplete(VOID *Completion);
+
+ULONG RtmpMsecsToJiffies(UINT32 msecs);
+/* ============================ rt_rbus_pci_util.c ========================== */
+void RtmpAllocDescBuf(
+ IN PPCI_DEV pPciDev,
+ IN UINT Index,
+ IN ULONG Length,
+ IN BOOLEAN Cached,
+ OUT VOID **VirtualAddress,
+ OUT PNDIS_PHYSICAL_ADDRESS PhysicalAddress);
+
+void RtmpFreeDescBuf(
+ IN PPCI_DEV pPciDev,
+ IN ULONG Length,
+ IN VOID *VirtualAddress,
+ IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
+
+void RTMP_AllocateFirstTxBuffer(
+ IN PPCI_DEV pPciDev,
+ IN UINT Index,
+ IN ULONG Length,
+ IN BOOLEAN Cached,
+ OUT VOID **VirtualAddress,
+ OUT PNDIS_PHYSICAL_ADDRESS PhysicalAddress);
+
+void RTMP_FreeFirstTxBuffer(
+ IN PPCI_DEV pPciDev,
+ IN ULONG Length,
+ IN BOOLEAN Cached,
+ IN PVOID VirtualAddress,
+ IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
+
+PNDIS_PACKET RTMP_AllocateRxPacketBuffer(
+ IN VOID *pReserved,
+ IN VOID *pPciDev,
+ IN ULONG Length,
+ IN BOOLEAN Cached,
+ OUT PVOID *VirtualAddress,
+ OUT PNDIS_PHYSICAL_ADDRESS PhysicalAddress);
+
+
+int rausb_autopm_put_interface (
+ IN VOID *intfsrc);
+
+int rausb_autopm_get_interface (
+ IN VOID *intfsrc);
+
+ra_dma_addr_t linux_pci_map_single(void *pPciDev, void *ptr, size_t size, int sd_idx, int direction);
+
+void linux_pci_unmap_single(void *pPciDev, ra_dma_addr_t dma_addr, size_t size, int direction);
+
+/* ============================ rt_usb_util.c =============================== */
+#ifdef RTMP_MAC_USB
+void dump_urb(VOID *purb);
+
+int rausb_register(VOID * new_driver);
+
+void rausb_deregister(VOID * driver);
+
+/*struct urb *rausb_alloc_urb(int iso_packets); */
+
+void rausb_free_urb(VOID *urb);
+
+void rausb_put_dev(VOID *dev);
+
+struct usb_device *rausb_get_dev(VOID *dev);
+
+int rausb_submit_urb(VOID *urb);
+
+void *rausb_buffer_alloc(VOID *dev,
+ size_t size,
+ ra_dma_addr_t *dma);
+
+void rausb_buffer_free(VOID *dev,
+ size_t size,
+ void *addr,
+ ra_dma_addr_t dma);
+
+int rausb_control_msg(VOID *dev,
+ unsigned int pipe,
+ __u8 request,
+ __u8 requesttype,
+ __u16 value,
+ __u16 index,
+ void *data,
+ __u16 size,
+ int timeout);
+
+unsigned int rausb_sndctrlpipe(VOID *dev, ULONG address);
+
+unsigned int rausb_rcvctrlpipe(VOID *dev, ULONG address);
+
+void rausb_kill_urb(VOID *urb);
+
+VOID RtmpOsUsbEmptyUrbCheck(
+ IN VOID **ppWait,
+ IN NDIS_SPIN_LOCK *pBulkInLock,
+ IN UCHAR *pPendingRx);
+
+typedef VOID (*USB_COMPLETE_HANDLER)(VOID *);
+
+VOID RtmpOsUsbInitHTTxDesc(
+ IN VOID *pUrbSrc,
+ IN VOID *pUsb_Dev,
+ IN UINT BulkOutEpAddr,
+ IN PUCHAR pSrc,
+ IN ULONG BulkOutSize,
+ IN USB_COMPLETE_HANDLER Func,
+ IN VOID *pTxContext,
+ IN ra_dma_addr_t TransferDma);
+
+VOID RtmpOsUsbInitRxDesc(
+ IN VOID *pUrbSrc,
+ IN VOID *pUsb_Dev,
+ IN UINT BulkInEpAddr,
+ IN UCHAR *pTransferBuffer,
+ IN UINT32 BufSize,
+ IN USB_COMPLETE_HANDLER Func,
+ IN VOID *pRxContext,
+ IN ra_dma_addr_t TransferDma);
+
+VOID *RtmpOsUsbContextGet(
+ IN VOID *pUrb);
+
+NTSTATUS RtmpOsUsbStatusGet(
+ IN VOID *pUrb);
+
+VOID RtmpOsUsbDmaMapping(
+ IN VOID *pUrb);
+#endif /* RTMP_MAC_USB */
+
+#if defined(RTMP_RBUS_SUPPORT) || defined(RTMP_FLASH_SUPPORT)
+void RtmpFlashRead(
+ UCHAR * p,
+ ULONG a,
+ ULONG b);
+
+void RtmpFlashWrite(
+ UCHAR * p,
+ ULONG a,
+ ULONG b);
+#endif /* defined(RTMP_RBUS_SUPPORT) || defined(RTMP_FLASH_SUPPORT) */
+
+UINT32 RtmpOsGetUsbDevVendorID(
+ IN VOID *pUsbDev);
+
+UINT32 RtmpOsGetUsbDevProductID(
+ IN VOID *pUsbDev);
+
+/* CFG80211 */
+#ifdef RT_CFG80211_SUPPORT
+typedef struct __CFG80211_BAND {
+
+ UINT8 RFICType;
+ UINT8 MpduDensity;
+ UINT8 TxStream;
+ UINT8 RxStream;
+ UINT32 MaxTxPwr;
+ UINT32 MaxBssTable;
+
+ UINT16 RtsThreshold;
+ UINT16 FragmentThreshold;
+ UINT32 RetryMaxCnt; /* bit0~7: short; bit8 ~ 15: long */
+ BOOLEAN FlgIsBMode;
+} CFG80211_BAND;
+
+VOID CFG80211OS_UnRegister(
+ IN VOID *pCB,
+ IN VOID *pNetDev);
+
+BOOLEAN CFG80211_SupBandInit(
+ IN VOID *pCB,
+ IN CFG80211_BAND *pBandInfo,
+ IN VOID *pWiphyOrg,
+ IN VOID *pChannelsOrg,
+ IN VOID *pRatesOrg);
+
+BOOLEAN CFG80211OS_SupBandReInit(
+ IN VOID *pCB,
+ IN CFG80211_BAND *pBandInfo);
+
+VOID CFG80211OS_RegHint(
+ IN VOID *pCB,
+ IN UCHAR *pCountryIe,
+ IN ULONG CountryIeLen);
+
+VOID CFG80211OS_RegHint11D(
+ IN VOID *pCB,
+ IN UCHAR *pCountryIe,
+ IN ULONG CountryIeLen);
+
+BOOLEAN CFG80211OS_BandInfoGet(
+ IN VOID *pCB,
+ IN VOID *pWiphyOrg,
+ OUT VOID **ppBand24,
+ OUT VOID **ppBand5);
+
+UINT32 CFG80211OS_ChanNumGet(
+ IN VOID *pCB,
+ IN VOID *pWiphyOrg,
+ IN UINT32 IdBand);
+
+BOOLEAN CFG80211OS_ChanInfoGet(
+ IN VOID *pCB,
+ IN VOID *pWiphyOrg,
+ IN UINT32 IdBand,
+ IN UINT32 IdChan,
+ OUT UINT32 *pChanId,
+ OUT UINT32 *pPower,
+ OUT BOOLEAN *pFlgIsRadar);
+
+BOOLEAN CFG80211OS_ChanInfoInit(
+ IN VOID *pCB,
+ IN UINT32 InfoIndex,
+ IN UCHAR ChanId,
+ IN UCHAR MaxTxPwr,
+ IN BOOLEAN FlgIsNMode,
+ IN BOOLEAN FlgIsBW20M);
+
+VOID CFG80211OS_Scaning(
+ IN VOID *pCB,
+ IN UINT32 ChanId,
+ IN UCHAR *pFrame,
+ IN UINT32 FrameLen,
+ IN INT32 RSSI,
+ IN BOOLEAN FlgIsNMode,
+ IN UINT8 BW);
+
+VOID CFG80211OS_ScanEnd(
+ IN VOID *pCB,
+ IN BOOLEAN FlgIsAborted);
+
+void CFG80211OS_ConnectResultInform(
+ IN VOID *pCB,
+ IN UCHAR *pBSSID,
+ IN UCHAR *pReqIe,
+ IN UINT32 ReqIeLen,
+ IN UCHAR *pRspIe,
+ IN UINT32 RspIeLen,
+ IN UCHAR FlgIsSuccess);
+#endif /* RT_CFG80211_SUPPORT */
+
+
+
+
+/* ================================ MACRO =================================== */
+#define RTMP_UTIL_DCACHE_FLUSH(__AddrStart, __Size)
+
+/* ================================ EXTERN ================================== */
+extern UCHAR SNAP_802_1H[6];
+extern UCHAR SNAP_BRIDGE_TUNNEL[6];
+extern UCHAR EAPOL[2];
+extern UCHAR TPID[];
+extern UCHAR IPX[2];
+extern UCHAR APPLE_TALK[2];
+extern UCHAR NUM_BIT8[8];
+extern ULONG RTPktOffsetData, RTPktOffsetLen, RTPktOffsetCB;
+
+extern ULONG OS_NumOfMemAlloc, OS_NumOfMemFree;
+
+extern INT32 ralinkrate[];
+extern UINT32 RT_RateSize;
+
+#ifdef PLATFORM_UBM_IPX8
+#include "vrut_ubm.h"
+#endif /* PLATFORM_UBM_IPX8 */
+
+INT32 RtPrivIoctlSetVal(VOID);
+
+#endif /* __RT_OS_UTIL_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rt_txbf.h b/cleopatre/devkit/mt7601udrv/include/rt_txbf.h
new file mode 100644
index 0000000000..33d5b3a115
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rt_txbf.h
@@ -0,0 +1,215 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2009, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ cmm_txbf.c
+
+ Abstract:
+ Tx Beamforming related constants and data structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Shiang 2010/06/29
+*/
+
+
+#ifndef _RT_TXBF_H_
+#define _RT_TXBF_H_
+
+#ifdef TXBF_SUPPORT
+
+//#define MRQ_FORCE_TX //Force MRQ regardless the capability of the station
+
+
+// TxSndgPkt Sounding type definitions
+#define SNDG_TYPE_DISABLE 0
+#define SNDG_TYPE_SOUNDING 1
+#define SNDG_TYPE_NDP 2
+
+// Explicit TxBF feedback mechanism
+#define ETXBF_FB_DISABLE 0
+#define ETXBF_FB_CSI 1
+#define ETXBF_FB_NONCOMP 2
+#define ETXBF_FB_COMP 4
+
+
+//#define MRQ_FORCE_TX //Force MRQ regardless the capability of the station
+
+/*
+ eTxBfEnCond values:
+ 0:no etxbf,
+ 1:etxbf update periodically,
+ 2:etxbf updated if mcs changes in RateSwitchingAdapt() or APQuickResponeForRateUpExecAdapt().
+ 3:auto-selection: if mfb changes or timer expires, then send sounding packets <------not finished yet!!!
+ note:
+ when = 1 or 3, NO_SNDG_CNT_THRD controls the frequency to update the
+ matrix(ETXBF_EN_COND=1) or activate the whole bf evaluation process(not defined)
+*/
+
+// Defines to include optional code.
+// NOTE: Do not define these options. ETxBfEnCond==3 and
+// MCS Feedback are not fully implemented
+//#define ETXBF_EN_COND3_SUPPORT // Include ETxBfEnCond==3 code
+//#define MFB_SUPPORT // Include MCS Feedback code
+
+// MCS FB definitions
+#define MSI_TOGGLE_BF 6
+#define TOGGLE_BF_PKTS 5// the number of packets with inverted BF status
+
+// TXBF State definitions
+#define READY_FOR_SNDG0 0//jump to WAIT_SNDG_FB0 when channel change or periodically
+#define WAIT_SNDG_FB0 1//jump to WAIT_SNDG_FB1 when bf report0 is received
+#define WAIT_SNDG_FB1 2
+#define WAIT_MFB 3
+#define WAIT_USELESS_RSP 4
+#define WAIT_BEST_SNDG 5
+
+#define NO_SNDG_CNT_THRD 0//send sndg packet if there is no sounding for (NO_SNDG_CNT_THRD+1)*500msec. If this =0, bf matrix is updated at each call of APMlmeDynamicTxRateSwitchingAdapt()
+
+
+// ------------ BEAMFORMING PROFILE HANDLING ------------
+
+#define IMP_MAX_BYTES 14 // Implicit: 14 bytes per subcarrier
+#define IMP_MAX_BYTES_ONE_COL 7 // Implicit: 7 bytes per subcarrier, when reading first column
+#define EXP_MAX_BYTES 18 // Explicit: 18 bytes per subcarrier
+#define IMP_COEFF_SIZE 9 // 9 bits/coeff
+#define IMP_COEFF_MASK 0x1FF
+
+#define PROFILE_MAX_CARRIERS_20 56 // Number of subcarriers in 20 MHz mode
+#define PROFILE_MAX_CARRIERS_40 114 // Number of subcarriers in 40 MHz mode
+
+// Indices of valid rows in Implicit and Explicit profiles for 20 and 40 MHz
+typedef struct {
+ int lwb1, upb1;
+ int lwb2, upb2;
+} SC_TABLE_ENTRY;
+
+
+typedef struct {
+ BOOLEAN impProfile;
+ BOOLEAN fortyMHz;
+ int rows, columns;
+ int grouping;
+ UCHAR tag[EXP_MAX_BYTES];
+ UCHAR data[PROFILE_MAX_CARRIERS_40][EXP_MAX_BYTES];
+} PROFILE_DATA;
+
+extern PROFILE_DATA profData;
+
+
+typedef
+struct {
+ UCHAR gBeg[2];
+ UCHAR gEnd[2];
+ UCHAR aLowBeg[2];
+ UCHAR aLowEnd[2];
+ UCHAR aMidBeg[2];
+ UCHAR aMidEnd[2];
+ UCHAR aHighBeg[2];
+ UCHAR aHighEnd[2];
+} ITXBF_PHASE_PARAMS; // ITxBF BBP reg phase calibration parameters
+
+typedef
+struct {
+ UCHAR gBeg[2];
+ UCHAR gEnd[2];
+ UCHAR aLowBeg[2];
+ UCHAR aLowEnd[2];
+ UCHAR aMidBeg[2];
+ UCHAR aMidEnd[2];
+ UCHAR aHighBeg[2];
+ UCHAR aHighEnd[2];
+} ITXBF_LNA_PARAMS; // ITxBF BBP reg LNA calibration parameters
+
+typedef
+struct {
+ UCHAR gBeg[2];
+ UCHAR gEnd[2];
+ UCHAR aLow[2];
+ UCHAR aMid[2];
+ UCHAR aHigh[2];
+} ITXBF_DIV_PARAMS; // ITxBF Divider Calibration parameters
+
+void ITxBFGetEEPROM(
+ IN RTMP_ADAPTER *pAd,
+ IN ITXBF_PHASE_PARAMS *phaseParams,
+ IN ITXBF_LNA_PARAMS *lnaParams,
+ IN ITXBF_DIV_PARAMS *divParams);
+
+INT ITxBFDividerCalibration(
+ IN RTMP_ADAPTER *pAd,
+ IN int calFunction,
+ IN int calMethod,
+ OUT UCHAR *divPhase);
+
+VOID ITxBFLoadLNAComp(
+ IN RTMP_ADAPTER *pAd);
+
+int ITxBFLNACalibration(
+ IN RTMP_ADAPTER *pAd,
+ IN int calFunction,
+ IN int calMethod,
+ IN BOOLEAN gBand);
+
+void Read_TxBfProfile(
+ IN RTMP_ADAPTER *pAd,
+ IN PROFILE_DATA *prof,
+ IN int profileNum,
+ IN BOOLEAN implicitProfile);
+
+void Write_TxBfProfile(
+ IN RTMP_ADAPTER *pAd,
+ IN PROFILE_DATA *prof,
+ IN int profileNum);
+
+void Read_TagField(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR *row,
+ IN int profileNum);
+
+// Write_TagField - write a profile tagfield
+void Write_TagField(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR *row,
+ IN int profileNum);
+
+// displayTagfield - display one tagfield
+void displayTagfield(
+ IN RTMP_ADAPTER *pAd,
+ IN int profileNum,
+ IN BOOLEAN implicitProfile);
+
+// Unpack an ITxBF matrix element from a row of bytes
+int Unpack_IBFValue(
+ IN UCHAR *row,
+ IN int elemNum);
+
+int iCalcCalibration(
+ IN RTMP_ADAPTER *pAd,
+ IN int calParams[2],
+ IN int profileNum);
+
+void ITxBFSetEEPROM(
+ IN RTMP_ADAPTER *pAd,
+ IN ITXBF_PHASE_PARAMS *phaseParams,
+ IN ITXBF_LNA_PARAMS *lnaParams,
+ IN ITXBF_DIV_PARAMS *divParams);
+
+#endif // TXBF_SUPPORT //
+
+#endif // _RT_TXBF_H_
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp.h b/cleopatre/devkit/mt7601udrv/include/rtmp.h
new file mode 100644
index 0000000000..bdaa571b82
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp.h
@@ -0,0 +1,9018 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp.h
+
+ Abstract:
+ Miniport generic portion header file
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Paul Lin 2002-08-01 created
+ James Tan 2002-09-06 modified (Revise NTCRegTable)
+ John Chang 2004-09-06 modified for RT2600
+*/
+#ifndef __RTMP_H__
+#define __RTMP_H__
+
+#include "link_list.h"
+#include "spectrum_def.h"
+
+#include "rtmp_dot11.h"
+#include "wpa_cmm.h"
+
+#ifdef CONFIG_AP_SUPPORT
+#include "ap_autoChSel_cmm.h"
+#endif /* CONFIG_AP_SUPPORT */
+
+#include "wsc.h"
+#ifdef MAT_SUPPORT
+#include "mat.h"
+#endif /* MAT_SUPPORT */
+
+
+#ifdef WAPI_SUPPORT
+#include "wapi_def.h"
+#endif /* WAPI_SUPPORT */
+
+
+
+
+
+#ifdef CLIENT_WDS
+#include "client_wds_cmm.h"
+#endif /* CLIENT_WDS */
+
+
+
+
+#ifdef WFD_SUPPORT
+#include "wfd_cmm.h"
+#endif /* WFD_SUPPORT */
+
+#include "drs_extr.h"
+
+struct _RTMP_RA_LEGACY_TB;
+
+typedef struct _RTMP_ADAPTER RTMP_ADAPTER;
+typedef struct _RTMP_ADAPTER *PRTMP_ADAPTER;
+
+typedef struct _RTMP_CHIP_OP_ RTMP_CHIP_OP;
+typedef struct _RTMP_CHIP_CAP_ RTMP_CHIP_CAP;
+
+typedef struct _UAPSD_INFO {
+ BOOLEAN bAPSDCapable;
+} UAPSD_INFO;
+
+#include "rtmp_mcu.h"
+
+#include "rtmp_M51.h"
+
+#ifdef CONFIG_ANDES_SUPPORT
+#include "rtmp_and.h"
+#endif
+
+#include "rtmp_chip.h"
+
+#include "radar.h"
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#include "cs.h"
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#ifdef DFS_SUPPORT
+#include "dfs.h"
+#endif /* DFS_SUPPORT */
+
+#ifdef LED_CONTROL_SUPPORT
+#include "rt_led.h"
+#endif /* LED_CONTROL_SUPPORT */
+
+
+#ifdef RALINK_ATE
+#include "rt_ate.h"
+#endif /* RALINK_ATE */
+
+
+/*#define DBG 1 */
+
+BOOLEAN RtmpPktPmBitCheck(
+ IN PRTMP_ADAPTER pAd);
+
+/*#define DBG_DIAGNOSE 1 */
+
+
+/*+++Used for merge MiniportMMRequest() and MiniportDataMMRequest() into one function */
+#define MAX_DATAMM_RETRY 3
+#define MGMT_USE_QUEUE_FLAG 0x80
+/*---Used for merge MiniportMMRequest() and MiniportDataMMRequest() into one function */
+/* The number of channels for per-channel Tx power offset */
+
+
+#define MAXSEQ (0xFFF)
+
+#ifdef DOT11N_SS3_SUPPORT
+#define MAX_MCS_SET 24 /* From MCS 0 ~ MCS 23 */
+#else
+#define MAX_MCS_SET 16 /* From MCS 0 ~ MCS 15 */
+#endif /* DOT11N_SS3_SUPPORT */
+
+
+#define MAX_TXPOWER_ARRAY_SIZE 5
+
+extern unsigned char CISCO_OUI[];
+extern UCHAR BaSizeArray[4];
+
+extern UCHAR BROADCAST_ADDR[MAC_ADDR_LEN];
+extern UCHAR ZERO_MAC_ADDR[MAC_ADDR_LEN];
+extern ULONG BIT32[32];
+extern char *CipherName[];
+extern UCHAR RxwiMCSToOfdmRate[12];
+extern UCHAR SNAP_802_1H[6];
+extern UCHAR SNAP_BRIDGE_TUNNEL[6];
+extern UCHAR EAPOL[2];
+extern UCHAR IPX[2];
+extern UCHAR TPID[];
+extern UCHAR APPLE_TALK[2];
+extern UCHAR OfdmRateToRxwiMCS[];
+extern UCHAR MapUserPriorityToAccessCategory[8];
+
+extern unsigned char RateIdToMbps[];
+extern USHORT RateIdTo500Kbps[];
+
+extern UCHAR CipherSuiteWpaNoneTkip[];
+extern UCHAR CipherSuiteWpaNoneTkipLen;
+
+extern UCHAR CipherSuiteWpaNoneAes[];
+extern UCHAR CipherSuiteWpaNoneAesLen;
+
+extern UCHAR SsidIe;
+extern UCHAR SupRateIe;
+extern UCHAR ExtRateIe;
+
+#ifdef DOT11_N_SUPPORT
+extern UCHAR HtCapIe;
+extern UCHAR AddHtInfoIe;
+extern UCHAR NewExtChanIe;
+extern UCHAR BssCoexistIe;
+extern UCHAR ExtHtCapIe;
+#endif /* DOT11_N_SUPPORT */
+extern UCHAR ExtCapIe;
+
+extern UCHAR ErpIe;
+extern UCHAR DsIe;
+extern UCHAR TimIe;
+extern UCHAR WpaIe;
+extern UCHAR Wpa2Ie;
+extern UCHAR IbssIe;
+extern UCHAR WapiIe;
+
+extern UCHAR WPA_OUI[];
+extern UCHAR RSN_OUI[];
+extern UCHAR WAPI_OUI[];
+extern UCHAR WME_INFO_ELEM[];
+extern UCHAR WME_PARM_ELEM[];
+extern UCHAR RALINK_OUI[];
+extern UCHAR PowerConstraintIE[];
+
+typedef union _CAPTURE_MODE_PACKET_BUFFER {
+ struct
+ {
+ UINT32 BYTE0:8;
+ UINT32 BYTE1:8;
+ UINT32 BYTE2:8;
+ UINT32 BYTE3:8;
+ } field;
+ UINT32 Value;
+}CAPTURE_MODE_PACKET_BUFFER, *PCAPTURE_MODE_PACKET_BUFFER;
+
+typedef struct _RSSI_SAMPLE {
+ CHAR LastRssi0; /* last received RSSI */
+ CHAR LastRssi1; /* last received RSSI */
+ CHAR LastRssi2; /* last received RSSI */
+ CHAR AvgRssi0;
+ CHAR AvgRssi1;
+ CHAR AvgRssi2;
+ SHORT AvgRssi0X8;
+ SHORT AvgRssi1X8;
+ SHORT AvgRssi2X8;
+ CHAR LastSnr0;
+ CHAR LastSnr1;
+ CHAR LastSnr2;
+ CHAR AvgSnr0;
+ CHAR AvgSnr1;
+ CHAR AvgSnr2;
+ SHORT AvgSnr0X8;
+ SHORT AvgSnr1X8;
+ SHORT AvgSnr2X8;
+ CHAR LastNoiseLevel0;
+ CHAR LastNoiseLevel1;
+ CHAR LastNoiseLevel2;
+} RSSI_SAMPLE;
+
+/* */
+/* Queue structure and macros */
+/* */
+#define InitializeQueueHeader(QueueHeader) \
+{ \
+ (QueueHeader)->Head = (QueueHeader)->Tail = NULL; \
+ (QueueHeader)->Number = 0; \
+}
+
+#define RemoveHeadQueue(QueueHeader) \
+(QueueHeader)->Head; \
+{ \
+ PQUEUE_ENTRY pNext; \
+ if ((QueueHeader)->Head != NULL) \
+ { \
+ pNext = (QueueHeader)->Head->Next; \
+ (QueueHeader)->Head->Next = NULL; \
+ (QueueHeader)->Head = pNext; \
+ if (pNext == NULL) \
+ (QueueHeader)->Tail = NULL; \
+ (QueueHeader)->Number--; \
+ } \
+}
+
+#define InsertHeadQueue(QueueHeader, QueueEntry) \
+{ \
+ ((PQUEUE_ENTRY)QueueEntry)->Next = (QueueHeader)->Head; \
+ (QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry); \
+ if ((QueueHeader)->Tail == NULL) \
+ (QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry); \
+ (QueueHeader)->Number++; \
+}
+
+#define InsertTailQueue(QueueHeader, QueueEntry) \
+{ \
+ ((PQUEUE_ENTRY)QueueEntry)->Next = NULL; \
+ if ((QueueHeader)->Tail) \
+ (QueueHeader)->Tail->Next = (PQUEUE_ENTRY)(QueueEntry); \
+ else \
+ (QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry); \
+ (QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry); \
+ (QueueHeader)->Number++; \
+}
+
+#define InsertTailQueueAc(pAd, pEntry, QueueHeader, QueueEntry) \
+{ \
+ ((PQUEUE_ENTRY)QueueEntry)->Next = NULL; \
+ if ((QueueHeader)->Tail) \
+ (QueueHeader)->Tail->Next = (PQUEUE_ENTRY)(QueueEntry); \
+ else \
+ (QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry); \
+ (QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry); \
+ (QueueHeader)->Number++; \
+}
+void DisplayTxAgg (RTMP_ADAPTER *pAd);
+
+
+/* */
+/* Macros for flag and ref count operations */
+/* */
+#define RTMP_SET_FLAG(_M, _F) ((_M)->Flags |= (_F))
+#define RTMP_CLEAR_FLAG(_M, _F) ((_M)->Flags &= ~(_F))
+#define RTMP_CLEAR_FLAGS(_M) ((_M)->Flags = 0)
+#define RTMP_TEST_FLAG(_M, _F) (((_M)->Flags & (_F)) != 0)
+#define RTMP_TEST_FLAGS(_M, _F) (((_M)->Flags & (_F)) == (_F))
+/* Macro for power save flag. */
+#define RTMP_SET_PSFLAG(_M, _F) ((_M)->PSFlags |= (_F))
+#define RTMP_CLEAR_PSFLAG(_M, _F) ((_M)->PSFlags &= ~(_F))
+#define RTMP_CLEAR_PSFLAGS(_M) ((_M)->PSFlags = 0)
+#define RTMP_TEST_PSFLAG(_M, _F) (((_M)->PSFlags & (_F)) != 0)
+#define RTMP_TEST_PSFLAGS(_M, _F) (((_M)->PSFlags & (_F)) == (_F))
+
+#define OPSTATUS_SET_FLAG(_pAd, _F) ((_pAd)->CommonCfg.OpStatusFlags |= (_F))
+#define OPSTATUS_CLEAR_FLAG(_pAd, _F) ((_pAd)->CommonCfg.OpStatusFlags &= ~(_F))
+#define OPSTATUS_TEST_FLAG(_pAd, _F) (((_pAd)->CommonCfg.OpStatusFlags & (_F)) != 0)
+
+#define CLIENT_STATUS_SET_FLAG(_pEntry,_F) ((_pEntry)->ClientStatusFlags |= (_F))
+#define CLIENT_STATUS_CLEAR_FLAG(_pEntry,_F) ((_pEntry)->ClientStatusFlags &= ~(_F))
+#define CLIENT_STATUS_TEST_FLAG(_pEntry,_F) (((_pEntry)->ClientStatusFlags & (_F)) != 0)
+
+#define RX_FILTER_SET_FLAG(_pAd, _F) ((_pAd)->CommonCfg.PacketFilter |= (_F))
+#define RX_FILTER_CLEAR_FLAG(_pAd, _F) ((_pAd)->CommonCfg.PacketFilter &= ~(_F))
+#define RX_FILTER_TEST_FLAG(_pAd, _F) (((_pAd)->CommonCfg.PacketFilter & (_F)) != 0)
+
+#define RTMP_SET_MORE_FLAG(_M, _F) ((_M)->MoreFlags |= (_F))
+#define RTMP_TEST_MORE_FLAG(_M, _F) (((_M)->MoreFlags & (_F)) != 0)
+#define RTMP_CLEAR_MORE_FLAG(_M, _F) ((_M)->MoreFlags &= ~(_F))
+
+#define SET_ASIC_CAP(_pAd, _caps) ((_pAd)->chipCap.asic_caps |= (_caps))
+#define IS_ASIC_CAP(_pAd, _caps) (((_pAd)->chipCap.asic_caps & (_caps)) != 0)
+#define CLR_ASIC_CAP(_pAd, _caps) ((_pAd)->chipCap.asic_caps &= ~(_caps))
+
+
+
+#define CKIP_KP_ON(_p) ((((_p)->StaCfg.CkipFlag) & 0x10) && ((_p)->StaCfg.bCkipCmicOn == TRUE))
+#define CKIP_CMIC_ON(_p) ((((_p)->StaCfg.CkipFlag) & 0x08) && ((_p)->StaCfg.bCkipCmicOn == TRUE))
+
+#define INC_RING_INDEX(_idx, _RingSize) \
+{ \
+ (_idx) = (_idx+1) % (_RingSize); \
+}
+
+#ifdef USB_BULK_BUF_ALIGMENT
+#define CUR_WRITE_IDX_INC(_idx, _RingSize) \
+{ \
+ (_idx) = (_idx+1) % (_RingSize); \
+}
+#endif /* USB_BULK_BUF_ALIGMENT */
+
+#ifdef DOT11_N_SUPPORT
+/* StaActive.SupportedHtPhy.MCSSet is copied from AP beacon. Don't need to update here. */
+#define COPY_HTSETTINGS_FROM_MLME_AUX_TO_ACTIVE_CFG(_pAd) \
+{ \
+ _pAd->StaActive.SupportedHtPhy.ChannelWidth = _pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth; \
+ _pAd->StaActive.SupportedHtPhy.MimoPs = _pAd->MlmeAux.HtCapability.HtCapInfo.MimoPs; \
+ _pAd->StaActive.SupportedHtPhy.GF = _pAd->MlmeAux.HtCapability.HtCapInfo.GF; \
+ _pAd->StaActive.SupportedHtPhy.ShortGIfor20 = _pAd->MlmeAux.HtCapability.HtCapInfo.ShortGIfor20; \
+ _pAd->StaActive.SupportedHtPhy.ShortGIfor40 = _pAd->MlmeAux.HtCapability.HtCapInfo.ShortGIfor40; \
+ _pAd->StaActive.SupportedHtPhy.TxSTBC = _pAd->MlmeAux.HtCapability.HtCapInfo.TxSTBC; \
+ _pAd->StaActive.SupportedHtPhy.RxSTBC = _pAd->MlmeAux.HtCapability.HtCapInfo.RxSTBC; \
+ _pAd->StaActive.SupportedHtPhy.ExtChanOffset = _pAd->MlmeAux.AddHtInfo.AddHtInfo.ExtChanOffset; \
+ _pAd->StaActive.SupportedHtPhy.RecomWidth = _pAd->MlmeAux.AddHtInfo.AddHtInfo.RecomWidth; \
+ _pAd->StaActive.SupportedHtPhy.OperaionMode = _pAd->MlmeAux.AddHtInfo.AddHtInfo2.OperaionMode; \
+ _pAd->StaActive.SupportedHtPhy.NonGfPresent = _pAd->MlmeAux.AddHtInfo.AddHtInfo2.NonGfPresent; \
+ NdisMoveMemory((_pAd)->MacTab.Content[BSSID_WCID].HTCapability.MCSSet, (_pAd)->StaActive.SupportedPhyInfo.MCSSet, sizeof(UCHAR) * 16);\
+}
+
+#define COPY_AP_HTSETTINGS_FROM_BEACON(_pAd, _pHtCapability) \
+{ \
+ _pAd->MacTab.Content[BSSID_WCID].AMsduSize = (UCHAR)(_pHtCapability->HtCapInfo.AMsduSize); \
+ _pAd->MacTab.Content[BSSID_WCID].MmpsMode= (UCHAR)(_pHtCapability->HtCapInfo.MimoPs); \
+ _pAd->MacTab.Content[BSSID_WCID].MaxRAmpduFactor = (UCHAR)(_pHtCapability->HtCapParm.MaxRAmpduFactor); \
+}
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef DOT11_VHT_AC
+#define COPY_VHT_FROM_MLME_AUX_TO_ACTIVE_CFG(_pAd) \
+{ \
+}
+#endif /* DOT11_VHT_AC */
+
+
+/*
+ Common fragment list structure - Identical to the scatter gather frag list structure
+*/
+#define NIC_MAX_PHYS_BUF_COUNT 8
+
+typedef struct _RTMP_SCATTER_GATHER_ELEMENT {
+ PVOID Address;
+ ULONG Length;
+ PULONG Reserved;
+} RTMP_SCATTER_GATHER_ELEMENT, *PRTMP_SCATTER_GATHER_ELEMENT;
+
+typedef struct _RTMP_SCATTER_GATHER_LIST {
+ ULONG NumberOfElements;
+ PULONG Reserved;
+ RTMP_SCATTER_GATHER_ELEMENT Elements[NIC_MAX_PHYS_BUF_COUNT];
+} RTMP_SCATTER_GATHER_LIST, *PRTMP_SCATTER_GATHER_LIST;
+
+
+/*
+ Some utility macros
+*/
+#ifndef min
+#define min(_a, _b) (((_a) < (_b)) ? (_a) : (_b))
+#endif
+
+#ifndef max
+#define max(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
+#endif
+
+#define GET_LNA_GAIN(_pAd) ((_pAd->LatchRfRegs.Channel <= 14) ? (_pAd->BLNAGain) : ((_pAd->LatchRfRegs.Channel <= 64) ? (_pAd->ALNAGain0) : ((_pAd->LatchRfRegs.Channel <= 128) ? (_pAd->ALNAGain1) : (_pAd->ALNAGain2))))
+
+#define INC_COUNTER64(Val) (Val.QuadPart++)
+
+#define INFRA_ON(_p) (OPSTATUS_TEST_FLAG(_p, fOP_STATUS_INFRA_ON))
+#define ADHOC_ON(_p) (OPSTATUS_TEST_FLAG(_p, fOP_STATUS_ADHOC_ON))
+#define MONITOR_ON(_p) (((_p)->StaCfg.BssType) == BSS_MONITOR)
+#define IDLE_ON(_p) (!INFRA_ON(_p) && !ADHOC_ON(_p))
+
+/* Check LEAP & CCKM flags */
+#define LEAP_ON(_p) (((_p)->StaCfg.LeapAuthMode) == CISCO_AuthModeLEAP)
+#define LEAP_CCKM_ON(_p) ((((_p)->StaCfg.LeapAuthMode) == CISCO_AuthModeLEAP) && ((_p)->StaCfg.LeapAuthInfo.CCKM == TRUE))
+
+/* if orginal Ethernet frame contains no LLC/SNAP, then an extra LLC/SNAP encap is required */
+#define EXTRA_LLCSNAP_ENCAP_FROM_PKT_START(_pBufVA, _pExtraLlcSnapEncap) \
+{ \
+ if (((*(_pBufVA + 12) << 8) + *(_pBufVA + 13)) > 1500) \
+ { \
+ _pExtraLlcSnapEncap = SNAP_802_1H; \
+ if (NdisEqualMemory(IPX, _pBufVA + 12, 2) || \
+ NdisEqualMemory(APPLE_TALK, _pBufVA + 12, 2)) \
+ { \
+ _pExtraLlcSnapEncap = SNAP_BRIDGE_TUNNEL; \
+ } \
+ } \
+ else \
+ { \
+ _pExtraLlcSnapEncap = NULL; \
+ } \
+}
+
+/* New Define for new Tx Path. */
+#define EXTRA_LLCSNAP_ENCAP_FROM_PKT_OFFSET(_pBufVA, _pExtraLlcSnapEncap) \
+{ \
+ if (((*(_pBufVA) << 8) + *(_pBufVA + 1)) > 1500) \
+ { \
+ _pExtraLlcSnapEncap = SNAP_802_1H; \
+ if (NdisEqualMemory(IPX, _pBufVA, 2) || \
+ NdisEqualMemory(APPLE_TALK, _pBufVA, 2)) \
+ { \
+ _pExtraLlcSnapEncap = SNAP_BRIDGE_TUNNEL; \
+ } \
+ } \
+ else \
+ { \
+ _pExtraLlcSnapEncap = NULL; \
+ } \
+}
+
+#define MAKE_802_3_HEADER(_p, _pMac1, _pMac2, _pType) \
+{ \
+ NdisMoveMemory(_p, _pMac1, MAC_ADDR_LEN); \
+ NdisMoveMemory((_p + MAC_ADDR_LEN), _pMac2, MAC_ADDR_LEN); \
+ NdisMoveMemory((_p + MAC_ADDR_LEN * 2), _pType, LENGTH_802_3_TYPE); \
+}
+
+/*
+ if pData has no LLC/SNAP (neither RFC1042 nor Bridge tunnel),
+ keep it that way.
+ else if the received frame is LLC/SNAP-encaped IPX or APPLETALK,
+ preserve the LLC/SNAP field
+ else remove the LLC/SNAP field from the result Ethernet frame
+
+ Patch for WHQL only, which did not turn on Netbios but use IPX within its payload
+ Note:
+ _pData & _DataSize may be altered (remove 8-byte LLC/SNAP) by this MACRO
+ _pRemovedLLCSNAP: pointer to removed LLC/SNAP; NULL is not removed
+*/
+#define CONVERT_TO_802_3(_p8023hdr, _pDA, _pSA, _pData, _DataSize, _pRemovedLLCSNAP) \
+{ \
+ char LLC_Len[2]; \
+ \
+ _pRemovedLLCSNAP = NULL; \
+ if (NdisEqualMemory(SNAP_802_1H, _pData, 6) || \
+ NdisEqualMemory(SNAP_BRIDGE_TUNNEL, _pData, 6)) \
+ { \
+ PUCHAR pProto = _pData + 6; \
+ \
+ if ((NdisEqualMemory(IPX, pProto, 2) || NdisEqualMemory(APPLE_TALK, pProto, 2)) && \
+ NdisEqualMemory(SNAP_802_1H, _pData, 6)) \
+ { \
+ LLC_Len[0] = (UCHAR)(_DataSize >> 8); \
+ LLC_Len[1] = (UCHAR)(_DataSize & (256 - 1)); \
+ MAKE_802_3_HEADER(_p8023hdr, _pDA, _pSA, LLC_Len); \
+ } \
+ else \
+ { \
+ MAKE_802_3_HEADER(_p8023hdr, _pDA, _pSA, pProto); \
+ _pRemovedLLCSNAP = _pData; \
+ _DataSize -= LENGTH_802_1_H; \
+ _pData += LENGTH_802_1_H; \
+ } \
+ } \
+ else \
+ { \
+ LLC_Len[0] = (UCHAR)(_DataSize >> 8); \
+ LLC_Len[1] = (UCHAR)(_DataSize & (256 - 1)); \
+ MAKE_802_3_HEADER(_p8023hdr, _pDA, _pSA, LLC_Len); \
+ } \
+}
+
+/*
+ Enqueue this frame to MLME engine
+ We need to enqueue the whole frame because MLME need to pass data type
+ information from 802.11 header
+*/
+#ifdef RTMP_MAC_USB
+#define REPORT_MGMT_FRAME_TO_MLME(_pAd, Wcid, _pFrame, _FrameSize, _Rssi0, _Rssi1, _Rssi2, _MinSNR, _AntSel, _OpMode) \
+{ \
+ UINT32 High32TSF=0, Low32TSF=0; \
+ MlmeEnqueueForRecv(_pAd, Wcid, High32TSF, Low32TSF, (UCHAR)_Rssi0, (UCHAR)_Rssi1,(UCHAR)_Rssi2 ,_AntSel, _FrameSize, _pFrame, (UCHAR)_MinSNR, _OpMode); \
+}
+#endif /* RTMP_MAC_USB */
+
+#define MAC_ADDR_EQUAL(pAddr1,pAddr2) RTMPEqualMemory((PVOID)(pAddr1), (PVOID)(pAddr2), MAC_ADDR_LEN)
+#define SSID_EQUAL(ssid1, len1, ssid2, len2) ((len1==len2) && (RTMPEqualMemory(ssid1, ssid2, len1)))
+
+
+
+/* */
+/* Data buffer for DMA operation, the buffer must be contiguous physical memory */
+/* Both DMA to / from CPU use the same structure. */
+/* */
+typedef struct _RTMP_DMABUF {
+ ULONG AllocSize;
+ PVOID AllocVa; /* TxBuf virtual address */
+ NDIS_PHYSICAL_ADDRESS AllocPa; /* TxBuf physical address */
+} RTMP_DMABUF, *PRTMP_DMABUF;
+
+/* */
+/* Control block (Descriptor) for all ring descriptor DMA operation, buffer must be */
+/* contiguous physical memory. NDIS_PACKET stored the binding Rx packet descriptor */
+/* which won't be released, driver has to wait until upper layer return the packet */
+/* before giveing up this rx ring descriptor to ASIC. NDIS_BUFFER is assocaited pair */
+/* to describe the packet buffer. For Tx, NDIS_PACKET stored the tx packet descriptor */
+/* which driver should ACK upper layer when the tx is physically done or failed. */
+/* */
+typedef struct _RTMP_DMACB {
+ ULONG AllocSize; /* Control block size */
+ PVOID AllocVa; /* Control block virtual address */
+ NDIS_PHYSICAL_ADDRESS AllocPa; /* Control block physical address */
+ PNDIS_PACKET pNdisPacket;
+ PNDIS_PACKET pNextNdisPacket;
+
+ RTMP_DMABUF DmaBuf; /* Associated DMA buffer structure */
+#ifdef CACHE_LINE_32B
+ RXD_STRUC LastBDInfo;
+#endif /* CACHE_LINE_32B */
+} RTMP_DMACB, *PRTMP_DMACB;
+
+typedef struct _RTMP_TX_RING {
+ RTMP_DMACB Cell[TX_RING_SIZE];
+ UINT32 TxCpuIdx;
+ UINT32 TxDmaIdx;
+ UINT32 TxSwFreeIdx; /* software next free tx index */
+} RTMP_TX_RING, *PRTMP_TX_RING;
+
+typedef struct _RTMP_RX_RING {
+ RTMP_DMACB Cell[RX_RING_SIZE];
+ UINT32 RxCpuIdx;
+ UINT32 RxDmaIdx;
+ INT32 RxSwReadIdx; /* software next read index */
+} RTMP_RX_RING, *PRTMP_RX_RING;
+
+typedef struct _RTMP_MGMT_RING {
+ RTMP_DMACB Cell[MGMT_RING_SIZE];
+ UINT32 TxCpuIdx;
+ UINT32 TxDmaIdx;
+ UINT32 TxSwFreeIdx; /* software next free tx index */
+} RTMP_MGMT_RING, *PRTMP_MGMT_RING;
+
+typedef struct _RTMP_CTRL_RING {
+ RTMP_DMACB Cell[16];
+ UINT32 TxCpuIdx;
+ UINT32 TxDmaIdx;
+ UINT32 TxSwFreeIdx; /* software next free tx index */
+} RTMP_CTRL_RING, *PRTMP_CTRL_RING;
+
+/* */
+/* Statistic counter structure */
+/* */
+typedef struct _COUNTER_802_3 {
+ /* General Stats */
+ ULONG GoodTransmits;
+ ULONG GoodReceives;
+ ULONG TxErrors;
+ ULONG RxErrors;
+ ULONG RxNoBuffer;
+
+ /* Ethernet Stats */
+ ULONG RcvAlignmentErrors;
+ ULONG OneCollision;
+ ULONG MoreCollisions;
+
+} COUNTER_802_3, *PCOUNTER_802_3;
+
+typedef struct _COUNTER_802_11 {
+ ULONG Length;
+/* LARGE_INTEGER LastTransmittedFragmentCount; */
+ LARGE_INTEGER TransmittedFragmentCount;
+ LARGE_INTEGER MulticastTransmittedFrameCount;
+ LARGE_INTEGER FailedCount;
+ LARGE_INTEGER RetryCount;
+ LARGE_INTEGER MultipleRetryCount;
+ LARGE_INTEGER RTSSuccessCount;
+ LARGE_INTEGER RTSFailureCount;
+ LARGE_INTEGER ACKFailureCount;
+ LARGE_INTEGER FrameDuplicateCount;
+ LARGE_INTEGER ReceivedFragmentCount;
+ LARGE_INTEGER MulticastReceivedFrameCount;
+ LARGE_INTEGER FCSErrorCount;
+ LARGE_INTEGER TransmittedFrameCount;
+ LARGE_INTEGER WEPUndecryptableCount;
+ LARGE_INTEGER TransmitCountFrmOs;
+} COUNTER_802_11, *PCOUNTER_802_11;
+
+
+#ifdef RT3290
+typedef struct _ANT_DIVERSITY
+{
+ BOOLEAN RateUp;
+ ULONG TrainCounter;
+ ULONG AntennaDiversityState; // 0->Stable state 1->training state
+ ULONG AntennaDiversityPER[2]; // 0 ->main 1->aux
+ ULONG AntennaDiversityTxPacketCount[2]; // 0 ->main 1->aux
+ ULONG AntennaDiversityRxPacketCount[2];
+ CHAR Rssi[2];
+ ULONG AntennaDiversityCount;
+ ULONG AntennaDiversityTrigger;
+}ANT_DIVERSITY, *PANT_DIVERSITY;
+#endif /* RT3290 */
+
+typedef struct _COUNTER_RALINK {
+ UINT32 OneSecStart; /* for one sec count clear use */
+ UINT32 OneSecBeaconSentCnt;
+ UINT32 OneSecFalseCCACnt; /* CCA error count, for debug purpose, might move to global counter */
+ UINT32 OneSecRxFcsErrCnt; /* CRC error */
+ UINT32 OneSecRxOkCnt; /* RX without error */
+ UINT32 OneSecTxFailCount;
+ UINT32 OneSecTxNoRetryOkCount;
+ UINT32 OneSecTxRetryOkCount;
+ UINT32 OneSecRxOkDataCnt; /* unicast-to-me DATA frame count */
+ UINT32 OneSecTransmittedByteCount; /* both successful and failure, used to calculate TX throughput */
+
+ ULONG OneSecOsTxCount[NUM_OF_TX_RING];
+ ULONG OneSecDmaDoneCount[NUM_OF_TX_RING];
+ UINT32 OneSecTxDoneCount;
+ ULONG OneSecRxCount;
+ UINT32 OneSecReceivedByteCount;
+ UINT32 OneSecTxAggregationCount;
+ UINT32 OneSecRxAggregationCount;
+ UINT32 OneSecEnd; /* for one sec count clear use */
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+ UINT16 FalseCCACnt_100MS[MLME_TASK_EXEC_MULTIPLE]; /* one handred millisecond false CCA Count */
+ UINT16 PLCPErrCnt_100MS[MLME_TASK_EXEC_MULTIPLE]; /* one handred millisecond PLCP Error Count */
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+ ULONG TransmittedByteCount; /* both successful and failure, used to calculate TX throughput */
+ ULONG ReceivedByteCount; /* both CRC okay and CRC error, used to calculate RX throughput */
+#ifdef RT3290
+ // TODO: shiang, check the purpose of following parameter
+ ULONG OneSecRxOkCnt2; /* RX without error */
+#endif /* RT3290 */
+ ULONG BadCQIAutoRecoveryCount;
+ ULONG PoorCQIRoamingCount;
+ ULONG MgmtRingFullCount;
+ ULONG RxCountSinceLastNULL;
+ ULONG RxCount;
+ ULONG KickTxCount;
+ LARGE_INTEGER RealFcsErrCount;
+ ULONG PendingNdisPacketCount;
+ ULONG FalseCCACnt; /* CCA error count */
+
+ UINT32 LastOneSecTotalTxCount; /* OneSecTxNoRetryOkCount + OneSecTxRetryOkCount + OneSecTxFailCount */
+ UINT32 LastOneSecRxOkDataCnt; /* OneSecRxOkDataCnt */
+ ULONG DuplicateRcv;
+ ULONG TxAggCount;
+ ULONG TxNonAggCount;
+ ULONG TxAgg1MPDUCount;
+ ULONG TxAgg2MPDUCount;
+ ULONG TxAgg3MPDUCount;
+ ULONG TxAgg4MPDUCount;
+ ULONG TxAgg5MPDUCount;
+ ULONG TxAgg6MPDUCount;
+ ULONG TxAgg7MPDUCount;
+ ULONG TxAgg8MPDUCount;
+ ULONG TxAgg9MPDUCount;
+ ULONG TxAgg10MPDUCount;
+ ULONG TxAgg11MPDUCount;
+ ULONG TxAgg12MPDUCount;
+ ULONG TxAgg13MPDUCount;
+ ULONG TxAgg14MPDUCount;
+ ULONG TxAgg15MPDUCount;
+ ULONG TxAgg16MPDUCount;
+
+ LARGE_INTEGER TransmittedOctetsInAMSDU;
+ LARGE_INTEGER TransmittedAMSDUCount;
+ LARGE_INTEGER ReceivedOctesInAMSDUCount;
+ LARGE_INTEGER ReceivedAMSDUCount;
+ LARGE_INTEGER TransmittedAMPDUCount;
+ LARGE_INTEGER TransmittedMPDUsInAMPDUCount;
+ LARGE_INTEGER TransmittedOctetsInAMPDUCount;
+ LARGE_INTEGER MPDUInReceivedAMPDUCount;
+} COUNTER_RALINK, *PCOUNTER_RALINK;
+
+typedef struct _COUNTER_DRS {
+ /* to record the each TX rate's quality. 0 is best, the bigger the worse. */
+ USHORT TxQuality[MAX_TX_RATE_INDEX+1];
+ UCHAR PER[MAX_TX_RATE_INDEX+1];
+ UCHAR TxRateUpPenalty; /* extra # of second penalty due to last unstable condition */
+ ULONG CurrTxRateStableTime; /* # of second in current TX rate */
+ /*BOOLEAN fNoisyEnvironment; */
+ BOOLEAN fLastSecAccordingRSSI;
+ UCHAR LastSecTxRateChangeAction; /* 0: no change, 1:rate UP, 2:rate down */
+ UCHAR LastTimeTxRateChangeAction; /*Keep last time value of LastSecTxRateChangeAction */
+ ULONG LastTxOkCount;
+} COUNTER_DRS, *PCOUNTER_DRS;
+
+
+#ifdef DOT11_N_SUPPORT
+#ifdef TXBF_SUPPORT
+typedef
+ struct {
+ ULONG TxSuccessCount;
+ ULONG TxRetryCount;
+ ULONG TxFailCount;
+ ULONG ETxSuccessCount;
+ ULONG ETxRetryCount;
+ ULONG ETxFailCount;
+ ULONG ITxSuccessCount;
+ ULONG ITxRetryCount;
+ ULONG ITxFailCount;
+} COUNTER_TXBF;
+#endif /* TXBF_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+
+
+#ifdef STREAM_MODE_SUPPORT
+typedef struct _STREAM_MODE_ENTRY_{
+#define STREAM_MODE_STATIC 1
+ USHORT flag;
+ UCHAR macAddr[MAC_ADDR_LEN];
+}STREAM_MODE_ENTRY;
+#endif /* STREAM_MODE_SUPPORT */
+
+/* for Microwave oven */
+#ifdef MICROWAVE_OVEN_SUPPORT
+typedef struct _MO_CFG_STRUCT {
+ BOOLEAN bEnable;
+ UINT8 nPeriod_Cnt; /* measurement period 100ms, mitigate the interference period 900 ms */
+ UINT16 nFalseCCACnt;
+ UINT16 nFalseCCATh; /* default is 100 */
+#ifdef MT7601
+ UINT32 Stored_BBP_R65;
+ UCHAR Stored_RF_B5_R6;
+ UCHAR Stored_RF_B5_R7;
+#endif /* MT7601 */
+} MO_CFG_STRUCT, *PMO_CFG_STRUCT;
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+/***************************************************************************
+ * security key related data structure
+ **************************************************************************/
+
+/* structure to define WPA Group Key Rekey Interval */
+typedef struct GNU_PACKED _RT_802_11_WPA_REKEY {
+ ULONG ReKeyMethod; /* mechanism for rekeying: 0:disable, 1: time-based, 2: packet-based */
+ ULONG ReKeyInterval; /* time-based: seconds, packet-based: kilo-packets */
+} RT_WPA_REKEY,*PRT_WPA_REKEY, RT_802_11_WPA_REKEY, *PRT_802_11_WPA_REKEY;
+
+
+#ifdef RTMP_MAC_USB
+/***************************************************************************
+ * RTUSB I/O related data structure
+ **************************************************************************/
+
+/* for USB interface, avoid in interrupt when write key */
+typedef struct RT_ADD_PAIRWISE_KEY_ENTRY {
+ UCHAR MacAddr[6];
+ USHORT MacTabMatchWCID; /* ASIC */
+ CIPHER_KEY CipherKey;
+} RT_ADD_PAIRWISE_KEY_ENTRY,*PRT_ADD_PAIRWISE_KEY_ENTRY;
+
+
+/* Cipher suite type for mixed mode group cipher, P802.11i-2004 */
+typedef enum _RT_802_11_CIPHER_SUITE_TYPE {
+ Cipher_Type_NONE,
+ Cipher_Type_WEP40,
+ Cipher_Type_TKIP,
+ Cipher_Type_RSVD,
+ Cipher_Type_CCMP,
+ Cipher_Type_WEP104
+} RT_802_11_CIPHER_SUITE_TYPE, *PRT_802_11_CIPHER_SUITE_TYPE;
+#endif /* RTMP_MAC_USB */
+
+typedef struct {
+ UCHAR Addr[MAC_ADDR_LEN];
+ UCHAR ErrorCode[2]; /*00 01-Invalid authentication type */
+ /*00 02-Authentication timeout */
+ /*00 03-Challenge from AP failed */
+ /*00 04-Challenge to AP failed */
+ BOOLEAN Reported;
+} ROGUEAP_ENTRY, *PROGUEAP_ENTRY;
+
+typedef struct {
+ UCHAR RogueApNr;
+ ROGUEAP_ENTRY RogueApEntry[MAX_LEN_OF_BSS_TABLE];
+} ROGUEAP_TABLE, *PROGUEAP_TABLE;
+
+/*
+ * Fragment Frame structure
+ */
+typedef struct _FRAGMENT_FRAME {
+ PNDIS_PACKET pFragPacket;
+ ULONG RxSize;
+ USHORT Sequence;
+ USHORT LastFrag;
+ ULONG Flags; /* Some extra frame information. bit 0: LLC presented */
+} FRAGMENT_FRAME, *PFRAGMENT_FRAME;
+
+
+/* */
+/* Tkip Key structure which RC4 key & MIC calculation */
+/* */
+typedef struct _TKIP_KEY_INFO {
+ UINT nBytesInM; /* # bytes in M for MICKEY */
+ ULONG IV16;
+ ULONG IV32;
+ ULONG K0; /* for MICKEY Low */
+ ULONG K1; /* for MICKEY Hig */
+ ULONG L; /* Current state for MICKEY */
+ ULONG R; /* Current state for MICKEY */
+ ULONG M; /* Message accumulator for MICKEY */
+ UCHAR RC4KEY[16];
+ UCHAR MIC[8];
+} TKIP_KEY_INFO, *PTKIP_KEY_INFO;
+
+
+/* */
+/* Private / Misc data, counters for driver internal use */
+/* */
+typedef struct __PRIVATE_STRUC {
+ UINT SystemResetCnt; /* System reset counter */
+ UINT TxRingFullCnt; /* Tx ring full occurrance number */
+ UINT PhyRxErrCnt; /* PHY Rx error count, for debug purpose, might move to global counter */
+ /* Variables for WEP encryption / decryption in rtmp_wep.c */
+ /* Tkip stuff */
+ TKIP_KEY_INFO Tx;
+ TKIP_KEY_INFO Rx;
+} PRIVATE_STRUC, *PPRIVATE_STRUC;
+
+
+/***************************************************************************
+ * Channel and BBP related data structures
+ **************************************************************************/
+/* structure to tune BBP R66 (BBP TUNING) */
+typedef struct _BBP_R66_TUNING {
+ BOOLEAN bEnable;
+ USHORT FalseCcaLowerThreshold; /* default 100 */
+ USHORT FalseCcaUpperThreshold; /* default 512 */
+ UCHAR R66Delta;
+ UCHAR R66CurrentValue;
+ BOOLEAN R66LowerUpperSelect; /*Before LinkUp, Used LowerBound or UpperBound as R66 value. */
+} BBP_R66_TUNING, *PBBP_R66_TUNING;
+
+
+#ifdef DOT11_N_SUPPORT
+#ifdef DOT11N_DRAFT3
+#define EFFECTED_CH_SECONDARY 0x1
+#define EFFECTED_CH_PRIMARY 0x2
+#define EFFECTED_CH_LEGACY 0x4
+#endif /* DOT11N_DRAFT3 */
+#endif /* DOT11_N_SUPPORT */
+
+/* structure to store channel TX power */
+typedef struct _CHANNEL_TX_POWER {
+ USHORT RemainingTimeForUse; /*unit: sec */
+ UCHAR Channel;
+#ifdef DOT11N_DRAFT3
+ BOOLEAN bEffectedChannel; /* For BW 40 operating in 2.4GHz , the "effected channel" is the channel that is covered in 40Mhz. */
+#endif /* DOT11N_DRAFT3 */
+ CHAR Power;
+ CHAR Power2;
+#ifdef DOT11N_SS3_SUPPORT
+ CHAR Power3;
+#endif /* DOT11N_SS3_SUPPORT */
+ UCHAR MaxTxPwr;
+ UCHAR DfsReq;
+ UCHAR RegulatoryDomain;
+
+/*
+ Channel property:
+
+ CHANNEL_DISABLED: The channel is disabled.
+ CHANNEL_PASSIVE_SCAN: Only passive scanning is allowed.
+ CHANNEL_NO_IBSS: IBSS is not allowed.
+ CHANNEL_RADAR: Radar detection is required.
+ CHANNEL_NO_FAT_ABOVE: Extension channel above this channel is not allowed.
+ CHANNEL_NO_FAT_BELOW: Extension channel below this channel is not allowed.
+ CHANNEL_40M_CAP: 40 BW channel group
+ */
+#define CHANNEL_DEFAULT_PROP 0x00
+#define CHANNEL_DISABLED 0x01 /* no use */
+#define CHANNEL_PASSIVE_SCAN 0x02
+#define CHANNEL_NO_IBSS 0x04
+#define CHANNEL_RADAR 0x08
+#define CHANNEL_NO_FAT_ABOVE 0x10
+#define CHANNEL_NO_FAT_BELOW 0x20
+#define CHANNEL_40M_CAP 0x40
+
+ UCHAR Flags;
+
+} CHANNEL_TX_POWER, *PCHANNEL_TX_POWER;
+
+/* Channel list subset */
+typedef struct _CHANNEL_LIST_SUB {
+ UCHAR Channel;
+ UCHAR IdxMap; /* Index mapping to original channel list */
+} CHANNEL_LIST_SUB, *PCHANNEL_LIST_SUB;
+
+
+typedef struct _SOFT_RX_ANT_DIVERSITY_STRUCT {
+ UCHAR EvaluatePeriod; /* 0:not evalute status, 1: evaluate status, 2: switching status */
+ UCHAR EvaluateStableCnt;
+ UCHAR Pair1PrimaryRxAnt; /* 0:Ant-E1, 1:Ant-E2 */
+ UCHAR Pair1SecondaryRxAnt; /* 0:Ant-E1, 1:Ant-E2 */
+ SHORT Pair1LastAvgRssi; /* */
+ SHORT Pair2LastAvgRssi; /* */
+ ULONG RcvPktNumWhenEvaluate;
+ BOOLEAN FirstPktArrivedWhenEvaluate;
+#ifdef CONFIG_AP_SUPPORT
+ LONG Pair1AvgRssiGroup1[2];
+ LONG Pair1AvgRssiGroup2[2];
+ ULONG RcvPktNum[2];
+#endif /* CONFIG_AP_SUPPORT */
+} SOFT_RX_ANT_DIVERSITY, *PSOFT_RX_ANT_DIVERSITY;
+
+typedef enum _ABGBAND_STATE_ {
+ UNKNOWN_BAND,
+ BG_BAND,
+ A_BAND,
+} ABGBAND_STATE;
+
+/***************************************************************************
+ * structure for MLME state machine
+ **************************************************************************/
+typedef struct _MLME_STRUCT {
+ STATE_MACHINE_FUNC ActFunc[ACT_FUNC_SIZE];
+ /* Action */
+ STATE_MACHINE ActMachine;
+
+#ifdef WSC_INCLUDED
+ STATE_MACHINE WscMachine;
+ STATE_MACHINE_FUNC WscFunc[WSC_FUNC_SIZE];
+
+#endif /* WSC_INCLUDED */
+
+#ifdef QOS_DLS_SUPPORT
+ STATE_MACHINE DlsMachine;
+ STATE_MACHINE_FUNC DlsFunc[DLS_FUNC_SIZE];
+#endif /* QOS_DLS_SUPPORT */
+
+
+#ifdef CONFIG_AP_SUPPORT
+ /* AP state machines */
+ STATE_MACHINE ApAssocMachine;
+ STATE_MACHINE ApAuthMachine;
+ STATE_MACHINE ApSyncMachine;
+ STATE_MACHINE_FUNC ApAssocFunc[AP_ASSOC_FUNC_SIZE];
+/* STATE_MACHINE_FUNC ApDlsFunc[DLS_FUNC_SIZE]; */
+ STATE_MACHINE_FUNC ApAuthFunc[AP_AUTH_FUNC_SIZE];
+ STATE_MACHINE_FUNC ApSyncFunc[AP_SYNC_FUNC_SIZE];
+#ifdef APCLI_SUPPORT
+ STATE_MACHINE ApCliAuthMachine;
+ STATE_MACHINE ApCliAssocMachine;
+ STATE_MACHINE ApCliCtrlMachine;
+ STATE_MACHINE ApCliSyncMachine;
+ STATE_MACHINE ApCliWpaPskMachine;
+
+ STATE_MACHINE_FUNC ApCliAuthFunc[APCLI_AUTH_FUNC_SIZE];
+ STATE_MACHINE_FUNC ApCliAssocFunc[APCLI_ASSOC_FUNC_SIZE];
+ STATE_MACHINE_FUNC ApCliCtrlFunc[APCLI_CTRL_FUNC_SIZE];
+ STATE_MACHINE_FUNC ApCliSyncFunc[APCLI_SYNC_FUNC_SIZE];
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+ /* common WPA state machine */
+ STATE_MACHINE WpaMachine;
+ STATE_MACHINE_FUNC WpaFunc[WPA_FUNC_SIZE];
+
+
+ ULONG ChannelQuality; /* 0..100, Channel Quality Indication for Roaming */
+ ULONG Now32; /* latch the value of NdisGetSystemUpTime() */
+ ULONG LastSendNULLpsmTime;
+
+ BOOLEAN bRunning;
+ NDIS_SPIN_LOCK TaskLock;
+ MLME_QUEUE Queue;
+
+ UINT ShiftReg;
+
+ RALINK_TIMER_STRUCT PeriodicTimer;
+ RALINK_TIMER_STRUCT APSDPeriodicTimer;
+ RALINK_TIMER_STRUCT LinkDownTimer;
+ RALINK_TIMER_STRUCT LinkUpTimer;
+ ULONG PeriodicRound;
+ ULONG GPIORound;
+ ULONG OneSecPeriodicRound;
+
+ UCHAR RealRxPath;
+ BOOLEAN bLowThroughput;
+ BOOLEAN bEnableAutoAntennaCheck;
+ RALINK_TIMER_STRUCT RxAntEvalTimer;
+
+
+#ifdef RTMP_MAC_USB
+ RALINK_TIMER_STRUCT AutoWakeupTimer;
+ BOOLEAN AutoWakeupTimerRunning;
+#endif /* RTMP_MAC_USB */
+
+
+#ifdef CONFIG_MULTI_CHANNEL
+ RALINK_TIMER_STRUCT MCCTimer;
+
+ RALINK_TIMER_STRUCT ConcurrentP2PConnectTimer;
+ UINT32 HCCAToEDCATimerValue;
+ UINT32 EDCAToHCCATimerValue;
+ BOOLEAN ConcurrentP2PConnectTimerRunning;
+ UINT32 StaStayTick;
+ UINT32 P2pStayTick;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+} MLME_STRUCT, *PMLME_STRUCT;
+
+#ifdef DOT11_N_SUPPORT
+/***************************************************************************
+ * 802.11 N related data structures
+ **************************************************************************/
+struct reordering_mpdu {
+ struct reordering_mpdu *next;
+ PNDIS_PACKET pPacket; /* coverted to 802.3 frame */
+ int Sequence; /* sequence number of MPDU */
+ BOOLEAN bAMSDU;
+ UCHAR OpMode;
+};
+
+struct reordering_list {
+ struct reordering_mpdu *next;
+ int qlen;
+};
+
+struct reordering_mpdu_pool {
+ PVOID mem;
+ NDIS_SPIN_LOCK lock;
+ struct reordering_list freelist;
+};
+
+typedef enum _REC_BLOCKACK_STATUS {
+ Recipient_NONE = 0,
+ Recipient_USED,
+ Recipient_HandleRes,
+ Recipient_Accept
+} REC_BLOCKACK_STATUS, *PREC_BLOCKACK_STATUS;
+
+typedef enum _ORI_BLOCKACK_STATUS {
+ Originator_NONE = 0,
+ Originator_USED,
+ Originator_WaitRes,
+ Originator_Done
+} ORI_BLOCKACK_STATUS, *PORI_BLOCKACK_STATUS;
+
+typedef struct _BA_ORI_ENTRY {
+ UCHAR Wcid;
+ UCHAR TID;
+ UCHAR BAWinSize;
+ UCHAR Token;
+/* Sequence is to fill every outgoing QoS DATA frame's sequence field in 802.11 header. */
+ USHORT Sequence;
+ USHORT TimeOutValue;
+ ORI_BLOCKACK_STATUS ORI_BA_Status;
+ RALINK_TIMER_STRUCT ORIBATimer;
+ PVOID pAdapter;
+} BA_ORI_ENTRY, *PBA_ORI_ENTRY;
+
+typedef struct _BA_REC_ENTRY {
+ UCHAR Wcid;
+ UCHAR TID;
+ UCHAR BAWinSize; /* 7.3.1.14. each buffer is capable of holding a max AMSDU or MSDU. */
+ /*UCHAR NumOfRxPkt; */
+ /*UCHAR Curindidx; // the head in the RX reordering buffer */
+ USHORT LastIndSeq;
+/* USHORT LastIndSeqAtTimer; */
+ USHORT TimeOutValue;
+ RALINK_TIMER_STRUCT RECBATimer;
+ ULONG LastIndSeqAtTimer;
+ ULONG nDropPacket;
+ ULONG rcvSeq;
+ REC_BLOCKACK_STATUS REC_BA_Status;
+/* UCHAR RxBufIdxUsed; */
+ /* corresponding virtual address for RX reordering packet storage. */
+ /*RTMP_REORDERDMABUF MAP_RXBuf[MAX_RX_REORDERBUF]; */
+ NDIS_SPIN_LOCK RxReRingLock; /* Rx Ring spinlock */
+/* struct _BA_REC_ENTRY *pNext; */
+ PVOID pAdapter;
+ struct reordering_list list;
+} BA_REC_ENTRY, *PBA_REC_ENTRY;
+
+
+typedef struct {
+ ULONG numAsRecipient; /* I am recipient of numAsRecipient clients. These client are in the BARecEntry[] */
+ ULONG numAsOriginator; /* I am originator of numAsOriginator clients. These clients are in the BAOriEntry[] */
+ ULONG numDoneOriginator; /* count Done Originator sessions */
+ BA_ORI_ENTRY BAOriEntry[MAX_LEN_OF_BA_ORI_TABLE];
+ BA_REC_ENTRY BARecEntry[MAX_LEN_OF_BA_REC_TABLE];
+} BA_TABLE, *PBA_TABLE;
+
+/*For QureyBATableOID use; */
+typedef struct GNU_PACKED _OID_BA_REC_ENTRY {
+ UCHAR MACAddr[MAC_ADDR_LEN];
+ UCHAR BaBitmap; /* if (BaBitmap&(1<<TID)), this session with{MACAddr, TID}exists, so read BufSize[TID] for BufferSize */
+ UCHAR rsv;
+ UCHAR BufSize[8];
+ REC_BLOCKACK_STATUS REC_BA_Status[8];
+} OID_BA_REC_ENTRY, *POID_BA_REC_ENTRY;
+
+/*For QureyBATableOID use; */
+typedef struct GNU_PACKED _OID_BA_ORI_ENTRY {
+ UCHAR MACAddr[MAC_ADDR_LEN];
+ UCHAR BaBitmap; /* if (BaBitmap&(1<<TID)), this session with{MACAddr, TID}exists, so read BufSize[TID] for BufferSize, read ORI_BA_Status[TID] for status */
+ UCHAR rsv;
+ UCHAR BufSize[8];
+ ORI_BLOCKACK_STATUS ORI_BA_Status[8];
+} OID_BA_ORI_ENTRY, *POID_BA_ORI_ENTRY;
+
+typedef struct _QUERYBA_TABLE {
+ OID_BA_ORI_ENTRY BAOriEntry[32];
+ OID_BA_REC_ENTRY BARecEntry[32];
+ UCHAR OriNum; /* Number of below BAOriEntry */
+ UCHAR RecNum; /* Number of below BARecEntry */
+} QUERYBA_TABLE, *PQUERYBA_TABLE;
+
+typedef union _BACAP_STRUC {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ UINT32:4;
+ UINT32 b2040CoexistScanSup:1; /*As Sta, support do 2040 coexistence scan for AP. As Ap, support monitor trigger event to check if can use BW 40MHz. */
+ UINT32 bHtAdhoc:1; /* adhoc can use ht rate. */
+ UINT32 MMPSmode:2; /* MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable */
+ UINT32 AmsduSize:1; /* 0:3839, 1:7935 bytes. UINT MSDUSizeToBytes[] = { 3839, 7935}; */
+ UINT32 AmsduEnable:1; /*Enable AMSDU transmisstion */
+ UINT32 MpduDensity:3;
+ UINT32 Policy:2; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use */
+ UINT32 AutoBA:1; /* automatically BA */
+ UINT32 TxBAWinLimit:8;
+ UINT32 RxBAWinLimit:8;
+ } field;
+#else
+ struct {
+ UINT32 RxBAWinLimit:8;
+ UINT32 TxBAWinLimit:8;
+ UINT32 AutoBA:1; /* automatically BA */
+ UINT32 Policy:2; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use */
+ UINT32 MpduDensity:3;
+ UINT32 AmsduEnable:1; /*Enable AMSDU transmisstion */
+ UINT32 AmsduSize:1; /* 0:3839, 1:7935 bytes. UINT MSDUSizeToBytes[] = { 3839, 7935}; */
+ UINT32 MMPSmode:2; /* MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable */
+ UINT32 bHtAdhoc:1; /* adhoc can use ht rate. */
+ UINT32 b2040CoexistScanSup:1; /*As Sta, support do 2040 coexistence scan for AP. As Ap, support monitor trigger event to check if can use BW 40MHz. */
+ UINT32:4;
+ } field;
+#endif
+ UINT32 word;
+} BACAP_STRUC, *PBACAP_STRUC;
+
+typedef struct {
+ BOOLEAN IsRecipient;
+ UCHAR MACAddr[MAC_ADDR_LEN];
+ UCHAR TID;
+ UCHAR nMSDU;
+ USHORT TimeOut;
+ BOOLEAN bAllTid; /* If True, delete all TID for BA sessions with this MACaddr. */
+} OID_ADD_BA_ENTRY, *POID_ADD_BA_ENTRY;
+
+#ifdef DOT11N_DRAFT3
+typedef enum _BSS2040COEXIST_FLAG {
+ BSS_2040_COEXIST_DISABLE = 0,
+ BSS_2040_COEXIST_TIMER_FIRED = 1,
+ BSS_2040_COEXIST_INFO_SYNC = 2,
+ BSS_2040_COEXIST_INFO_NOTIFY = 4,
+} BSS2040COEXIST_FLAG;
+
+typedef struct _BssCoexChRange_ {
+ UCHAR primaryCh;
+ UCHAR secondaryCh;
+ UCHAR effectChStart;
+ UCHAR effectChEnd;
+} BSS_COEX_CH_RANGE;
+#endif /* DOT11N_DRAFT3 */
+
+#define IS_HT_STA(_pMacEntry) \
+ (_pMacEntry->MaxHTPhyMode.field.MODE >= MODE_HTMIX)
+
+#define IS_HT_RATE(_pMacEntry) \
+ (_pMacEntry->HTPhyMode.field.MODE >= MODE_HTMIX)
+
+#define PEER_IS_HT_RATE(_pMacEntry) \
+ (_pMacEntry->HTPhyMode.field.MODE >= MODE_HTMIX)
+
+#endif /* DOT11_N_SUPPORT */
+
+/*This structure is for all 802.11n card InterOptibilityTest action. Reset all Num every n second. (Details see MLMEPeriodic) */
+typedef struct _IOT_STRUC {
+ BOOLEAN bRTSLongProtOn;
+} IOT_STRUC, *PIOT_STRUC;
+
+/* This is the registry setting for 802.11n transmit setting. Used in advanced page. */
+typedef union _REG_TRANSMIT_SETTING {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ UINT32 rsv:13;
+ UINT32 EXTCHA:2;
+ UINT32 HTMODE:1;
+ UINT32 TRANSNO:2;
+ UINT32 STBC:1; /*SPACE */
+ UINT32 ShortGI:1;
+ UINT32 BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ UINT32 TxBF:1; /* 3*3 */
+ UINT32 ITxBfEn:1;
+ UINT32 rsv0:9;
+ /*UINT32 MCS:7; // MCS */
+ /*UINT32 PhyMode:4; */
+ } field;
+#else
+ struct {
+ /*UINT32 PhyMode:4; */
+ /*UINT32 MCS:7; // MCS */
+ UINT32 rsv0:9;
+ UINT32 ITxBfEn:1;
+ UINT32 TxBF:1;
+ UINT32 BW:1; /*channel bandwidth 20MHz or 40 MHz */
+ UINT32 ShortGI:1;
+ UINT32 STBC:1; /*SPACE */
+ UINT32 TRANSNO:2;
+ UINT32 HTMODE:1;
+ UINT32 EXTCHA:2;
+ UINT32 rsv:13;
+ } field;
+#endif
+ UINT32 word;
+} REG_TRANSMIT_SETTING, *PREG_TRANSMIT_SETTING;
+
+
+typedef union _DESIRED_TRANSMIT_SETTING {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ USHORT rsv:3;
+ USHORT FixedTxMode:2; /* If MCS isn't AUTO, fix rate in CCK, OFDM or HT mode. */
+ USHORT PhyMode:4;
+ USHORT MCS:7; /* MCS */
+ } field;
+#else
+ struct {
+ USHORT MCS:7; /* MCS */
+ USHORT PhyMode:4;
+ USHORT FixedTxMode:2; /* If MCS isn't AUTO, fix rate in CCK, OFDM or HT mode. */
+ USHORT rsv:3;
+ } field;
+#endif
+ USHORT word;
+} DESIRED_TRANSMIT_SETTING, *PDESIRED_TRANSMIT_SETTING;
+
+
+struct hw_setting{
+ UCHAR prim_ch;
+ UCHAR cent_ch;
+ UCHAR bbp_bw;
+ UCHAR rf_band;
+};
+
+
+struct wifi_dev{
+ NDIS_802_11_AUTHENTICATION_MODE AuthMode;
+ NDIS_802_11_WEP_STATUS WepStatus;
+ NDIS_802_11_WEP_STATUS GroupKeyWepStatus;
+ WPA_MIX_PAIR_CIPHER WpaMixPairCipher;
+
+ RT_PHY_INFO DesiredHtPhyInfo;
+ DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; /* Desired transmit setting. this is for reading registry setting only. not useful. */
+ BOOLEAN bAutoTxRateSwitch;
+
+ BOOLEAN bWmmCapable; /* 0:disable WMM, 1:enable WMM */
+
+ HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode;
+};
+
+
+#ifdef RTMP_MAC_USB
+/***************************************************************************
+ * USB-based chip Beacon related data structures
+ **************************************************************************/
+#define BEACON_BITMAP_MASK 0xff
+typedef struct _BEACON_SYNC_STRUCT_ {
+ UCHAR BeaconBuf[HW_BEACON_MAX_NUM][HW_BEACON_OFFSET];
+ UCHAR *BeaconTxWI[HW_BEACON_MAX_NUM];
+ ULONG TimIELocationInBeacon[HW_BEACON_MAX_NUM];
+ ULONG CapabilityInfoLocationInBeacon[HW_BEACON_MAX_NUM];
+ BOOLEAN EnableBeacon; /* trigger to enable beacon transmission. */
+ UCHAR BeaconBitMap; /* NOTE: If the MAX_MBSSID_NUM is larger than 8, this parameter need to change. */
+ UCHAR DtimBitOn; /* NOTE: If the MAX_MBSSID_NUM is larger than 8, this parameter need to change. */
+} BEACON_SYNC_STRUCT;
+#endif /* RTMP_MAC_USB */
+
+/***************************************************************************
+ * Multiple SSID related data structures
+ **************************************************************************/
+#define WLAN_MAX_NUM_OF_TIM ((MAX_LEN_OF_MAC_TABLE >> 3) + 1) /* /8 + 1 */
+#define WLAN_CT_TIM_BCMC_OFFSET 0 /* unit: 32B */
+
+/* clear bcmc TIM bit */
+#define WLAN_MR_TIM_BCMC_CLEAR(apidx) \
+ pAd->ApCfg.MBSSID[apidx].TimBitmaps[WLAN_CT_TIM_BCMC_OFFSET] &= ~NUM_BIT8[0];
+
+/* set bcmc TIM bit */
+#define WLAN_MR_TIM_BCMC_SET(apidx) \
+ pAd->ApCfg.MBSSID[apidx].TimBitmaps[WLAN_CT_TIM_BCMC_OFFSET] |= NUM_BIT8[0];
+
+/* clear a station PS TIM bit */
+#define WLAN_MR_TIM_BIT_CLEAR(ad_p, apidx, wcid) \
+ { UCHAR tim_offset = wcid >> 3; \
+ UCHAR bit_offset = wcid & 0x7; \
+ ad_p->ApCfg.MBSSID[apidx].TimBitmaps[tim_offset] &= (~NUM_BIT8[bit_offset]); }
+
+/* set a station PS TIM bit */
+#define WLAN_MR_TIM_BIT_SET(ad_p, apidx, wcid) \
+ { UCHAR tim_offset = wcid >> 3; \
+ UCHAR bit_offset = wcid & 0x7; \
+ ad_p->ApCfg.MBSSID[apidx].TimBitmaps[tim_offset] |= NUM_BIT8[bit_offset]; }
+
+
+#ifdef CONFIG_AP_SUPPORT
+typedef struct _MULTISSID_STRUCT {
+
+ struct wifi_dev wdev;
+
+#ifdef HOSTAPD_SUPPORT
+ BOOLEAN Hostapd;
+ BOOLEAN HostapdWPS;
+#endif
+
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR SsidLen;
+ CHAR Ssid[MAX_LEN_OF_SSID];
+ USHORT CapabilityInfo;
+
+ UCHAR MaxStaNum; /* Limit the STA connection number per BSS */
+ UCHAR StaCount;
+
+ PNET_DEV MSSIDDev;
+
+ NDIS_802_11_AUTHENTICATION_MODE AuthMode;
+ NDIS_802_11_WEP_STATUS WepStatus;
+ NDIS_802_11_WEP_STATUS GroupKeyWepStatus;
+ WPA_MIX_PAIR_CIPHER WpaMixPairCipher;
+
+ HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode; /* For transmit phy setting in TXWI. */
+ RT_PHY_INFO DesiredHtPhyInfo;
+ DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; /* Desired transmit setting. this is for reading registry setting only. not useful. */
+ BOOLEAN bAutoTxRateSwitch;
+
+ /*MBSS_STATISTICS MbssStat;*/
+ ULONG TxCount;
+ ULONG RxCount;
+ ULONG ReceivedByteCount;
+ ULONG TransmittedByteCount;
+ ULONG RxErrorCount;
+ ULONG RxDropCount;
+
+ ULONG TxErrorCount;
+ ULONG TxDropCount;
+ ULONG ucPktsTx;
+ ULONG ucPktsRx;
+ ULONG mcPktsTx;
+ ULONG mcPktsRx;
+ ULONG bcPktsTx;
+ ULONG bcPktsRx;
+
+ /*CIPHER_KEY SharedKey[SHARE_KEY_NUM]; // ref pAd->SharedKey[BSS][4] */
+ UCHAR DefaultKeyId;
+
+ UCHAR TxRate; /* RATE_1, RATE_2, RATE_5_5, RATE_11, ... */
+ UCHAR DesiredRates[MAX_LEN_OF_SUPPORTED_RATES]; /* OID_802_11_DESIRED_RATES */
+ UCHAR DesiredRatesIndex;
+ UCHAR MaxTxRate; /* RATE_1, RATE_2, RATE_5_5, RATE_11 */
+
+/* ULONG TimBitmap; // bit0 for broadcast, 1 for AID1, 2 for AID2, ...so on */
+/* ULONG TimBitmap2; // b0 for AID32, b1 for AID33, ... and so on */
+ UCHAR TimBitmaps[WLAN_MAX_NUM_OF_TIM];
+
+ /* WPA */
+ UCHAR GMK[32];
+ UCHAR PMK[32];
+ UCHAR GTK[32];
+#ifdef DOT1X_SUPPORT
+ BOOLEAN IEEE8021X;
+ BOOLEAN PreAuth;
+#endif /* DOT1X_SUPPORT */
+ UCHAR GNonce[32];
+ UCHAR PortSecured;
+ NDIS_802_11_PRIVACY_FILTER PrivacyFilter;
+ UCHAR BANClass3Data;
+ ULONG IsolateInterStaTraffic;
+
+ UCHAR RSNIE_Len[2];
+ UCHAR RSN_IE[2][MAX_LEN_OF_RSNIE];
+
+ /* for Group Rekey */
+ RT_WPA_REKEY WPAREKEY;
+ ULONG REKEYCOUNTER;
+ RALINK_TIMER_STRUCT REKEYTimer;
+ UCHAR REKEYTimerRunning;
+ UINT8 RekeyCountDown;
+
+#ifdef WAPI_SUPPORT
+ UCHAR WAPIPassPhrase[64]; /* WAPI PSK pass phrase */
+ UINT WAPIPassPhraseLen; /* the length of WAPI PSK pass phrase */
+ UINT WapiPskType; /* 0 - Hex, 1 - ASCII */
+ UCHAR WAPI_BK[16]; /* WAPI base key */
+
+ UCHAR NMK[LEN_WAPI_NMK];
+ UCHAR key_announce_flag[LEN_WAPI_TSC];
+ BOOLEAN sw_wpi_encrypt; /* WPI data encrypt by SW */
+#endif /* WAPI_SUPPORT */
+
+ UCHAR TimIELocationInBeacon;
+ UCHAR CapabilityInfoLocationInBeacon;
+
+ /* For PMK Cache using */
+ ULONG PMKCachePeriod; /* unit : jiffies */
+ NDIS_AP_802_11_PMKID PMKIDCache;
+
+ /* outgoing BEACON frame buffer and corresponding TXWI */
+ /* TXWI_STRUC *BeaconTxWI; */
+ CHAR BeaconBuf[MAX_BEACON_SIZE]; /* NOTE: BeaconBuf should be 4-byte aligned */
+
+ BOOLEAN bHideSsid;
+ UINT16 StationKeepAliveTime; /* unit: second */
+
+ /* VLAN related */
+ BOOLEAN bVLAN_Tag;
+ USHORT VLAN_VID;
+ USHORT VLAN_Priority;
+
+ RT_802_11_ACL AccessControlList;
+
+ /* EDCA Qos */
+ BOOLEAN bWmmCapable; /* 0:disable WMM, 1:enable WMM */
+ BOOLEAN bDLSCapable; /* 0:disable DLS, 1:enable DLS */
+
+ /*
+ Why need the parameter: 2009/09/22
+
+ 1. iwpriv ra0 set WmmCapable=0
+ 2. iwpriv ra0 set WirelessMode=9
+ 3. iwpriv ra0 set WirelessMode=0
+ 4. iwpriv ra0 set SSID=SampleAP
+
+ After the 4 commands, WMM is still enabled.
+ So we need the parameter to recover WMM Capable flag.
+
+ No the problem in station mode.
+ */
+ BOOLEAN bWmmCapableOrg; /* origin Wmm Capable in non-11n mode */
+
+#ifdef QOS_DLS_SUPPORT
+ UCHAR DlsPTK[64]; /* Due to windows dirver count on meetinghouse to handle 4-way shake */
+#endif /* QOS_DLS_SUPPORT */
+
+#ifdef DOT1X_SUPPORT
+ /* For 802.1x daemon setting per BSS */
+ UINT8 radius_srv_num;
+ RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
+ UINT8 NasId[IFNAMSIZ];
+ UINT8 NasIdLen;
+#endif /* DOT1X_SUPPORT */
+
+#ifdef RTL865X_SOC
+ unsigned int mylinkid;
+#endif
+
+#ifdef CONFIG_AP_SUPPORT
+ WSC_LV_INFO WscIEBeacon;
+ WSC_LV_INFO WscIEProbeResp;
+#ifdef WSC_AP_SUPPORT
+ WSC_CTRL WscControl;
+ WSC_SECURITY_MODE WscSecurityMode;
+#endif /* WSC_AP_SUPPORT */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef IDS_SUPPORT
+ UINT32 RcvdConflictSsidCount;
+ UINT32 RcvdSpoofedAssocRespCount;
+ UINT32 RcvdSpoofedReassocRespCount;
+ UINT32 RcvdSpoofedProbeRespCount;
+ UINT32 RcvdSpoofedBeaconCount;
+ UINT32 RcvdSpoofedDisassocCount;
+ UINT32 RcvdSpoofedAuthCount;
+ UINT32 RcvdSpoofedDeauthCount;
+ UINT32 RcvdSpoofedUnknownMgmtCount;
+ UINT32 RcvdReplayAttackCount;
+
+ CHAR RssiOfRcvdConflictSsid;
+ CHAR RssiOfRcvdSpoofedAssocResp;
+ CHAR RssiOfRcvdSpoofedReassocResp;
+ CHAR RssiOfRcvdSpoofedProbeResp;
+ CHAR RssiOfRcvdSpoofedBeacon;
+ CHAR RssiOfRcvdSpoofedDisassoc;
+ CHAR RssiOfRcvdSpoofedAuth;
+ CHAR RssiOfRcvdSpoofedDeauth;
+ CHAR RssiOfRcvdSpoofedUnknownMgmt;
+ CHAR RssiOfRcvdReplayAttack;
+#endif /* IDS_SUPPORT */
+
+ /* used in if beacon send or stop */
+ BOOLEAN bBcnSntReq;
+ UCHAR BcnBufIdx;
+
+
+
+
+
+ UCHAR PhyMode;
+
+
+ /* UAPSD information: such as enable or disable, do not remove */
+ UAPSD_INFO UapsdInfo;
+
+} MULTISSID_STRUCT, *PMULTISSID_STRUCT;
+#endif /* CONFIG_AP_SUPPORT */
+
+
+/* configuration common to OPMODE_AP as well as OPMODE_STA */
+typedef struct _COMMON_CONFIG {
+ BOOLEAN bCountryFlag;
+ UCHAR CountryCode[3];
+#ifdef EXT_BUILD_CHANNEL_LIST
+ UCHAR Geography;
+ UCHAR DfsType;
+ PUCHAR pChDesp;
+#endif /* EXT_BUILD_CHANNEL_LIST */
+ UCHAR CountryRegion; /* Enum of country region, 0:FCC, 1:IC, 2:ETSI, 3:SPAIN, 4:France, 5:MKK, 6:MKK1, 7:Israel */
+ UCHAR CountryRegionForABand; /* Enum of country region for A band */
+ UCHAR PhyMode;
+ UCHAR cfg_wmode;
+ UCHAR SavedPhyMode;
+ USHORT Dsifs; /* in units of usec */
+ ULONG PacketFilter; /* Packet filter for receiving */
+ UINT8 RegulatoryClass[MAX_NUM_OF_REGULATORY_CLASS];
+
+ CHAR Ssid[MAX_LEN_OF_SSID]; /* NOT NULL-terminated */
+ UCHAR SsidLen; /* the actual ssid length in used */
+ UCHAR LastSsidLen; /* the actual ssid length in used */
+ CHAR LastSsid[MAX_LEN_OF_SSID]; /* NOT NULL-terminated */
+ UCHAR LastBssid[MAC_ADDR_LEN];
+
+ UCHAR Bssid[MAC_ADDR_LEN];
+ USHORT BeaconPeriod;
+ UCHAR Channel;
+ UCHAR CentralChannel; /* Central Channel when using 40MHz is indicating. not real channel. */
+
+ UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR SupRateLen;
+ UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
+ UCHAR ExtRateLen;
+ UCHAR DesireRate[MAX_LEN_OF_SUPPORTED_RATES]; /* OID_802_11_DESIRED_RATES */
+ UCHAR MaxDesiredRate;
+ UCHAR ExpectedACKRate[MAX_LEN_OF_SUPPORTED_RATES];
+
+ ULONG BasicRateBitmap; /* backup basic ratebitmap */
+ ULONG BasicRateBitmapOld; /* backup basic ratebitmap */
+
+ BOOLEAN bInServicePeriod;
+
+
+ BOOLEAN bAPSDAC_BE;
+ BOOLEAN bAPSDAC_BK;
+ BOOLEAN bAPSDAC_VI;
+ BOOLEAN bAPSDAC_VO;
+
+
+ /* because TSPEC can modify the APSD flag, we need to keep the APSD flag
+ requested in association stage from the station;
+ we need to recover the APSD flag after the TSPEC is deleted. */
+ BOOLEAN bACMAPSDBackup[4]; /* for delivery-enabled & trigger-enabled both */
+ BOOLEAN bACMAPSDTr[4]; /* no use */
+ UCHAR MaxSPLength;
+
+ BOOLEAN bNeedSendTriggerFrame;
+ BOOLEAN bAPSDForcePowerSave; /* Force power save mode, should only use in APSD-STAUT */
+ ULONG TriggerTimerCount;
+ UCHAR BBPCurrentBW; /* BW_10, BW_20, BW_40, BW_80 */
+ REG_TRANSMIT_SETTING RegTransmitSetting; /*registry transmit setting. this is for reading registry setting only. not useful. */
+ UCHAR TxRate; /* Same value to fill in TXD. TxRate is 6-bit */
+ UCHAR MaxTxRate; /* RATE_1, RATE_2, RATE_5_5, RATE_11 */
+ UCHAR TxRateIndex; /* Tx rate index in RateSwitchTable */
+ UCHAR MinTxRate; /* RATE_1, RATE_2, RATE_5_5, RATE_11 */
+ UCHAR RtsRate; /* RATE_xxx */
+ HTTRANSMIT_SETTING MlmeTransmit; /* MGMT frame PHY rate setting when operatin at Ht rate. */
+ UCHAR MlmeRate; /* RATE_xxx, used to send MLME frames */
+ UCHAR BasicMlmeRate; /* Default Rate for sending MLME frames */
+
+ USHORT RtsThreshold; /* in unit of BYTE */
+ USHORT FragmentThreshold; /* in unit of BYTE */
+
+ UCHAR TxPower; /* in unit of mW */
+ ULONG TxPowerPercentage; /* 0~100 % */
+ ULONG TxPowerDefault; /* keep for TxPowerPercentage */
+ UINT8 PwrConstraint;
+
+#ifdef DOT11_N_SUPPORT
+ BACAP_STRUC BACapability; /* NO USE = 0XFF ; IMMED_BA =1 ; DELAY_BA=0 */
+ BACAP_STRUC REGBACapability; /* NO USE = 0XFF ; IMMED_BA =1 ; DELAY_BA=0 */
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef DOT11_VHT_AC
+ BOOLEAN force_vht;
+ UCHAR vht_bw;
+ UCHAR vht_cent_ch;
+ UCHAR vht_cent_ch2;
+#endif /* DOT11_VHT_AC */
+
+ IOT_STRUC IOTestParm; /* 802.11n InterOpbility Test Parameter; */
+ ULONG TxPreamble; /* Rt802_11PreambleLong, Rt802_11PreambleShort, Rt802_11PreambleAuto */
+ BOOLEAN bUseZeroToDisableFragment; /* Microsoft use 0 as disable */
+ ULONG UseBGProtection; /* 0: auto, 1: always use, 2: always not use */
+ BOOLEAN bUseShortSlotTime; /* 0: disable, 1 - use short slot (9us) */
+ BOOLEAN bEnableTxBurst; /* 1: enble TX PACKET BURST (when BA is established or AP is not a legacy WMM AP), 0: disable TX PACKET BURST */
+ BOOLEAN bAggregationCapable; /* 1: enable TX aggregation when the peer supports it */
+ BOOLEAN bPiggyBackCapable; /* 1: enable TX piggy-back according MAC's version */
+ BOOLEAN bIEEE80211H; /* 1: enable IEEE802.11h spec. */
+ UCHAR RDDurRegion; /* Region of radar detection */
+ ULONG DisableOLBCDetect; /* 0: enable OLBC detect; 1 disable OLBC detect */
+
+#ifdef DOT11_N_SUPPORT
+ BOOLEAN bRdg;
+#endif /* DOT11_N_SUPPORT */
+ BOOLEAN bWmmCapable; /* 0:disable WMM, 1:enable WMM */
+ QOS_CAPABILITY_PARM APQosCapability; /* QOS capability of the current associated AP */
+ EDCA_PARM APEdcaParm; /* EDCA parameters of the current associated AP */
+ QBSS_LOAD_PARM APQbssLoad; /* QBSS load of the current associated AP */
+ UCHAR AckPolicy[4]; /* ACK policy of the specified AC. see ACK_xxx */
+ /* a bitmap of BOOLEAN flags. each bit represent an operation status of a particular */
+ /* BOOLEAN control, either ON or OFF. These flags should always be accessed via */
+ /* OPSTATUS_TEST_FLAG(), OPSTATUS_SET_FLAG(), OP_STATUS_CLEAR_FLAG() macros. */
+ /* see fOP_STATUS_xxx in RTMP_DEF.C for detail bit definition */
+ ULONG OpStatusFlags;
+
+ BOOLEAN NdisRadioStateOff; /*For HCT 12.0, set this flag to TRUE instead of called MlmeRadioOff. */
+
+#ifdef DFS_SUPPORT
+ /* IEEE802.11H--DFS. */
+ RADAR_DETECT_STRUCT RadarDetect;
+#endif /* DFS_SUPPORT */
+#ifdef CARRIER_DETECTION_SUPPORT
+ CARRIER_DETECTION_STRUCT CarrierDetect;
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#ifdef DOT11_N_SUPPORT
+ /* HT */
+ RT_HT_CAPABILITY DesiredHtPhy;
+ HT_CAPABILITY_IE HtCapability;
+ ADD_HT_INFO_IE AddHTInfo; /* Useful as AP. */
+ /*This IE is used with channel switch announcement element when changing to a new 40MHz. */
+ /*This IE is included in channel switch ammouncement frames 7.4.1.5, beacons, probe Rsp. */
+ NEW_EXT_CHAN_IE NewExtChanOffset; /*7.3.2.20A, 1 if extension channel is above the control channel, 3 if below, 0 if not present */
+
+ EXT_CAP_INFO_ELEMENT ExtCapIE; /* this is the extened capibility IE appreed in MGMT frames. Doesn't need to update once set in Init. */
+
+#ifdef DOT11N_DRAFT3
+ BOOLEAN bBssCoexEnable;
+ /*
+ Following two paramters now only used for the initial scan operation. the AP only do
+ bandwidth fallback when BssCoexApCnt > BssCoexApCntThr
+ By default, the "BssCoexApCntThr" is set as 0 in "UserCfgInit()".
+ */
+ UCHAR BssCoexApCntThr;
+ UCHAR BssCoexApCnt;
+
+ UCHAR Bss2040CoexistFlag; /* bit 0: bBssCoexistTimerRunning, bit 1: NeedSyncAddHtInfo. */
+ RALINK_TIMER_STRUCT Bss2040CoexistTimer;
+ UCHAR Bss2040NeedFallBack; /* 1: Need Fall back to 20MHz */
+
+ /*This IE is used for 20/40 BSS Coexistence. */
+ BSS_2040_COEXIST_IE BSS2040CoexistInfo;
+
+ USHORT Dot11OBssScanPassiveDwell; /* Unit : TU. 5~1000 */
+ USHORT Dot11OBssScanActiveDwell; /* Unit : TU. 10~1000 */
+ USHORT Dot11BssWidthTriggerScanInt; /* Unit : Second */
+ USHORT Dot11OBssScanPassiveTotalPerChannel; /* Unit : TU. 200~10000 */
+ USHORT Dot11OBssScanActiveTotalPerChannel; /* Unit : TU. 20~10000 */
+ USHORT Dot11BssWidthChanTranDelayFactor;
+ USHORT Dot11OBssScanActivityThre; /* Unit : percentage */
+
+ ULONG Dot11BssWidthChanTranDelay; /* multiple of (Dot11BssWidthTriggerScanInt * Dot11BssWidthChanTranDelayFactor) */
+ ULONG CountDownCtr; /* CountDown Counter from (Dot11BssWidthTriggerScanInt * Dot11BssWidthChanTranDelayFactor) */
+
+ BSS_2040_COEXIST_IE LastBSSCoexist2040;
+ BSS_2040_COEXIST_IE BSSCoexist2040;
+ TRIGGER_EVENT_TAB TriggerEventTab;
+ UCHAR ChannelListIdx;
+
+ BOOLEAN bOverlapScanning;
+ BOOLEAN bBssCoexNotify;
+#endif /* DOT11N_DRAFT3 */
+
+ BOOLEAN bHTProtect;
+ BOOLEAN bMIMOPSEnable;
+ BOOLEAN bBADecline;
+ BOOLEAN bDisableReordering;
+ BOOLEAN bForty_Mhz_Intolerant;
+ BOOLEAN bExtChannelSwitchAnnouncement;
+ BOOLEAN bRcvBSSWidthTriggerEvents;
+ ULONG LastRcvBSSWidthTriggerEventsTime;
+
+ UCHAR TxBASize;
+
+ BOOLEAN bRalinkBurstMode;
+ UINT32 RestoreBurstMode;
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef DOT11_VHT_AC
+ UINT32 cfg_vht;
+ VHT_CAP_INFO vht_info;
+#endif /* DOT11_VHT_AC */
+
+#ifdef SYSTEM_LOG_SUPPORT
+ /* Enable wireless event */
+ BOOLEAN bWirelessEvent;
+#endif /* SYSTEM_LOG_SUPPORT */
+
+ BOOLEAN bWiFiTest; /* Enable this parameter for WiFi test */
+
+ /* Tx & Rx Stream number selection */
+ UCHAR TxStream;
+ UCHAR RxStream;
+
+ /* transmit phy mode, trasmit rate for Multicast. */
+#ifdef MCAST_RATE_SPECIFIC
+ UCHAR McastTransmitMcs;
+ UCHAR McastTransmitPhyMode;
+#endif /* MCAST_RATE_SPECIFIC */
+
+ BOOLEAN bHardwareRadio; /* Hardware controlled Radio enabled */
+
+#ifdef RTMP_MAC_USB
+ BOOLEAN bMultipleIRP; /* Multiple Bulk IN flag */
+ UCHAR NumOfBulkInIRP; /* if bMultipleIRP == TRUE, NumOfBulkInIRP will be 4 otherwise be 1 */
+ RT_HT_CAPABILITY SupportedHtPhy;
+ ULONG MaxPktOneTxBulk;
+ UCHAR TxBulkFactor;
+ UCHAR RxBulkFactor;
+
+ BOOLEAN IsUpdateBeacon;
+ BEACON_SYNC_STRUCT *pBeaconSync;
+ RALINK_TIMER_STRUCT BeaconUpdateTimer;
+ UINT32 BeaconAdjust;
+ UINT32 BeaconFactor;
+ UINT32 BeaconRemain;
+#endif /* RTMP_MAC_USB */
+
+#ifdef WSC_INCLUDED
+ /* WSC hardware push button function 0811 */
+ UINT8 WscHdrPshBtnCheckCount;
+#endif /* WSC_INCLUDED */
+
+
+ NDIS_SPIN_LOCK MeasureReqTabLock;
+ PMEASURE_REQ_TAB pMeasureReqTab;
+
+ NDIS_SPIN_LOCK TpcReqTabLock;
+ PTPC_REQ_TAB pTpcReqTab;
+
+ /* transmit phy mode, trasmit rate for Multicast. */
+#ifdef MCAST_RATE_SPECIFIC
+ HTTRANSMIT_SETTING MCastPhyMode;
+#endif /* MCAST_RATE_SPECIFIC */
+
+#ifdef SINGLE_SKU
+ UINT16 DefineMaxTxPwr;
+ BOOLEAN bSKUMode;
+ UINT16 AntGain;
+ UINT16 BandedgeDelta;
+ UINT16 ModuleTxpower;
+#endif /* SINGLE_SKU */
+
+#ifdef WAPI_SUPPORT
+ COMMON_WAPI_INFO comm_wapi_info;
+
+ /* rekey related parameter */
+ /* USK update parameter */
+ UINT8 wapi_usk_rekey_method; /* 0:disable , 1:time, 2:packet */
+ UINT32 wapi_usk_rekey_threshold; /* the rekey threshold */
+
+ /* MSK update parameter */
+ UINT8 wapi_msk_rekey_method; /* 0:disable , 1:time, 2:packet */
+ UINT32 wapi_msk_rekey_threshold; /* the rekey threshold */
+
+ UINT32 wapi_msk_rekey_cnt;
+ RALINK_TIMER_STRUCT WapiMskRekeyTimer;
+ UCHAR WapiMskRekeyTimerRunning;
+#endif /* WAPI_SUPPORT */
+
+
+ BOOLEAN HT_DisallowTKIP; /* Restrict the encryption type in 11n HT mode */
+
+ BOOLEAN HT_Disable; /* 1: disable HT function; 0: enable HT function */
+
+
+#ifdef PRE_ANT_SWITCH
+ BOOLEAN PreAntSwitch; /* Preamble Antenna Switch */
+ SHORT PreAntSwitchRSSI; /* Preamble Antenna Switch RSSI threshold */
+ SHORT PreAntSwitchTimeout; /* Preamble Antenna Switch timeout in seconds */
+#endif /* PRE_ANT_SWITCH */
+
+#ifdef CFO_TRACK
+ SHORT CFOTrack; /* CFO Tracking. 0=>use default, 1=>track, 2-7=> track 8-n times, 8=>done tracking */
+#endif /* CFO_TRACK */
+
+#ifdef NEW_RATE_ADAPT_SUPPORT
+ USHORT lowTrafficThrd; /* Threshold for reverting to default MCS when traffic is low */
+ BOOLEAN TrainUpRule; /* QuickDRS train up criterion: 0=>Throughput, 1=>PER, 2=> Throughput & PER */
+ SHORT TrainUpRuleRSSI; /* If TrainUpRule=2 then use Hybrid rule when RSSI < TrainUpRuleRSSI */
+ USHORT TrainUpLowThrd; /* QuickDRS Hybrid train up low threshold */
+ USHORT TrainUpHighThrd; /* QuickDRS Hybrid train up high threshold */
+#endif /* NEW_RATE_ADAPT_SUPPORT */
+
+#ifdef STREAM_MODE_SUPPORT
+#define STREAM_MODE_STA_NUM 4
+
+ UCHAR StreamMode; /* 0=disabled, 1=enable for 1SS, 2=enable for 2SS, 3=enable for 1,2SS */
+ UCHAR StreamModeMac[STREAM_MODE_STA_NUM][MAC_ADDR_LEN];
+ UINT16 StreamModeMCS; /* Bit map for enabling Stream Mode based on MCS */
+#endif /* STREAM_MODE_SUPPORT */
+
+#ifdef DOT11_N_SUPPORT
+#ifdef TXBF_SUPPORT
+ ULONG ITxBfTimeout;
+ ULONG ETxBfTimeout;
+ ULONG ETxBfEnCond; /* Enable sending of sounding and beamforming */
+ BOOLEAN ETxBfNoncompress; /* Force non-compressed Sounding Response */
+ BOOLEAN ETxBfIncapable; /* Report Incapable of BF in TX BF Capabilities */
+#endif /* TXBF_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef DBG_CTRL_SUPPORT
+ ULONG DebugFlags; /* Temporary debug flags */
+#endif /* DBG_CTRL_SUPPORT */
+
+
+#ifdef WSC_INCLUDED
+ BOOLEAN WscPBCOverlap;
+ WSC_STA_PBC_PROBE_INFO WscStaPbcProbeInfo;
+#endif /* WSC_INCLUDED */
+
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+ MO_CFG_STRUCT MO_Cfg; /* data structure for mitigating microwave interference */
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+
+} COMMON_CONFIG, *PCOMMON_CONFIG;
+
+#ifdef DBG_CTRL_SUPPORT
+/* DebugFlag definitions */
+#define DBF_NO_BF_AWARE_RA 0x0001 /* Revert to older Rate Adaptation that is not BF aware */
+#define DBF_SHOW_BF_STATS 0x0002 /* Display BF statistics in AP "iwpriv stat" display */
+#define DBF_NO_TXBF_3SS 0x0004 /* Disable TXBF for MCS > 20 */
+#define DBF_UNUSED0008 0x0008 /* Unused */
+#define DBF_DBQ_RA_LOG 0x0010 /* Log RA information in DBQ */
+#define DBF_INIT_MCS_MARGIN 0x0020 /* Use 6 dB margin when selecting initial MCS */
+#define DBF_INIT_MCS_DIS1 0x0040 /* Disable highest MCSs when selecting initial MCS */
+#define DBF_FORCE_QUICK_DRS 0x0080 /* Force Quick DRS even if rate didn't change */
+#define DBF_FORCE_SGI 0x0100 /* Force Short GI */
+#define DBF_DBQ_NO_BCN 0x0200 /* Disable logging of RX Beacon frames */
+#define DBF_LOG_VCO_CAL 0x0400 /* Log VCO cal */
+#define DBF_DISABLE_CAL 0x0800 /* Disable Divider Calibration at channel change */
+#ifdef INCLUDE_DEBUG_QUEUE
+#define DBF_DBQ_TXFIFO 0x1000 /* Enable logging of TX information from FIFO */
+#define DBF_DBQ_TXFRAME 0x2000 /* Enable logging of Frames queued for TX */
+#define DBF_DBQ_RXWI_FULL 0x4000 /* Enable logging of full RXWI */
+#define DBF_DBQ_RXWI 0x8000 /* Enable logging of partial RXWI */
+#endif /* INCLUDE_DEBUG_QUEUE */
+
+#define DBF_SHOW_RA_LOG 0x010000 /* Display concise Rate Adaptation information */
+#define DBF_SHOW_ZERO_RA_LOG 0x020000 /* Include RA Log entries when TxCount is 0 */
+#define DBF_FORCE_20MHZ 0x040000 /* Force 20 MHz TX */
+#define DBF_FORCE_40MHZ 0x080000 /* Force 40 MHz Tx */
+#define DBF_DISABLE_CCK 0x100000 /* Disable CCK */
+#define DBF_UNUSED200000 0x200000 /* Unused */
+#define DBF_ENABLE_HT_DUP 0x400000 /* Allow HT Duplicate mode in TX rate table */
+#define DBF_ENABLE_CCK_5G 0x800000 /* Enable CCK rates in 5G band */
+#define DBF_UNUSED0100000 0x0100000 /* Unused */
+#define DBF_ENABLE_20MHZ_MCS8 0x02000000 /* Substitute 20MHz MCS8 for 40MHz MCS8 */
+#define DBF_DISABLE_20MHZ_MCS0 0x04000000 /* Disable substitution of 20MHz MCS0 for 40MHz MCS32 */
+#define DBF_DISABLE_20MHZ_MCS1 0x08000000 /* Disable substitution of 20MHz MCS1 for 40MHz MCS0 */
+#endif /* DBG_CTRL_SUPPORT */
+
+
+
+#ifdef CONFIG_AP_SUPPORT
+/***************************************************************************
+ * AP related data structures
+ **************************************************************************/
+/* AUTH-RSP State Machine Aux data structure */
+typedef struct _AP_MLME_AUX {
+ UCHAR Addr[MAC_ADDR_LEN];
+ USHORT Alg;
+ CHAR Challenge[CIPHER_TEXT_LEN];
+} AP_MLME_AUX, *PAP_MLME_AUX;
+
+typedef enum _MAC_ENTRY_OP_MODE_ {
+ ENTRY_OP_MODE_ERROR = 0x00,
+ ENTRY_OP_MODE_CLI = 0x01, /* Sta mode, set this TRUE after Linkup,too. */
+ ENTRY_OP_MODE_WDS = 0x02, /* This is WDS Entry. only for AP mode. */
+ ENTRY_OP_MODE_APCLI = 0x04, /* This is a AP-Client entry, only for AP mode which enable AP-Client functions. */
+ ENTRY_OP_MODE_MESH = 0x08, /* Peer conect with us via mesh. */
+ ENTRY_OP_MODE_DLS = 0x10, /* This is DLS Entry. only for STA mode. */
+ ENTRY_OP_MODE_MAX = 0x20
+} MAC_ENTRY_OP_MODE;
+#endif /* CONFIG_AP_SUPPORT */
+
+/* Values of LastSecTxRateChangeAction */
+#define RATE_NO_CHANGE 0 /* No change in rate */
+#define RATE_UP 1 /* Trying higher rate or same rate with different BF */
+#define RATE_DOWN 2 /* Trying lower rate */
+
+
+typedef struct _MAC_TABLE_ENTRY {
+ /*
+ 0:Invalid,
+ Bit 0: AsCli, Bit 1: AsWds, Bit 2: AsAPCLI,
+ Bit 3: AsMesh, Bit 4: AsDls, Bit 5: AsTDls
+ */
+ UINT32 EntryType;
+
+ BOOLEAN isCached;
+ BOOLEAN bIAmBadAtheros; /* Flag if this is Atheros chip that has IOT problem. We need to turn on RTS/CTS protection. */
+
+ /* WPA/WPA2 4-way database */
+ UCHAR EnqueueEapolStartTimerRunning; /* Enqueue EAPoL-Start for triggering EAP SM */
+ RALINK_TIMER_STRUCT EnqueueStartForPSKTimer; /* A timer which enqueue EAPoL-Start for triggering PSK SM */
+
+ /*jan for wpa */
+ /* record which entry revoke MIC Failure , if it leaves the BSS itself, AP won't update aMICFailTime MIB */
+ UCHAR CMTimerRunning;
+ UCHAR apidx; /* MBSS number */
+ UCHAR RSNIE_Len;
+ UCHAR RSN_IE[MAX_LEN_OF_RSNIE];
+ UCHAR ANonce[LEN_KEY_DESC_NONCE];
+ UCHAR SNonce[LEN_KEY_DESC_NONCE];
+ UCHAR R_Counter[LEN_KEY_DESC_REPLAY];
+ UCHAR PTK[64];
+ UCHAR ReTryCounter;
+ RALINK_TIMER_STRUCT RetryTimer;
+#ifdef TXBF_SUPPORT
+ RALINK_TIMER_STRUCT eTxBfProbeTimer;
+#endif /* TXBF_SUPPORT */
+ NDIS_802_11_AUTHENTICATION_MODE AuthMode; /* This should match to whatever microsoft defined */
+ NDIS_802_11_WEP_STATUS WepStatus;
+ NDIS_802_11_WEP_STATUS GroupKeyWepStatus;
+ UINT8 WpaState;
+ UINT8 GTKState;
+ USHORT PortSecured;
+ NDIS_802_11_PRIVACY_FILTER PrivacyFilter; /* PrivacyFilter enum for 802.1X */
+ CIPHER_KEY PairwiseKey;
+ PVOID pAd;
+ INT PMKID_CacheIdx;
+ UCHAR PMKID[LEN_PMKID];
+ UCHAR NegotiatedAKM[LEN_OUI_SUITE]; /* It indicate the negotiated AKM suite */
+
+#ifdef WAPI_SUPPORT
+ UCHAR usk_id; /* unicast key index for WPI */
+#endif /* WAPI_SUPPORT */
+
+ UCHAR Addr[MAC_ADDR_LEN];
+ UCHAR HdrAddr1[MAC_ADDR_LEN];
+ UCHAR HdrAddr2[MAC_ADDR_LEN];
+ UCHAR HdrAddr3[MAC_ADDR_LEN];
+ UCHAR PsMode;
+ UCHAR FlgPsModeIsWakeForAWhile; /* wake up for a while until a condition */
+ UCHAR VirtualTimeout; /* peer power save virtual timeout */
+ SST Sst;
+ AUTH_STATE AuthState; /* for SHARED KEY authentication state machine used only */
+ BOOLEAN IsReassocSta; /* Indicate whether this is a reassociation procedure */
+ USHORT Aid;
+ USHORT CapabilityInfo;
+ UCHAR LastRssi;
+ ULONG NoDataIdleCount;
+ UINT16 StationKeepAliveCount; /* unit: second */
+ ULONG PsQIdleCount;
+ QUEUE_HEADER PsQueue;
+
+ UINT32 StaConnectTime; /* the live time of this station since associated with AP */
+ UINT32 StaIdleTimeout; /* idle timeout per entry */
+
+#ifdef UAPSD_SUPPORT
+ /* these UAPSD states are used on the fly */
+ /* 0:AC_BK, 1:AC_BE, 2:AC_VI, 3:AC_VO */
+ BOOLEAN bAPSDCapablePerAC[4]; /* for trigger-enabled */
+ BOOLEAN bAPSDDeliverEnabledPerAC[4]; /* for delivery-enabled */
+
+
+ UCHAR MaxSPLength;
+
+ BOOLEAN bAPSDAllAC; /* 1: all AC are delivery-enabled U-APSD */
+
+ QUEUE_HEADER UAPSDQueue[WMM_NUM_OF_AC]; /* queue for each U-APSD */
+ USHORT UAPSDQIdleCount; /* U-APSD queue timeout */
+
+ PQUEUE_ENTRY pUAPSDEOSPFrame; /* the last U-APSD frame */
+ USHORT UAPSDTxNum; /* total U-APSD frame number */
+ BOOLEAN bAPSDFlagEOSPOK; /* 1: EOSP frame is tx by ASIC */
+ BOOLEAN bAPSDFlagSPStart; /* 1: SP is started */
+
+ /* need to use unsigned long, because time parameters in OS is defined as
+ unsigned long */
+ unsigned long UAPSDTimeStampLast; /* unit: 1000000/OS_HZ */
+ BOOLEAN bAPSDFlagSpRoughUse; /* 1: use rough SP (default: accurate) */
+
+ /* we will set the flag when PS-poll frame is received and
+ clear it when statistics handle.
+ if the flag is set when PS-poll frame is received then calling
+ statistics handler to clear it. */
+ BOOLEAN bAPSDFlagLegacySent; /* 1: Legacy PS sent but
+ yet statistics handle */
+
+#ifdef RTMP_MAC_USB
+ UINT32 UAPSDTagOffset[WMM_NUM_OF_AC];
+#endif /* RTMP_MAC_USB */
+#endif /* UAPSD_SUPPORT */
+
+#ifdef DOT11_N_SUPPORT
+ BOOLEAN bSendBAR;
+ USHORT NoBADataCountDown;
+
+ UINT32 CachedBuf[16]; /* UINT (4 bytes) for alignment */
+
+#ifdef TXBF_SUPPORT
+ COUNTER_TXBF TxBFCounters; /* TxBF Statistics */
+ UINT LastETxCount; /* Used to compute %BF statistics */
+ UINT LastITxCount;
+ UINT LastTxCount;
+#endif /* TXBF_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef STREAM_MODE_SUPPORT
+ UINT32 StreamModeMACReg; /* MAC reg used to control stream mode for this client. 0=>No stream mode */
+#endif // STREAM_MODE_SUPPORT //
+
+ UINT FIFOCount;
+ UINT DebugFIFOCount;
+ UINT DebugTxCount;
+ BOOLEAN bDlsInit;
+
+/*==================================================== */
+/*WDS entry needs these */
+/* If ValidAsWDS==TRUE, MatchWDSTabIdx is the index in WdsTab.MacTab */
+ UINT MatchWDSTabIdx;
+ UCHAR MaxSupportedRate;
+ UCHAR CurrTxRate;
+ UCHAR CurrTxRateIndex;
+ UCHAR lastRateIdx;
+ UCHAR *pTable; /* Pointer to this entry's Tx Rate Table */
+
+#ifdef NEW_RATE_ADAPT_SUPPORT
+ UCHAR lowTrafficCount;
+ UCHAR fewPktsCnt;
+ BOOLEAN perThrdAdj;
+ UCHAR mcsGroup;/*the mcs group to be tried */
+#endif /* NEW_RATE_ADAPT_SUPPORT */
+ enum RATE_ADAPT_ALG rateAlg;
+
+#ifdef MFB_SUPPORT
+ UCHAR lastLegalMfb; /*last legal mfb which is used to set rate */
+ BOOLEAN isMfbChanged; /*purpose: true when mfb has changed but the new mfb is not adopted for Tx */
+ struct _RTMP_RA_LEGACY_TB *LegalMfbRS;
+ BOOLEAN fLastChangeAccordingMfb;
+ NDIS_SPIN_LOCK fLastChangeAccordingMfbLock;
+/*Tx MRQ */
+ BOOLEAN toTxMrq;
+ UCHAR msiToTx, mrqCnt; /*mrqCnt is used to count down the inverted-BF mrq to be sent */
+/*Rx mfb */
+ UCHAR pendingMfsi;
+/*Tx MFB */
+ BOOLEAN toTxMfb;
+ UCHAR mfbToTx;
+ UCHAR mfb0, mfb1;
+#endif /* MFB_SUPPORT */
+#ifdef TXBF_SUPPORT
+ UCHAR TxSndgType;
+ NDIS_SPIN_LOCK TxSndgLock;
+
+/* ETxBF */
+ UCHAR bfState;
+ UCHAR sndgMcs;
+ UCHAR sndgBW;
+ INT sndg0Snr0, sndg0Snr1, sndg0Snr2;
+ UCHAR sndg0Mcs;
+#ifdef ETXBF_EN_COND3_SUPPORT
+ UCHAR bestMethod;
+ UCHAR sndgRateIdx;
+ UCHAR bf0Mcs, sndg0RateIdx, bf0RateIdx;
+ UCHAR sndg1Mcs, bf1Mcs, sndg1RateIdx, bf1RateIdx;
+ INT sndg1Snr0, sndg1Snr1, sndg1Snr2;
+#endif /* ETXBF_EN_COND3_SUPPORT */
+ UCHAR noSndgCnt;
+ UCHAR eTxBfEnCond;
+ UCHAR noSndgCntThrd, ndpSndgStreams;
+ UCHAR iTxBfEn;
+
+ BOOLEAN phyETxBf; /* True=>Set ETxBF bit in PHY rate */
+ BOOLEAN phyITxBf; /* True=>Set ITxBF bit in PHY rate */
+ UCHAR lastNonBfRate; /* Last good non-BF rate */
+ BOOLEAN lastRatePhyTxBf; /* For Quick Check. True if last rate was BF */
+ USHORT BfTxQuality[MAX_TX_RATE_INDEX + 1]; /* Beamformed TX Quality */
+#endif /* TXBF_SUPPORT */
+
+ /* to record the each TX rate's quality. 0 is best, the bigger the worse. */
+ USHORT TxQuality[MAX_TX_RATE_INDEX + 1];
+ UINT32 OneSecTxNoRetryOkCount;
+ UINT32 OneSecTxRetryOkCount;
+ UINT32 OneSecTxFailCount;
+ UINT32 OneSecRxLGICount; /* unicast-to-me Long GI count */
+ UINT32 OneSecRxSGICount; /* unicast-to-me Short GI count */
+
+#ifdef FIFO_EXT_SUPPORT
+ UINT32 fifoTxSucCnt;
+ UINT32 fifoTxRtyCnt;
+#endif /* FIFO_EXT_SUPPORT */
+
+
+ BOOLEAN fLastSecAccordingRSSI;
+ UCHAR LastSecTxRateChangeAction; /* 0: no change, 1:rate UP, 2:rate down */
+ CHAR LastTimeTxRateChangeAction; /*Keep last time value of LastSecTxRateChangeAction */
+ ULONG LastTxOkCount; /* TxSuccess count in last Rate Adaptation interval */
+ UCHAR LastTxPER; /* Tx PER in last Rate Adaptation interval */
+ UCHAR PER[MAX_TX_RATE_INDEX + 1];
+
+ UINT32 ContinueTxFailCnt;
+ UINT32 CurrTxRateStableTime; /* # of second in current TX rate */
+ UCHAR TxRateUpPenalty; /* extra # of second penalty due to last unstable condition */
+#ifdef WDS_SUPPORT
+ BOOLEAN LockEntryTx; /* TRUE = block to WDS Entry traffic, FALSE = not. */
+#endif /* WDS_SUPPORT */
+ ULONG TimeStamp_toTxRing;
+
+/*==================================================== */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+ UINT MatchAPCLITabIdx; /* indicate the index in ApCfg.ApCliTab. */
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+
+ /*
+ A bitmap of BOOLEAN flags. each bit represent an operation status of a particular
+ BOOLEAN control, either ON or OFF. These flags should always be accessed via
+ CLIENT_STATUS_TEST_FLAG(), CLIENT_STATUS_SET_FLAG(), CLIENT_STATUS_CLEAR_FLAG() macros.
+ see fOP_STATUS_xxx in RTMP_DEF.C for detail bit definition. fCLIENT_STATUS_AMSDU_INUSED
+ */
+ ULONG ClientStatusFlags;
+
+ HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode; /* For transmit phy setting in TXWI. */
+
+#ifdef DOT11_N_SUPPORT
+ /* HT EWC MIMO-N used parameters */
+ USHORT RXBAbitmap; /* fill to on-chip RXWI_BA_BITMASK in 8.1.3RX attribute entry format */
+ USHORT TXBAbitmap; /* This bitmap as originator, only keep in software used to mark AMPDU bit in TXWI */
+ USHORT TXAutoBAbitmap;
+ USHORT BADeclineBitmap;
+ USHORT BARecWcidArray[NUM_OF_TID]; /* The mapping wcid of recipient session. if RXBAbitmap bit is masked */
+ USHORT BAOriWcidArray[NUM_OF_TID]; /* The mapping wcid of originator session. if TXBAbitmap bit is masked */
+ USHORT BAOriSequence[NUM_OF_TID]; /* The mapping wcid of originator session. if TXBAbitmap bit is masked */
+
+ /* 802.11n features. */
+ UCHAR MpduDensity;
+ UCHAR MaxRAmpduFactor;
+ UCHAR AMsduSize;
+ UCHAR MmpsMode; /* MIMO power save more. */
+
+ HT_CAPABILITY_IE HTCapability;
+
+#ifdef DOT11N_DRAFT3
+ UCHAR BSS2040CoexistenceMgmtSupport;
+ BOOLEAN bForty_Mhz_Intolerant;
+#endif /* DOT11N_DRAFT3 */
+
+#ifdef DOT11_VHT_AC
+ VHT_CAP_IE vht_cap_ie;
+#endif /* DOT11_VHT_AC */
+
+#endif /* DOT11_N_SUPPORT */
+
+
+ BOOLEAN bAutoTxRateSwitch;
+
+ UCHAR RateLen;
+ struct _MAC_TABLE_ENTRY *pNext;
+ USHORT TxSeq[NUM_OF_TID];
+ USHORT NonQosDataSeq;
+
+ RSSI_SAMPLE RssiSample;
+ UINT32 LastRxRate;
+ SHORT freqOffset; /* Last RXWI FOFFSET */
+ SHORT freqOffsetValid; /* Set when freqOffset field has been updated */
+
+
+ BOOLEAN bWscCapable;
+ UCHAR Receive_EapolStart_EapRspId;
+
+ UINT32 TXMCSExpected[MAX_MCS_SET];
+ UINT32 TXMCSSuccessful[MAX_MCS_SET];
+ UINT32 TXMCSFailed[MAX_MCS_SET];
+ UINT32 TXMCSAutoFallBack[MAX_MCS_SET][MAX_MCS_SET];
+
+
+#ifdef WAPI_SUPPORT
+ BOOLEAN WapiUskRekeyTimerRunning;
+ RALINK_TIMER_STRUCT WapiUskRekeyTimer;
+ UINT32 wapi_usk_rekey_cnt;
+#endif /* WAPI_SUPPORT */
+
+
+ ULONG AssocDeadLine;
+
+
+
+
+ ULONG ChannelQuality; /* 0..100, Channel Quality Indication for Roaming */
+
+
+#ifdef CONFIG_AP_SUPPORT
+ MULTISSID_STRUCT *pMbss;
+#endif /* CONFIG_AP_SUPPORT */
+#ifdef VENDOR_FEATURE1_SUPPORT
+ /* total 128B, use UINT32 to avoid alignment problem */
+ UINT32 HeaderBuf[32]; /* (total 128B) TempBuffer for TX_INFO + TX_WI + 802.11 Header + padding + AMSDU SubHeader + LLC/SNAP */
+
+ UCHAR HdrPadLen; /* recording Header Padding Length; */
+ UCHAR MpduHeaderLen;
+ UINT16 Protocol;
+#endif /* VENDOR_FEATURE1_SUPPORT */
+
+#ifdef AGS_SUPPORT
+ AGS_CONTROL AGSCtrl; /* AGS control */
+#endif /* AGS_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+ LARGE_INTEGER TxPackets;
+ LARGE_INTEGER RxPackets;
+ ULONG TxBytes;
+ ULONG RxBytes;
+#endif /* CONFIG_AP_SUPPORT */
+#ifdef WFD_SUPPORT
+ BOOLEAN bWfdClient;
+#endif /* WFD_SUPPORT */
+
+UCHAR SupportRateMode; /* 1: CCK 2:OFDM 4: HT, 8:VHT */
+BOOLEAN SupportCCKMCS[MAX_LEN_OF_CCK_RATES];
+BOOLEAN SupportOFDMMCS[MAX_LEN_OF_OFDM_RATES];
+BOOLEAN SupportHTMCS[MAX_LEN_OF_HT_RATES];
+
+
+#ifdef DOT11_VHT_AC
+BOOLEAN SupportVHTMCS[MAX_LEN_OF_VHT_RATES];
+#endif /* DOT11_VHT_AC */
+#ifdef CONFIG_MULTI_CHANNEL
+ BOOLEAN bDoRateTune;
+#endif /* CONFIG_MULTI_CHANNEL */
+} MAC_TABLE_ENTRY, *PMAC_TABLE_ENTRY;
+
+
+typedef struct _MAC_TABLE {
+ MAC_TABLE_ENTRY *Hash[HASH_TABLE_SIZE];
+ MAC_TABLE_ENTRY Content[MAX_LEN_OF_MAC_TABLE];
+ USHORT Size;
+ QUEUE_HEADER McastPsQueue;
+ ULONG PsQIdleCount;
+ BOOLEAN fAnyStationInPsm;
+ BOOLEAN fAnyStationBadAtheros; /* Check if any Station is atheros 802.11n Chip. We need to use RTS/CTS with Atheros 802,.11n chip. */
+ BOOLEAN fAnyTxOPForceDisable; /* Check if it is necessary to disable BE TxOP */
+ BOOLEAN fAllStationAsRalink; /* Check if all stations are ralink-chipset */
+#ifdef DOT11_N_SUPPORT
+ BOOLEAN fAnyStationIsLegacy; /* Check if I use legacy rate to transmit to my BSS Station/ */
+ BOOLEAN fAnyStationNonGF; /* Check if any Station can't support GF. */
+ BOOLEAN fAnyStation20Only; /* Check if any Station can't support GF. */
+ BOOLEAN fAnyStationMIMOPSDynamic; /* Check if any Station is MIMO Dynamic */
+ BOOLEAN fAnyBASession; /* Check if there is BA session. Force turn on RTS/CTS */
+ BOOLEAN fAnyStaFortyIntolerant; /* Check if still has any station set the Intolerant bit on! */
+ BOOLEAN fAllStationGainGoodMCS; /* Check if all stations more than MCS threshold */
+
+#ifdef CONFIG_AP_SUPPORT
+ BOOLEAN fAnyStationIsHT; /* Check if there is 11n STA. Force turn off AP MIMO PS */
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+
+ USHORT MsduLifeTime; /* life time for PS packet */
+
+#ifdef WAPI_SUPPORT
+ BOOLEAN fAnyWapiStation;
+#endif /* WAPI_SUPPORT */
+} MAC_TABLE, *PMAC_TABLE;
+
+
+/***************************************************************************
+ * AP WDS related data structures
+ **************************************************************************/
+//#ifdef WDS_SUPPORT
+typedef struct _WDS_COUNTER {
+ LARGE_INTEGER ReceivedFragmentCount;
+ LARGE_INTEGER TransmittedFragmentCount;
+ ULONG ReceivedByteCount;
+ ULONG TransmittedByteCount;
+ ULONG RxErrors;
+ ULONG TxErrors;
+ LARGE_INTEGER MulticastReceivedFrameCount;
+ ULONG OneCollision;
+ ULONG MoreCollisions;
+ ULONG RxNoBuffer;
+ ULONG RcvAlignmentErrors;
+} WDS_COUNTER, *PWDS_COUNTER;
+
+typedef struct _WDS_ENTRY {
+ BOOLEAN Valid;
+ UCHAR Addr[MAC_ADDR_LEN];
+ ULONG NoDataIdleCount;
+ struct _WDS_ENTRY *pNext;
+} WDS_ENTRY, *PWDS_ENTRY;
+
+typedef struct _WDS_TABLE_ENTRY {
+ USHORT Size;
+ UCHAR WdsAddr[MAC_ADDR_LEN];
+ WDS_ENTRY *Hash[HASH_TABLE_SIZE];
+ WDS_ENTRY Content[MAX_LEN_OF_MAC_TABLE];
+ UCHAR MaxSupportedRate;
+ UCHAR CurrTxRate;
+ USHORT TxQuality[MAX_LEN_OF_SUPPORTED_RATES];
+ USHORT OneSecTxOkCount;
+ USHORT OneSecTxRetryOkCount;
+ USHORT OneSecTxFailCount;
+ ULONG CurrTxRateStableTime; /* # of second in current TX rate */
+ UCHAR TxRateUpPenalty; /* extra # of second penalty due to last unstable condition */
+} WDS_TABLE_ENTRY, *PWDS_TABLE_ENTRY;
+
+typedef struct _RT_802_11_WDS_ENTRY {
+ struct wifi_dev wdev;
+ PNET_DEV dev;
+ UCHAR Valid;
+ UCHAR PhyMode;
+ UCHAR PeerWdsAddr[MAC_ADDR_LEN];
+ UCHAR MacTabMatchWCID; /* ASIC */
+ NDIS_802_11_WEP_STATUS WepStatus;
+ UCHAR KeyIdx;
+ CIPHER_KEY WdsKey;
+ HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode;
+ RT_PHY_INFO DesiredHtPhyInfo;
+ BOOLEAN bAutoTxRateSwitch;
+ DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; /* Desired transmit setting. */
+ WDS_COUNTER WdsCounter;
+
+#ifdef WDS_VLAN_SUPPORT
+ /* VLAN */
+ USHORT VLAN_VID;
+ USHORT VLAN_Priority;
+#endif /* WDS_VLAN_SUPPORT */
+} RT_802_11_WDS_ENTRY, *PRT_802_11_WDS_ENTRY;
+
+typedef struct _WDS_TABLE {
+ UCHAR Mode;
+ ULONG Size;
+ RT_802_11_WDS_ENTRY WdsEntry[MAX_WDS_ENTRY];
+} WDS_TABLE, *PWDS_TABLE;
+//#endif /* WDS_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+/***************************************************************************
+ * AP APCLI related data structures
+ **************************************************************************/
+typedef struct _APCLI_STRUCT {
+ struct wifi_dev wdev;
+
+ PNET_DEV dev;
+#ifdef RTL865X_SOC
+ unsigned int mylinkid;
+#endif
+ BOOLEAN Enable; /* Set it as 1 if the apcli interface was configured to "1" or by iwpriv cmd "ApCliEnable" */
+ BOOLEAN Valid; /* Set it as 1 if the apcli interface associated success to remote AP. */
+ UCHAR MacTabWCID; /*WCID value, which point to the entry of ASIC Mac table. */
+ UCHAR SsidLen;
+ CHAR Ssid[MAX_LEN_OF_SSID];
+
+ UCHAR CfgSsidLen;
+ CHAR CfgSsid[MAX_LEN_OF_SSID];
+ UCHAR CfgApCliBssid[ETH_LENGTH_OF_ADDRESS];
+ UCHAR CurrentAddress[ETH_LENGTH_OF_ADDRESS];
+
+ ULONG ApCliRcvBeaconTime;
+ ULONG ApCliLinkUpTime;
+ USHORT ApCliBeaconPeriod;
+
+ ULONG CtrlCurrState;
+ ULONG SyncCurrState;
+ ULONG AuthCurrState;
+ ULONG AssocCurrState;
+ ULONG WpaPskCurrState;
+
+ USHORT AuthReqCnt;
+ USHORT AssocReqCnt;
+
+ ULONG ClientStatusFlags;
+ UCHAR MpduDensity;
+
+ NDIS_802_11_AUTHENTICATION_MODE AuthMode; /* This should match to whatever microsoft defined */
+ NDIS_802_11_WEP_STATUS WepStatus;
+
+ /* Add to support different cipher suite for WPA2/WPA mode */
+ NDIS_802_11_ENCRYPTION_STATUS GroupCipher; /* Multicast cipher suite */
+ NDIS_802_11_ENCRYPTION_STATUS PairCipher; /* Unicast cipher suite */
+ BOOLEAN bMixCipher; /* Indicate current Pair & Group use different cipher suites */
+ USHORT RsnCapability;
+
+ UCHAR PSK[100]; /* reserve PSK key material */
+ UCHAR PSKLen;
+ UCHAR PMK[32]; /* WPA PSK mode PMK */
+ /*UCHAR PTK[64]; // WPA PSK mode PTK */
+ UCHAR GTK[32]; /* GTK from authenticator */
+
+ /*CIPHER_KEY PairwiseKey; */
+ CIPHER_KEY SharedKey[SHARE_KEY_NUM];
+ UCHAR DefaultKeyId;
+
+ /* WPA 802.1x port control, WPA_802_1X_PORT_SECURED, WPA_802_1X_PORT_NOT_SECURED */
+ /*UCHAR PortSecured; */
+
+ /* store RSN_IE built by driver */
+ UCHAR RSN_IE[MAX_LEN_OF_RSNIE]; /* The content saved here should be convert to little-endian format. */
+ UCHAR RSNIE_Len;
+
+ /* For WPA countermeasures */
+ ULONG LastMicErrorTime; /* record last MIC error time */
+ /*ULONG MicErrCnt; // Should be 0, 1, 2, then reset to zero (after disassoiciation). */
+ BOOLEAN bBlockAssoc; /* Block associate attempt for 60 seconds after counter measure occurred. */
+
+ /* For WPA-PSK supplicant state */
+ /*WPA_STATE WpaState; // Default is SS_NOTUSE */
+ /*UCHAR ReplayCounter[8]; */
+ /*UCHAR ANonce[32]; // ANonce for WPA-PSK from authenticator */
+ UCHAR SNonce[32]; /* SNonce for WPA-PSK */
+ UCHAR GNonce[32]; /* GNonce for WPA-PSK from authenticator */
+
+#ifdef WSC_AP_SUPPORT
+ WSC_CTRL WscControl;
+#endif /* WSC_AP_SUPPORT */
+
+ HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode;
+ RT_PHY_INFO DesiredHtPhyInfo;
+ BOOLEAN bAutoTxRateSwitch;
+ DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; /* Desired transmit setting. */
+ UCHAR RxMcsSet[16];
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+ BOOLEAN IEEE8021X;
+ BOOLEAN IEEE8021x_required_keys;
+ CIPHER_KEY DesireSharedKey[4]; // Record user desired WEP keys
+ UCHAR DesireSharedKeyId;
+ UCHAR WpaSupplicantUP;
+ UCHAR WpaSupplicantScanCount;
+ BOOLEAN bRSN_IE_FromWpaSupplicant;
+ BOOLEAN bLostAp;
+ UCHAR *pWpsProbeReqIe;
+ UINT WpsProbeReqIeLen;
+ UCHAR *pWpaAssocIe;
+ UINT WpaAssocIeLen;
+ BOOLEAN bScanReqIsFromWebUI;
+ BSSID_INFO SavedPMK[PMKID_NO];
+ UINT SavedPMKNum; // Saved PMKID number
+ BOOLEAN bConfigChanged;
+ NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo;
+ USHORT ReqVarIELen; // Length of next VIE include EID & Length
+ UCHAR ReqVarIEs[MAX_VIE_LEN]; // The content saved here should be little-endian format.
+ USHORT ResVarIELen; // Length of next VIE include EID & Length
+ UCHAR ResVarIEs[MAX_VIE_LEN];
+ UCHAR LastSsidLen; // the actual ssid length in used
+ CHAR LastSsid[MAX_LEN_OF_SSID]; // NOT NULL-terminated
+ UCHAR LastBssid[MAC_ADDR_LEN];
+#endif/*APCLI_WPA_SUPPLICANT_SUPPORT*/
+
+
+ PSPOLL_FRAME PsPollFrame;
+ HEADER_802_11 NullFrame;
+
+ UAPSD_INFO UapsdInfo;
+} APCLI_STRUCT, *PAPCLI_STRUCT;
+
+typedef struct _AP_ADMIN_CONFIG {
+ USHORT CapabilityInfo;
+ /* Multiple SSID */
+ UCHAR BssidNum;
+ UCHAR MacMask;
+ MULTISSID_STRUCT MBSSID[HW_BEACON_MAX_NUM];
+ ULONG IsolateInterStaTrafficBTNBSSID;
+
+#ifdef APCLI_SUPPORT
+ UCHAR ApCliInfRunned; /* Number of ApClient interface which was running. value from 0 to MAX_APCLI_INTERFACE */
+ BOOLEAN FlgApCliIsUapsdInfoUpdated;
+ APCLI_STRUCT ApCliTab[MAX_APCLI_NUM]; /*AP-client */
+#endif /* APCLI_SUPPORT */
+
+ /* for wpa */
+ RALINK_TIMER_STRUCT CounterMeasureTimer;
+
+ UCHAR CMTimerRunning;
+ UCHAR BANClass3Data;
+ LARGE_INTEGER aMICFailTime;
+ LARGE_INTEGER PrevaMICFailTime;
+ ULONG MICFailureCounter;
+
+ RSSI_SAMPLE RssiSample;
+ ULONG NumOfAvgRssiSample;
+
+ BOOLEAN bAutoChannelAtBootup; /* 0: disable, 1: enable */
+ ChannelSel_Alg AutoChannelAlg; /* Alg for selecting Channel */
+ BOOLEAN bAvoidDfsChannel; /* 0: disable, 1: enable */
+ BOOLEAN bIsolateInterStaTraffic;
+ BOOLEAN bHideSsid;
+
+ /* temporary latch for Auto channel selection */
+ ULONG ApCnt; /* max RSSI during Auto Channel Selection period */
+ UCHAR AutoChannel_Channel; /* channel number during Auto Channel Selection */
+ UCHAR current_channel_index; /* current index of channel list */
+ UCHAR AutoChannelSkipListNum; /* number of rejected channel list */
+ UCHAR AutoChannelSkipList[10];
+ UCHAR DtimCount; /* 0.. DtimPeriod-1 */
+ UCHAR DtimPeriod; /* default = 3 */
+ UCHAR ErpIeContent;
+ ULONG LastOLBCDetectTime;
+ ULONG LastNoneHTOLBCDetectTime;
+ ULONG LastScanTime; /* Record last scan time for issue BSSID_SCAN_LIST */
+
+ UCHAR LastSNR0; /* last received BEACON's SNR */
+ UCHAR LastSNR1; /* last received BEACON's SNR for 2nd antenna */
+#ifdef DOT11N_SS3_SUPPORT
+ UCHAR LastSNR2; /* last received BEACON's SNR for 2nd antenna */
+#endif /* DOT11N_SS3_SUPPORT */
+
+#ifdef DOT1X_SUPPORT
+ /* dot1x related parameter */
+ UINT32 own_ip_addr;
+ UINT32 retry_interval;
+ UINT32 session_timeout_interval;
+ UINT32 quiet_interval;
+ UCHAR EAPifname[HW_BEACON_MAX_NUM][IFNAMSIZ]; /* indicate as the binding interface for EAP negotiation. */
+ UCHAR EAPifname_len[HW_BEACON_MAX_NUM];
+ UCHAR PreAuthifname[HW_BEACON_MAX_NUM][IFNAMSIZ]; /* indicate as the binding interface for WPA2 Pre-authentication. */
+ UCHAR PreAuthifname_len[HW_BEACON_MAX_NUM];
+#endif /* DOT1X_SUPPORT */
+
+ /* EDCA parameters to be announced to its local BSS */
+ EDCA_PARM BssEdcaParm;
+
+ RALINK_TIMER_STRUCT ApQuickResponeForRateUpTimer;
+ BOOLEAN ApQuickResponeForRateUpTimerRunning;
+
+#ifdef IDS_SUPPORT
+ /* intrusion detection parameter */
+ BOOLEAN IdsEnable;
+ UINT32 AuthFloodThreshold; /* Authentication frame flood threshold */
+ UINT32 AssocReqFloodThreshold; /* Association request frame flood threshold */
+ UINT32 ReassocReqFloodThreshold; /* Re-association request frame flood threshold */
+ UINT32 ProbeReqFloodThreshold; /* Probe request frame flood threshold */
+ UINT32 DisassocFloodThreshold; /* Disassociation frame flood threshold */
+ UINT32 DeauthFloodThreshold; /* Deauthentication frame flood threshold */
+ UINT32 EapReqFloodThreshold; /* EAP request frame flood threshold */
+
+ UINT32 RcvdAuthCount;
+ UINT32 RcvdAssocReqCount;
+ UINT32 RcvdReassocReqCount;
+ UINT32 RcvdProbeReqCount;
+ UINT32 RcvdDisassocCount;
+ UINT32 RcvdDeauthCount;
+ UINT32 RcvdEapReqCount;
+
+ RALINK_TIMER_STRUCT IDSTimer;
+ BOOLEAN IDSTimerRunning;
+#endif /* IDS_SUPPORT */
+
+ /* Indicate the maximum idle timeout */
+ UINT32 StaIdleTimeout;
+
+ ULONG EntryLifeCheck;
+
+#ifdef IGMP_SNOOP_SUPPORT
+ BOOLEAN IgmpSnoopEnable; /* 0: disable, 1: enable. */
+#endif /* IGMP_SNOOP_SUPPORT */
+
+
+#ifdef CLIENT_WDS
+ NDIS_SPIN_LOCK CliWdsTabLock;
+ PCLIWDS_PROXY_ENTRY pCliWdsEntryPool;
+ LIST_HEADER CliWdsEntryFreeList;
+ LIST_HEADER CliWdsProxyTab[CLIWDS_HASH_TAB_SIZE];
+#endif /* CLIENT_WDS */
+
+#ifdef DOT11_N_SUPPORT
+#ifdef GREENAP_SUPPORT
+ UCHAR GreenAPLevel;
+ BOOLEAN bGreenAPEnable;
+ BOOLEAN bGreenAPActive;
+#endif /* GREENAP_SUPPORT */
+
+ ULONG MAX_PSDU_LEN; /* Maximum PSDU length */
+#endif /* DOT11_N_SUPPORT */
+
+ UCHAR EntryClientCount;
+} AP_ADMIN_CONFIG, *PAP_ADMIN_CONFIG;
+
+#ifdef IGMP_SNOOP_SUPPORT
+typedef enum _IGMP_GROUP_TYPE {
+ MODE_IS_INCLUDE = 1,
+ MODE_IS_EXCLUDE,
+ CHANGE_TO_INCLUDE_MODE,
+ CHANGE_TO_EXCLUDE_MODE,
+ ALLOW_NEW_SOURCES,
+ BLOCK_OLD_SOURCES
+} IgmpGroupType;
+
+typedef enum _MULTICAST_FILTER_ENTRY_TYPE {
+ MCAT_FILTER_STATIC = 0,
+ MCAT_FILTER_DYNAMIC,
+} MulticastFilterEntryType;
+
+typedef struct _MEMBER_ENTRY {
+ struct _MEMBER_ENTRY *pNext;
+ UCHAR Addr[MAC_ADDR_LEN];
+/* USHORT Aid; */
+} MEMBER_ENTRY, *PMEMBER_ENTRY;
+
+typedef struct _MULTICAST_FILTER_TABLE_ENTRY {
+ BOOLEAN Valid;
+ MulticastFilterEntryType type; /* 0: static, 1: dynamic. */
+ UINT lastTime;
+ PNET_DEV net_dev;
+ UCHAR Addr[MAC_ADDR_LEN];
+ LIST_HEADER MemberList;
+ struct _MULTICAST_FILTER_TABLE_ENTRY *pNext;
+} MULTICAST_FILTER_TABLE_ENTRY, *PMULTICAST_FILTER_TABLE_ENTRY;
+
+typedef struct _MULTICAST_FILTER_TABLE {
+ UCHAR Size;
+ PMULTICAST_FILTER_TABLE_ENTRY
+ Hash[MAX_LEN_OF_MULTICAST_FILTER_HASH_TABLE];
+ MULTICAST_FILTER_TABLE_ENTRY Content[MAX_LEN_OF_MULTICAST_FILTER_TABLE];
+ NDIS_SPIN_LOCK MulticastFilterTabLock;
+ NDIS_SPIN_LOCK FreeMemberPoolTabLock;
+ MEMBER_ENTRY freeMemberPool[FREE_MEMBER_POOL_SIZE];
+ LIST_HEADER freeEntryList;
+} MULTICAST_FILTER_TABLE, *PMULTICAST_FILTER_TABLE;
+#endif /* IGMP_SNOOP_SUPPORT */
+
+
+#ifdef DOT11_N_SUPPORT
+#ifdef GREENAP_SUPPORT
+typedef enum _RT_GREEN_AP_LEVEL {
+ GREENAP_11BGN_STAS = 0,
+ GREENAP_ONLY_11BG_STAS,
+ GREENAP_WITHOUT_ANY_STAS_CONNECT
+} RT_GREEN_AP_LEVEL;
+#endif /* DOT11_N_SUPPORT */
+#endif /* GREENAP_SUPPORT */
+
+/* ----------- end of AP ---------------------------- */
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef BLOCK_NET_IF
+typedef struct _BLOCK_QUEUE_ENTRY {
+ BOOLEAN SwTxQueueBlockFlag;
+ LIST_HEADER NetIfList;
+} BLOCK_QUEUE_ENTRY, *PBLOCK_QUEUE_ENTRY;
+#endif /* BLOCK_NET_IF */
+
+
+struct wificonf {
+ BOOLEAN bShortGI;
+ BOOLEAN bGreenField;
+};
+
+typedef struct _RTMP_DEV_INFO_ {
+ UCHAR chipName[16];
+ RTMP_INF_TYPE infType;
+} RTMP_DEV_INFO;
+
+#ifdef DBG_DIAGNOSE
+#define DIAGNOSE_TIME 10 /* 10 sec */
+typedef struct _RtmpDiagStrcut_ { /* Diagnosis Related element */
+ unsigned char inited;
+ unsigned char qIdx;
+ unsigned char ArrayStartIdx;
+ unsigned char ArrayCurIdx;
+ /* Tx Related Count */
+ USHORT TxDataCnt[DIAGNOSE_TIME];
+ USHORT TxFailCnt[DIAGNOSE_TIME];
+/* USHORT TxDescCnt[DIAGNOSE_TIME][16]; // TxDesc queue length in scale of 0~14, >=15 */
+ USHORT TxDescCnt[DIAGNOSE_TIME][24]; /* 3*3 // TxDesc queue length in scale of 0~14, >=15 */
+/* USHORT TxMcsCnt[DIAGNOSE_TIME][16]; // TxDate MCS Count in range from 0 to 15, step in 1. */
+ USHORT TxMcsCnt[DIAGNOSE_TIME][MAX_MCS_SET]; /* 3*3 */
+ USHORT TxSWQueCnt[DIAGNOSE_TIME][9]; /* TxSwQueue length in scale of 0, 1, 2, 3, 4, 5, 6, 7, >=8 */
+
+ USHORT TxAggCnt[DIAGNOSE_TIME];
+ USHORT TxNonAggCnt[DIAGNOSE_TIME];
+/* USHORT TxAMPDUCnt[DIAGNOSE_TIME][16]; // 10 sec, TxDMA APMDU Aggregation count in range from 0 to 15, in setp of 1. */
+ USHORT TxAMPDUCnt[DIAGNOSE_TIME][MAX_MCS_SET]; /* 3*3 // 10 sec, TxDMA APMDU Aggregation count in range from 0 to 15, in setp of 1. */
+ USHORT TxRalinkCnt[DIAGNOSE_TIME]; /* TxRalink Aggregation Count in 1 sec scale. */
+ USHORT TxAMSDUCnt[DIAGNOSE_TIME]; /* TxAMSUD Aggregation Count in 1 sec scale. */
+
+ /* Rx Related Count */
+ USHORT RxDataCnt[DIAGNOSE_TIME]; /* Rx Total Data count. */
+ USHORT RxCrcErrCnt[DIAGNOSE_TIME];
+/* USHORT RxMcsCnt[DIAGNOSE_TIME][16]; // Rx MCS Count in range from 0 to 15, step in 1. */
+ USHORT RxMcsCnt[DIAGNOSE_TIME][MAX_MCS_SET]; /* 3*3 */
+} RtmpDiagStruct;
+#endif /* DBG_DIAGNOSE */
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
+/*
+ The number of channels for per-channel Tx power offset
+*/
+#define NUM_OF_CH_FOR_PER_CH_TX_PWR_OFFSET 14
+
+/* The Tx power control using the internal ALC */
+typedef struct _TX_POWER_CONTROL {
+ BOOLEAN bInternalTxALC; /* Internal Tx ALC */
+ BOOLEAN bExtendedTssiMode; /* The extended TSSI mode (each channel has different Tx power if needed) */
+ CHAR PerChTxPwrOffset[NUM_OF_CH_FOR_PER_CH_TX_PWR_OFFSET + 1]; /* Per-channel Tx power offset */
+ CHAR idxTxPowerTable; /* The index of the Tx power table for ant0 */
+ CHAR idxTxPowerTable2; /* The index of the Tx power table for ant1 */
+ CHAR RF_TX_ALC; /* 3390: RF R12[4:0]: Tx0 ALC, 3352: RF R47[4:0]: Tx0 ALC, 5390: RF R49[5:0]: Tx0 ALC */
+ CHAR MAC_PowerDelta; /* Tx power control over MAC 0x1314~0x1324 */
+ CHAR MAC_PowerDelta2; /* Tx power control for Tx1 */
+ CHAR TotalDeltaPower2; /* Tx power control for Tx1 */
+#ifdef RTMP_TEMPERATURE_COMPENSATION
+ INT LookupTable[IEEE80211_BAND_NUMS][33];
+ INT RefTemp[IEEE80211_BAND_NUMS];
+ UCHAR TssiGain[IEEE80211_BAND_NUMS];
+ /* Index offset, -7....25. */
+ INT LookupTableIndex;
+#endif /* RTMP_TEMPERATURE_COMPENSATION */
+
+} TX_POWER_CONTROL, *PTX_POWER_CONTROL;
+#endif /* RTMP_INTERNAL_TX_ALC || RTMP_TEMPERATURE_COMPENSATION */
+
+/* */
+/* The entry of transmit power control over MAC */
+/* */
+typedef struct _TX_POWER_CONTROL_OVER_MAC_ENTRY {
+ USHORT MACRegisterOffset; /* MAC register offset */
+ ULONG RegisterValue; /* Register value */
+} TX_POWER_CONTROL_OVER_MAC_ENTRY, *PTX_POWER_CONTROL_OVER_MAC_ENTRY;
+
+/* */
+/* The maximum registers of transmit power control */
+/* */
+#define MAX_TX_PWR_CONTROL_OVER_MAC_REGISTERS 5
+
+
+
+/* */
+/* The configuration of the transmit power control over MAC */
+/* */
+typedef struct _CONFIGURATION_OF_TX_POWER_CONTROL_OVER_MAC {
+ UCHAR NumOfEntries; /* Number of entries */
+ TX_POWER_CONTROL_OVER_MAC_ENTRY TxPwrCtrlOverMAC[MAX_TX_PWR_CONTROL_OVER_MAC_REGISTERS];
+} CONFIGURATION_OF_TX_POWER_CONTROL_OVER_MAC, *PCONFIGURATION_OF_TX_POWER_CONTROL_OVER_MAC;
+
+/* */
+/* The extension of the transmit power control over MAC */
+/* */
+typedef struct _TX_POWER_CONTROL_EXT_OVER_MAC {
+ struct {
+ ULONG TxPwrCfg0; /* MAC 0x1314 */
+ ULONG TxPwrCfg0Ext; /* MAC 0x1390 */
+ ULONG TxPwrCfg1; /* MAC 0x1318 */
+ ULONG TxPwrCfg1Ext; /* MAC 0x1394 */
+ ULONG TxPwrCfg2; /* MAC 0x131C */
+ ULONG TxPwrCfg2Ext; /* MAC 0x1398 */
+ ULONG TxPwrCfg3; /* MAC 0x1320 */
+ ULONG TxPwrCfg3Ext; /* MAC 0x139C */
+ ULONG TxPwrCfg4; /* MAC 0x1324 */
+ ULONG TxPwrCfg4Ext; /* MAC 0x13A0 */
+ ULONG TxPwrCfg5; /* MAC 0x1384 */
+ ULONG TxPwrCfg6; /* MAC 0x1388 */
+ ULONG TxPwrCfg7; /* MAC 0x13D4 */
+ ULONG TxPwrCfg8; /* MAC 0x13D8 */
+ ULONG TxPwrCfg9; /* MAC 0x13DC */
+ } BW20Over2Dot4G;
+
+ struct {
+ ULONG TxPwrCfg0; /* MAC 0x1314 */
+ ULONG TxPwrCfg0Ext; /* MAC 0x1390 */
+ ULONG TxPwrCfg1; /* MAC 0x1318 */
+ ULONG TxPwrCfg1Ext; /* MAC 0x1394 */
+ ULONG TxPwrCfg2; /* MAC 0x131C */
+ ULONG TxPwrCfg2Ext; /* MAC 0x1398 */
+ ULONG TxPwrCfg3; /* MAC 0x1320 */
+ ULONG TxPwrCfg3Ext; /* MAC 0x139C */
+ ULONG TxPwrCfg4; /* MAC 0x1324 */
+ ULONG TxPwrCfg4Ext; /* MAC 0x13A0 */
+ ULONG TxPwrCfg5; /* MAC 0x1384 */
+ ULONG TxPwrCfg6; /* MAC 0x1388 */
+ ULONG TxPwrCfg7; /* MAC 0x13D4 */
+ ULONG TxPwrCfg8; /* MAC 0x13D8 */
+ ULONG TxPwrCfg9; /* MAC 0x13DC */
+ } BW40Over2Dot4G;
+
+ struct {
+ ULONG TxPwrCfg0; /* MAC 0x1314 */
+ ULONG TxPwrCfg0Ext; /* MAC 0x1390 */
+ ULONG TxPwrCfg1; /* MAC 0x1318 */
+ ULONG TxPwrCfg1Ext; /* MAC 0x1394 */
+ ULONG TxPwrCfg2; /* MAC 0x131C */
+ ULONG TxPwrCfg2Ext; /* MAC 0x1398 */
+ ULONG TxPwrCfg3; /* MAC 0x1320 */
+ ULONG TxPwrCfg3Ext; /* MAC 0x139C */
+ ULONG TxPwrCfg4; /* MAC 0x1324 */
+ ULONG TxPwrCfg4Ext; /* MAC 0x13A0 */
+ ULONG TxPwrCfg5; /* MAC 0x1384 */
+ ULONG TxPwrCfg6; /* MAC 0x1388 */
+ ULONG TxPwrCfg7; /* MAC 0x13D4 */
+ ULONG TxPwrCfg8; /* MAC 0x13D8 */
+ ULONG TxPwrCfg9; /* MAC 0x13DC */
+ } BW20Over5G;
+
+ struct {
+ ULONG TxPwrCfg0; /* MAC 0x1314 */
+ ULONG TxPwrCfg0Ext; /* MAC 0x1390 */
+ ULONG TxPwrCfg1; /* MAC 0x1318 */
+ ULONG TxPwrCfg1Ext; /* MAC 0x1394 */
+ ULONG TxPwrCfg2; /* MAC 0x131C */
+ ULONG TxPwrCfg2Ext; /* MAC 0x1398 */
+ ULONG TxPwrCfg3; /* MAC 0x1320 */
+ ULONG TxPwrCfg3Ext; /* MAC 0x139C */
+ ULONG TxPwrCfg4; /* MAC 0x1324 */
+ ULONG TxPwrCfg4Ext; /* MAC 0x13A0 */
+ ULONG TxPwrCfg5; /* MAC 0x1384 */
+ ULONG TxPwrCfg6; /* MAC 0x1388 */
+ ULONG TxPwrCfg7; /* MAC 0x13D4 */
+ ULONG TxPwrCfg8; /* MAC 0x13D8 */
+ ULONG TxPwrCfg9; /* MAC 0x13DC */
+ } BW40Over5G;
+} TX_POWER_CONTROL_EXT_OVER_MAC, *PTX_POWER_CONTROL_EXT_OVER_MAC;
+
+/* For Wake on Wireless LAN */
+#if (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT)
+typedef struct _WOW_CFG_STRUCT {
+ BOOLEAN bEnable; /* Enable WOW function*/
+ BOOLEAN bWOWFirmware; /* Enable WOW function, trigger to reload WOW-support firmware */
+ BOOLEAN bInBand; /* use in-band signal to wakeup system */
+ UINT8 nSelectedGPIO; /* Side band signal to wake up system */
+ UINT8 nDelay; /* Delay number is multiple of 3 secs, and it used to postpone the WOW function */
+ UINT8 nHoldTime; /* GPIO puls hold time, unit: 10ms */
+} WOW_CFG_STRUCT, *PWOW_CFG_STRUCT;
+#endif /* (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT) */
+
+#ifdef NEW_WOW_SUPPORT
+typedef enum {
+ WOW_PKT_TO_HOST,
+ WOW_PKT_TO_ANDES
+} WOW_PKT_FLOW_T;
+
+typedef enum {
+ WOW_WAKEUP_BY_PCIE,
+ WOW_WAKEUP_BY_USB,
+ WOW_WAKEUP_BY_GPIO
+} WOW_WAKEUP_METHOD_T;
+
+typedef enum {
+ WOW_ENABLE = 1,
+ WOW_TRAFFIC = 3,
+ WOW_WAKEUP = 4
+} WOW_FEATURE_T;
+
+typedef enum {
+ WOW_MASK_CFG = 1,
+ WOW_SEC_CFG,
+ WOW_INFRA_CFG,
+ WOW_P2P_CFG,
+} WOW_CONFIG_T;
+
+enum {
+ WOW_MAGIC_PKT,
+ WOW_BITMAP,
+ WOW_IPV4_TCP_SYNC,
+ WOW_IPV6_TCP_SYNC
+};
+
+typedef struct NEW_WOW_MASK_CFG_STRUCT {
+ UINT32 Config_Type;
+ UINT32 Function_Enable;
+ UINT32 Detect_Mask;
+ UINT32 Event_Mask;
+} NEW_WOW_MASK_CFG_STRUCT, PNEW_WOW_MASK_CFG_STRUCT;
+
+typedef struct NEW_WOW_SEC_CFG_STRUCT {
+ UINT32 Config_Type;
+ UINT32 WPA_Ver;
+ UCHAR PTK[64];
+ UCHAR R_COUNTER[8];
+ UCHAR Key_Id;
+ UCHAR Cipher_Alg;
+ UCHAR WCID;
+ UCHAR Group_Cipher;
+} NEW_WOW_SEC_CFG_STRUCT, PNEW_WOW_SEC_CFG_STRUCT;
+
+typedef struct NEW_WOW_INFRA_CFG_STRUCT {
+ UINT32 Config_Type;
+ UCHAR STA_MAC[6];
+ UCHAR AP_MAC[6];
+ UINT32 AP_Status;
+} NEW_WOW_INFRA_CFG_STRUCT, PNEW_WOW_INFRA_CFG_STRUCT;
+
+typedef struct _NEW_WOW_P2P_CFG_STRUCT {
+ UINT32 Config_Type;
+ UCHAR GO_MAC[6];
+ UCHAR CLI_MAC[6];
+ UINT32 P2P_Status;
+} NEW_WOW_P2P_CFG_STRUCT, *PNEW_WOW_P2P_CFG_STRUCT;
+
+typedef struct _NEW_WOW_PARAM_STRUCT {
+ UINT32 Parameter;
+ UINT32 Value;
+} NEW_WOW_PARAM_STRUCT, *PNEW_WOW_PARAM_STRUCT;
+#endif /* NEW_WOW_SUPPORT */
+
+/*
+ Packet drop reason code
+*/
+typedef enum{
+ PKT_ATE_ON = 1 << 8,
+ PKT_RADAR_ON = 2 << 8,
+ PKT_RRM_QUIET = 3 << 8,
+ PKT_TX_STOP = 4 <<8,
+ PKT_TX_JAM = 5 << 8,
+
+ PKT_NETDEV_DOWN = 6 < 8,
+ PKT_NETDEV_NO_MATCH = 7 << 8,
+ PKT_NOT_ALLOW_SEND = 8 << 8,
+
+ PKT_INVALID_DST = 9<< 8,
+ PKT_INVALID_SRC = 10 << 8,
+ PKT_INVALID_PKT_DATA = 11 << 8,
+ PKT_INVALID_PKT_LEN = 12 << 8,
+ PKT_INVALID_ETH_TYPE = 13 << 8,
+ PKT_INVALID_TXBLK_INFO = 14 << 8,
+ PKT_INVALID_SW_ENCRYPT = 15 << 8,
+ PKT_INVALID_PKT_TYPE = 16 << 8,
+ PKT_INVALID_PKT_MIC = 17 << 8,
+
+ PKT_PORT_NOT_SECURE = 18 << 8,
+ PKT_TSPEC_NO_MATCH = 19 << 8,
+ PKT_NO_ASSOCED_STA = 20 << 8,
+ PKT_INVALID_MAC_ENTRY = 21 << 8,
+
+ PKT_TX_QUE_FULL = 22 << 8,
+ PKT_TX_QUE_ADJUST = 23<<8,
+
+ PKT_PS_QUE_TIMEOUT = 24 <<8,
+ PKT_PS_QUE_CLEAN = 25 << 8,
+ PKT_MCAST_PS_QUE_FULL = 26 << 8,
+ PKT_UCAST_PS_QUE_FULL = 27 << 8,
+
+ PKT_RX_EAPOL_SANITY_FAIL = 28 <<8,
+ PKT_RX_NOT_TO_KERNEL = 29 << 8,
+ PKT_RX_MESH_SIG_FAIL = 30 << 8,
+ PKT_APCLI_FAIL = 31 << 8,
+ PKT_ZERO_DATA = 32 <<8,
+ PKT_SW_DECRYPT_FAIL = 33 << 8,
+ PKT_TX_SW_ENC_FAIL = 34 << 8,
+
+ PKT_ACM_FAIL = 35 << 8,
+ PKT_IGMP_GRP_FAIL = 36 << 8,
+ PKT_MGMT_FAIL = 37 << 8,
+ PKT_AMPDU_OUT_ORDER = 38 << 8,
+ PKT_UAPSD_EOSP = 39 << 8,
+ PKT_UAPSD_Q_FULL = 40 << 8,
+
+ PKT_DRO_REASON_MAX = 41,
+}PKT_DROP_REASON;
+
+/* Packet drop Direction code */
+typedef enum{
+ PKT_TX = 0,
+ PKT_RX = 1 << 31,
+}PKT_DROP_DIECTION;
+
+
+
+
+typedef struct _BBP_RESET_CTL
+{
+#define BBP_RECORD_NUM 47
+ REG_PAIR BBPRegDB[BBP_RECORD_NUM];
+ BOOLEAN AsicCheckEn;
+} BBP_RESET_CTL, *PBBP_RESET_CTL;
+
+
+/* */
+/* The miniport adapter structure */
+/* */
+struct _RTMP_ADAPTER {
+ PVOID OS_Cookie; /* save specific structure relative to OS */
+ PNET_DEV net_dev;
+ ULONG VirtualIfCnt;
+
+ RTMP_CHIP_OP chipOps;
+ RTMP_CHIP_CAP chipCap;
+
+
+#ifdef HOSTAPD_SUPPORT
+ UINT32 IoctlIF;
+#endif /* HOSTAPD_SUPPORT */
+#ifdef INF_PPA_SUPPORT
+ UINT32 g_if_id;
+ BOOLEAN PPAEnable;
+ PPA_DIRECTPATH_CB *pDirectpathCb;
+#endif /* INF_PPA_SUPPORT */
+
+
+ NDIS_SPIN_LOCK irq_lock;
+
+ /*======Cmd Thread in PCI/RBUS/USB */
+ CmdQ CmdQ;
+ NDIS_SPIN_LOCK CmdQLock; /* CmdQLock spinlock */
+ RTMP_OS_TASK cmdQTask;
+
+#ifdef RTMP_MAC_USB
+/*****************************************************************************************/
+/* USB related parameters */
+/*****************************************************************************************/
+/* struct usb_config_descriptor *config; */
+ VOID *config;
+
+ UINT NumberOfPipes;
+ USHORT BulkOutMaxPacketSize;
+ USHORT BulkInMaxPacketSize;
+ UINT8 BulkOutEpAddr[6];
+ UINT8 BulkInEpAddr[2];
+
+ /*======Control Flags */
+ ULONG BulkFlags;
+ BOOLEAN bUsbTxBulkAggre; /* Flags for bulk out data priority */
+
+ /*======Cmd Thread */
+/* CmdQ CmdQ; */
+/* NDIS_SPIN_LOCK CmdQLock; // CmdQLock spinlock */
+/* RTMP_OS_TASK cmdQTask; */
+
+ /*======Semaphores (event) */
+ RTMP_OS_SEM UsbVendorReq_semaphore;
+ RTMP_OS_SEM reg_atomic;
+ RTMP_OS_SEM hw_atomic;
+ PVOID UsbVendorReqBuf;
+ BOOLEAN VendorResetFlag;
+/* wait_queue_head_t *wait; */
+ VOID *wait;
+
+ /* lock for ATE */
+#ifdef RALINK_ATE
+ NDIS_SPIN_LOCK GenericLock; /* ATE Tx/Rx generic spinlock */
+#endif /* RALINK_ATE */
+
+#endif /* RTMP_MAC_USB */
+
+/*****************************************************************************************/
+/* RBUS related parameters */
+/*****************************************************************************************/
+
+/*****************************************************************************************/
+/* Both PCI/USB related parameters */
+/*****************************************************************************************/
+ /*RTMP_DEV_INFO chipInfo; */
+ RTMP_INF_TYPE infType;
+
+/*****************************************************************************************/
+/* Driver Mgmt related parameters */
+/*****************************************************************************************/
+ RTMP_OS_TASK mlmeTask;
+#ifdef RTMP_TIMER_TASK_SUPPORT
+ /* If you want use timer task to handle the timer related jobs, enable this. */
+ RTMP_TIMER_TASK_QUEUE TimerQ;
+ NDIS_SPIN_LOCK TimerQLock;
+ RTMP_OS_TASK timerTask;
+#endif /* RTMP_TIMER_TASK_SUPPORT */
+
+/*****************************************************************************************/
+/* Tx related parameters */
+/*****************************************************************************************/
+ BOOLEAN DeQueueRunning[NUM_OF_TX_RING]; /* for ensuring RTUSBDeQueuePacket get call once */
+ NDIS_SPIN_LOCK DeQueueLock[NUM_OF_TX_RING];
+
+#ifdef RTMP_MAC_USB
+ /* Data related context and AC specified, 4 AC supported */
+ NDIS_SPIN_LOCK BulkOutLock[6]; /* BulkOut spinlock for 4 ACs */
+ NDIS_SPIN_LOCK MLMEBulkOutLock; /* MLME BulkOut lock */
+
+ HT_TX_CONTEXT TxContext[NUM_OF_TX_RING];
+ NDIS_SPIN_LOCK TxContextQueueLock[NUM_OF_TX_RING]; /* TxContextQueue spinlock */
+
+ /* 4 sets of Bulk Out index and pending flag */
+ /*
+ array size of NextBulkOutIndex must be larger than or equal to 5;
+ Or BulkOutPending[0] will be overwrited in NICInitTransmit().
+ */
+ UCHAR NextBulkOutIndex[NUM_OF_TX_RING]; /* only used for 4 EDCA bulkout pipe */
+
+ BOOLEAN BulkOutPending[6]; /* used for total 6 bulkout pipe */
+ UCHAR bulkResetPipeid;
+ BOOLEAN MgmtBulkPending;
+ ULONG bulkResetReq[6];
+#ifdef INF_AMAZON_SE
+ ULONG BulkOutDataSizeCount[NUM_OF_TX_RING];
+ BOOLEAN BulkOutDataFlag[NUM_OF_TX_RING];
+ ULONG BulkOutDataSizeLimit[NUM_OF_TX_RING];
+ UCHAR RunningQueueNoCount;
+ UCHAR LastRunningQueueNo;
+#endif /* #ifdef INF_AMAZON_SE */
+
+
+#endif /* RTMP_MAC_USB */
+
+ /* resource for software backlog queues */
+ QUEUE_HEADER TxSwQueue[NUM_OF_TX_RING]; /* 4 AC + 1 HCCA */
+ NDIS_SPIN_LOCK TxSwQueueLock[NUM_OF_TX_RING]; /* TxSwQueue spinlock */
+
+ /* Maximum allowed tx software Queue length */
+ UINT32 TxSwQMaxLen;
+
+ RTMP_DMABUF MgmtDescRing; /* Shared memory for MGMT descriptors */
+ RTMP_MGMT_RING MgmtRing;
+ NDIS_SPIN_LOCK MgmtRingLock; /* Prio Ring spinlock */
+
+
+ UCHAR LastMCUCmd;
+
+/*****************************************************************************************/
+/* Rx related parameters */
+/*****************************************************************************************/
+
+
+#ifdef RTMP_MAC_USB
+ RX_CONTEXT RxContext[RX_RING_SIZE]; /* 1 for redundant multiple IRP bulk in. */
+ NDIS_SPIN_LOCK BulkInLock; /* BulkIn spinlock for 4 ACs */
+ NDIS_SPIN_LOCK CmdRspLock;
+ UCHAR PendingRx; /* The Maximum pending Rx value should be RX_RING_SIZE. */
+ UCHAR NextRxBulkInIndex; /* Indicate the current RxContext Index which hold by Host controller. */
+ UCHAR NextRxBulkInReadIndex; /* Indicate the current RxContext Index which driver can read & process it. */
+ ULONG NextRxBulkInPosition; /* Want to contatenate 2 URB buffer while 1st is bulkin failed URB. This Position is 1st URB TransferLength. */
+ ULONG TransferBufferLength; /* current length of the packet buffer */
+ ULONG ReadPosition; /* current read position in a packet buffer */
+
+ CMD_RSP_CONTEXT CmdRspEventContext;
+#endif /* RTMP_MAC_USB */
+
+/*****************************************************************************************/
+/* ASIC related parameters */
+/*****************************************************************************************/
+ UINT32 MACVersion; /* MAC version. Record rt2860C(0x28600100) or rt2860D (0x28600101).. */
+
+ /* --------------------------- */
+ /* E2PROM */
+ /* --------------------------- */
+ ULONG EepromVersion; /* byte 0: version, byte 1: revision, byte 2~3: unused */
+ ULONG FirmwareVersion; /* byte 0: Minor version, byte 1: Major version, otherwise unused. */
+ USHORT EEPROMDefaultValue[NUM_EEPROM_BBP_PARMS];
+#ifdef TXBF_SUPPORT
+ USHORT EEPROMITxBFCalParams[6];
+#endif /* TXBF_SUPPORT */
+ UCHAR EEPROMAddressNum; /* 93c46=6 93c66=8 */
+ BOOLEAN EepromAccess;
+ UCHAR EFuseTag;
+
+ /* --------------------------- */
+ /* BBP Control */
+ /* --------------------------- */
+ UCHAR BbpWriteLatch[MAX_BBP_ID + 1]; /* record last BBP register value written via BBP_IO_WRITE/BBP_IO_WRITE_VY_REG_ID */
+ CHAR BbpRssiToDbmDelta; /* change from UCHAR to CHAR for high power */
+ BBP_R66_TUNING BbpTuning;
+
+ /* ---------------------------- */
+ /* RFIC control */
+ /* ---------------------------- */
+ UCHAR RfIcType; /* RFIC_xxx */
+ ULONG RfFreqOffset; /* Frequency offset for channel switching */
+
+
+ RTMP_RF_REGS LatchRfRegs; /* latch th latest RF programming value since RF IC doesn't support READ */
+
+ EEPROM_ANTENNA_STRUC Antenna; /* Since ANtenna definition is different for a & g. We need to save it for future reference. */
+ EEPROM_NIC_CONFIG2_STRUC NicConfig2;
+#if defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290)
+ EEPROM_NIC_CONFIG3_STRUC NicConfig3;
+#endif /* defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290) */
+
+ /* This soft Rx Antenna Diversity mechanism is used only when user set */
+ /* RX Antenna = DIVERSITY ON */
+ SOFT_RX_ANT_DIVERSITY RxAnt;
+
+ CHANNEL_TX_POWER TxPower[MAX_NUM_OF_CHANNELS]; /* Store Tx power value for all channels. */
+ CHANNEL_TX_POWER ChannelList[MAX_NUM_OF_CHANNELS]; /* list all supported channels for site survey */
+
+
+
+ UCHAR ChannelListNum; /* number of channel in ChannelList[] */
+ UCHAR Bbp94;
+ BOOLEAN BbpForCCK;
+ ULONG Tx20MPwrCfgABand[MAX_TXPOWER_ARRAY_SIZE];
+ ULONG Tx20MPwrCfgGBand[MAX_TXPOWER_ARRAY_SIZE];
+ ULONG Tx40MPwrCfgABand[MAX_TXPOWER_ARRAY_SIZE];
+ ULONG Tx40MPwrCfgGBand[MAX_TXPOWER_ARRAY_SIZE];
+#ifdef DOT11_VHT_AC
+ ULONG Tx80MPwrCfgABand[MAX_TXPOWER_ARRAY_SIZE]; // Per-rate Tx power control for VHT BW80 (5GHz only)
+#endif /* DOT11_VHT_AC */
+
+
+#ifdef MT7601
+ UINT32 TxCCKPwrCfg;
+#endif /* MT7601 */
+
+ BOOLEAN bAutoTxAgcA; /* Enable driver auto Tx Agc control */
+ UCHAR TssiRefA; /* Store Tssi reference value as 25 temperature. */
+ UCHAR TssiPlusBoundaryA[5]; /* Tssi boundary for increase Tx power to compensate. */
+ UCHAR TssiMinusBoundaryA[5]; /* Tssi boundary for decrease Tx power to compensate. */
+ UCHAR TxAgcStepA; /* Store Tx TSSI delta increment / decrement value */
+ CHAR TxAgcCompensateA; /* Store the compensation (TxAgcStep * (idx-1)) */
+
+ BOOLEAN bAutoTxAgcG; /* Enable driver auto Tx Agc control */
+ UCHAR TssiRefG; /* Store Tssi reference value as 25 temperature. */
+ UCHAR TssiPlusBoundaryG[5]; /* Tssi boundary for increase Tx power to compensate. */
+ UCHAR TssiMinusBoundaryG[5]; /* Tssi boundary for decrease Tx power to compensate. */
+ UCHAR TxAgcStepG; /* Store Tx TSSI delta increment / decrement value */
+ CHAR TxAgcCompensateG; /* Store the compensation (TxAgcStep * (idx-1)) */
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
+ TX_POWER_CONTROL TxPowerCtrl; /* The Tx power control using the internal ALC */
+#endif /* RTMP_INTERNAL_TX_ALC || RTMP_TEMPERATURE_COMPENSATION */
+
+
+ signed char BGRssiOffset[3]; /* Store B/G RSSI #0/1/2 Offset value on EEPROM 0x46h */
+ signed char ARssiOffset[3]; /* Store A RSSI 0/1/2 Offset value on EEPROM 0x4Ah */
+
+ CHAR BLNAGain; /* Store B/G external LNA#0 value on EEPROM 0x44h */
+ CHAR ALNAGain0; /* Store A external LNA#0 value for ch36~64 */
+ CHAR ALNAGain1; /* Store A external LNA#1 value for ch100~128 */
+ CHAR ALNAGain2; /* Store A external LNA#2 value for ch132~165 */
+
+
+#ifdef LED_CONTROL_SUPPORT
+ /* LED control */
+ LED_CONTROL LedCntl;
+#endif /* LED_CONTROL_SUPPORT */
+
+ /* ---------------------------- */
+ /* MAC control */
+ /* ---------------------------- */
+
+#ifdef RT8592
+// TODO: shiang-6590, temporary get from windows and need to revise it!!
+ /* IQ Calibration */
+ UCHAR IQGainTx[3][4];
+ UCHAR IQPhaseTx[3][4];
+ USHORT IQControl;
+#endif /* RT8592 */
+
+#if defined(RT3290) || defined(RT65xx) || defined(MT7601)
+
+ WLAN_FUN_CTRL_STRUC WlanFunCtrl;
+#endif /* defined(RT3290) || defined(RT65xx) || defined(MT7601) */
+
+#ifdef RT3290
+ // TODO: shiang, check about the purpose of this parameter
+ CMB_CTRL_STRUC CmbCtrl;
+ WLAN_FUN_INFO_STRUC WlanFunInfo;
+ BT_FUN_CTRL_STRUC BtFunCtrl;
+ WLAN_BT_COEX_SETTING WlanBTCoexInfo;
+ BOOLEAN RateUp;
+ ULONG AntennaDiversityState;/* 0->Stable state 1->training state */
+ ULONG AntennaDiversityPER[2]; // 0 ->main 1->aux
+ ULONG AntennaDiversityTxPacketCount[2]; // 0 ->main 1->aux
+ ULONG AntennaDiversityRxPacketCount[2];
+ ULONG AntennaDiversityTrigger;
+ ULONG AntennaDiversityCount;
+ ULONG TrainCounter;
+ ANT_DIVERSITY AntennaDiversityInfo;
+#endif /* RT3290 */
+
+ struct hw_setting hw_cfg;
+
+/*****************************************************************************************/
+/* 802.11 related parameters */
+/*****************************************************************************************/
+ /* outgoing BEACON frame buffer and corresponding TXD */
+ TXWI_STRUC BeaconTxWI;
+ PUCHAR BeaconBuf;
+ USHORT BeaconOffset[HW_BEACON_MAX_NUM];
+
+ /* pre-build PS-POLL and NULL frame upon link up. for efficiency purpose. */
+ HEADER_802_11 NullFrame;
+
+#ifdef RTMP_MAC_USB
+ TX_CONTEXT NullContext[2];
+ TX_CONTEXT PsPollContext;
+#endif /* RTMP_MAC_USB */
+
+
+#ifdef UAPSD_SUPPORT
+ NDIS_SPIN_LOCK UAPSDEOSPLock; /* EOSP frame access lock use */
+ BOOLEAN bAPSDFlagSPSuspend; /* 1: SP is suspended; 0: SP is not */
+#endif /* UAPSD_SUPPORT */
+
+/*=========AP=========== */
+#ifdef CONFIG_AP_SUPPORT
+ /* ----------------------------------------------- */
+ /* AP specific configuration & operation status */
+ /* used only when pAd->OpMode == OPMODE_AP */
+ /* ----------------------------------------------- */
+ AP_ADMIN_CONFIG ApCfg; /* user configuration when in AP mode */
+ AP_MLME_AUX ApMlmeAux;
+#ifdef APCLI_SUPPORT
+ MLME_AUX ApCliMlmeAux; /* temporary settings used during MLME state machine */
+#endif /* APCLI_SUPPORT */
+
+#ifdef WDS_SUPPORT
+ WDS_TABLE WdsTab; /* WDS table when working as an AP */
+ NDIS_SPIN_LOCK WdsTabLock;
+#endif /* WDS_SUPPORT */
+
+#ifdef MBSS_SUPPORT
+ BOOLEAN FlgMbssInit;
+#endif /* MBSS_SUPPORT */
+
+#ifdef WDS_SUPPORT
+ BOOLEAN flg_wds_init;
+#endif /* WDS_SUPPORT */
+
+#ifdef APCLI_SUPPORT
+ BOOLEAN flg_apcli_init;
+#endif /* APCLI_SUPPORT */
+
+/*#ifdef AUTO_CH_SELECT_ENHANCE */
+ PBSSINFO pBssInfoTab;
+ PCHANNELINFO pChannelInfo;
+/*#endif // AUTO_CH_SELECT_ENHANCE */
+
+
+#endif /* CONFIG_AP_SUPPORT */
+
+ WDS_TABLE MulTestTab;
+/*=======STA=========== */
+
+/*=======Common=========== */
+ /* OP mode: either AP or STA */
+ UCHAR OpMode; /* OPMODE_STA, OPMODE_AP */
+
+ enum RATE_ADAPT_ALG rateAlg; /* Rate adaptation algorithm */
+
+ NDIS_MEDIA_STATE IndicateMediaState; /* Base on Indication state, default is NdisMediaStateDisConnected */
+#ifdef CONFIG_MULTI_CHANNEL
+ BOOLEAN Multi_Channel_Enable;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+
+#ifdef PROFILE_STORE
+ RTMP_OS_TASK WriteDatTask;
+ BOOLEAN bWriteDat;
+#endif /* PROFILE_STORE */
+
+#ifdef CREDENTIAL_STORE
+ STA_CONNECT_INFO StaCtIf;
+#endif /* CREDENTIAL_STORE */
+
+#ifdef WSC_INCLUDED
+ RTMP_OS_TASK wscTask;
+ UCHAR WriteWscCfgToDatFile;
+ BOOLEAN WriteWscCfgToAr9DatFile;
+ NDIS_SPIN_LOCK WscElmeLock;
+ MLME_QUEUE_ELEM *pWscElme;
+
+ /* WSC hardware push button function 0811 */
+ BOOLEAN WscHdrPshBtnFlag; /* 1: support, read from EEPROM */
+#ifdef CONFIG_AP_SUPPORT
+ BOOLEAN bWscDriverAutoUpdateCfg;
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* WSC_INCLUDED */
+
+
+ /* MAT related parameters */
+#ifdef MAT_SUPPORT
+ MAT_STRUCT MatCfg;
+#endif /* MAT_SUPPORT */
+
+
+ /*
+ Frequency setting for rate adaptation
+ @ra_interval: for baseline time interval
+ @ra_fast_interval: for quick response time interval
+ */
+ UINT32 ra_interval;
+ UINT32 ra_fast_interval;
+
+ /* configuration: read from Registry & E2PROM */
+ BOOLEAN bLocalAdminMAC; /* Use user changed MAC */
+ UCHAR PermanentAddress[MAC_ADDR_LEN]; /* Factory default MAC address */
+ UCHAR CurrentAddress[MAC_ADDR_LEN]; /* User changed MAC address */
+
+ /* ------------------------------------------------------ */
+ /* common configuration to both OPMODE_STA and OPMODE_AP */
+ /* ------------------------------------------------------ */
+ COMMON_CONFIG CommonCfg;
+ MLME_STRUCT Mlme;
+
+ /* AP needs those vaiables for site survey feature. */
+ MLME_AUX MlmeAux; /* temporary settings used during MLME state machine */
+#if defined(AP_SCAN_SUPPORT) || defined(CONFIG_STA_SUPPORT)
+ BSS_TABLE ScanTab; /* store the latest SCAN result */
+#endif /* defined(AP_SCAN_SUPPORT) || defined(CONFIG_STA_SUPPORT) */
+
+ /*About MacTab, the sta driver will use #0 and #1 for multicast and AP. */
+ MAC_TABLE MacTab; /* ASIC on-chip WCID entry table. At TX, ASIC always use key according to this on-chip table. */
+ NDIS_SPIN_LOCK MacTabLock;
+
+#ifdef DOT11_N_SUPPORT
+ BA_TABLE BATable;
+ NDIS_SPIN_LOCK BATabLock;
+ RALINK_TIMER_STRUCT RECBATimer;
+#endif /* DOT11_N_SUPPORT */
+
+ /* DOT11_H */
+ DOT11_H Dot11_H;
+
+ /* encryption/decryption KEY tables */
+ CIPHER_KEY SharedKey[HW_BEACON_MAX_NUM + MAX_P2P_NUM][4]; /* STA always use SharedKey[BSS0][0..3] */
+
+ /* RX re-assembly buffer for fragmentation */
+ FRAGMENT_FRAME FragFrame; /* Frame storage for fragment frame */
+
+ /* various Counters */
+ COUNTER_802_3 Counters8023; /* 802.3 counters */
+ COUNTER_802_11 WlanCounters; /* 802.11 MIB counters */
+ COUNTER_RALINK RalinkCounters; /* Ralink propriety counters */
+ /* COUNTER_DRS DrsCounters; */ /* counters for Dynamic TX Rate Switching */
+ PRIVATE_STRUC PrivateInfo; /* Private information & counters */
+
+ /* flags, see fRTMP_ADAPTER_xxx flags */
+ ULONG Flags; /* Represent current device status */
+ ULONG PSFlags; /* Power Save operation flag. */
+ ULONG MoreFlags; /* Represent specific requirement */
+
+ /* current TX sequence # */
+ USHORT Sequence;
+
+ /* Control disconnect / connect event generation */
+ /*+++Didn't used anymore */
+ ULONG LinkDownTime;
+ /*--- */
+ ULONG LastRxRate;
+ ULONG LastTxRate;
+ /*+++Used only for Station */
+ BOOLEAN bConfigChanged; /* Config Change flag for the same SSID setting */
+ /*--- */
+
+ ULONG ExtraInfo; /* Extra information for displaying status */
+ ULONG SystemErrorBitmap; /* b0: E2PROM version error */
+
+ /*+++Didn't used anymore */
+ ULONG MacIcVersion; /* MAC/BBP serial interface issue solved after ver.D */
+ /*--- */
+
+#ifdef SYSTEM_LOG_SUPPORT
+ /* --------------------------- */
+ /* System event log */
+ /* --------------------------- */
+ RT_802_11_EVENT_TABLE EventTab;
+#endif /* SYSTEM_LOG_SUPPORT */
+
+ BOOLEAN HTCEnable;
+
+ /*****************************************************************************************/
+ /* Statistic related parameters */
+ /*****************************************************************************************/
+#ifdef RTMP_MAC_USB
+ ULONG BulkOutDataOneSecCount;
+ ULONG BulkInDataOneSecCount;
+ ULONG BulkLastOneSecCount; /* BulkOutDataOneSecCount + BulkInDataOneSecCount */
+ ULONG watchDogRxCnt;
+ ULONG watchDogRxOverFlowCnt;
+ ULONG watchDogTxPendingCnt[NUM_OF_TX_RING];
+#endif /* RTMP_MAC_USB */
+
+ BOOLEAN bUpdateBcnCntDone;
+
+ ULONG macwd;
+ /* ---------------------------- */
+ /* DEBUG paramerts */
+ /* ---------------------------- */
+
+ /* ---------------------------- */
+ /* rt2860c emulation-use Parameters */
+ /* ---------------------------- */
+ /*ULONG rtsaccu[30]; */
+ /*ULONG ctsaccu[30]; */
+ /*ULONG cfendaccu[30]; */
+ /*ULONG bacontent[16]; */
+ /*ULONG rxint[RX_RING_SIZE+1]; */
+ /*UCHAR rcvba[60]; */
+ BOOLEAN bLinkAdapt;
+ BOOLEAN bForcePrintTX;
+ BOOLEAN bForcePrintRX;
+ /*BOOLEAN bDisablescanning; //defined in RT2870 USB */
+ BOOLEAN bStaFifoTest;
+ BOOLEAN bProtectionTest;
+ BOOLEAN bHCCATest;
+ BOOLEAN bGenOneHCCA;
+ BOOLEAN bBroadComHT;
+ /*+++Following add from RT2870 USB. */
+ ULONG BulkOutReq;
+ ULONG BulkOutComplete;
+ ULONG BulkOutCompleteOther;
+ ULONG BulkOutCompleteCancel; /* seems not use now? */
+ ULONG BulkInReq;
+ ULONG BulkInComplete;
+ ULONG BulkInCompleteFail;
+ /*--- */
+
+ struct wificonf WIFItestbed;
+
+ UCHAR TssiGain;
+#ifdef RALINK_ATE
+ ATE_INFO ate;
+#ifdef RTMP_MAC_USB
+ BOOLEAN ContinBulkOut; /*ATE bulk out control */
+ BOOLEAN ContinBulkIn; /*ATE bulk in control */
+ RTMP_OS_ATOMIC BulkOutRemained;
+ RTMP_OS_ATOMIC BulkInRemained;
+#endif /* RTMP_MAC_USB */
+#endif /* RALINK_ATE */
+
+#ifdef DOT11_N_SUPPORT
+ struct reordering_mpdu_pool mpdu_blk_pool;
+#endif /* DOT11_N_SUPPORT */
+
+ /* statistics count */
+
+ VOID *iw_stats;
+ VOID *stats;
+
+#ifdef BLOCK_NET_IF
+ BLOCK_QUEUE_ENTRY blockQueueTab[NUM_OF_TX_RING];
+#endif /* BLOCK_NET_IF */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef IGMP_SNOOP_SUPPORT
+ PMULTICAST_FILTER_TABLE pMulticastFilterTable;
+ UCHAR IgmpGroupTxRate;
+#endif /* IGMP_SNOOP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef MULTIPLE_CARD_SUPPORT
+ INT32 MC_RowID;
+ STRING MC_FileName[256];
+#endif /* MULTIPLE_CARD_SUPPORT */
+
+ ULONG TbttTickCount; /* beacon timestamp work-around */
+#ifdef PCI_MSI_SUPPORT
+ BOOLEAN HaveMsi;
+#endif /* PCI_MSI_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+ RALINK_TIMER_STRUCT PeriodicTimer;
+
+#ifdef AP_QLOAD_SUPPORT
+ UINT8 FlgQloadEnable; /* 1: any BSS WMM is enabled */
+ ULONG QloadUpTimeLast; /* last up time */
+ UINT8 QloadChanUtil; /* last QBSS Load, unit: us */
+ UINT32 QloadChanUtilTotal; /* current QBSS Load Total */
+ UINT8 QloadChanUtilBeaconCnt; /* 1~100, default: 50 */
+ UINT8 QloadChanUtilBeaconInt; /* 1~100, default: 50 */
+ UINT32 QloadLatestChannelBusyTimePri;
+ UINT32 QloadLatestChannelBusyTimeSec;
+
+ /*
+ ex: For 100ms beacon interval,
+ if the busy time in last TBTT is smaller than 5ms, QloadBusyCount[0] ++;
+ if the busy time in last TBTT is between 5 and 10ms, QloadBusyCount[1] ++;
+ ......
+ if the busy time in last TBTT is larger than 95ms, QloadBusyCount[19] ++;
+
+ Command: "iwpriv ra0 qload show".
+ */
+
+/* provide busy time statistics for every TBTT */
+#define QLOAD_FUNC_BUSY_TIME_STATS
+
+/* provide busy time alarm mechanism */
+/* use the function to avoid to locate in some noise environments */
+#define QLOAD_FUNC_BUSY_TIME_ALARM
+
+#ifdef QLOAD_FUNC_BUSY_TIME_STATS
+#define QLOAD_BUSY_INTERVALS 20 /* partition TBTT to QLOAD_BUSY_INTERVALS */
+ /* for primary channel & secondary channel */
+ UINT32 QloadBusyCountPri[QLOAD_BUSY_INTERVALS];
+ UINT32 QloadBusyCountSec[QLOAD_BUSY_INTERVALS];
+#endif /* QLOAD_FUNC_BUSY_TIME_STATS */
+
+#ifdef QLOAD_FUNC_BUSY_TIME_ALARM
+#define QLOAD_DOES_ALARM_OCCUR(pAd) (pAd->FlgQloadAlarmIsSuspended == TRUE)
+#define QLOAD_ALARM_EVER_OCCUR(pAd) (pAd->QloadAlarmNumber > 0)
+ BOOLEAN FlgQloadAlarmIsSuspended; /* 1: suspend */
+
+ UINT8 QloadAlarmBusyTimeThreshold; /* unit: 1/100 */
+ UINT8 QloadAlarmBusyNumThreshold; /* unit: 1 */
+ UINT8 QloadAlarmBusyNum;
+ UINT8 QloadAlarmDuration; /* unit: TBTT */
+
+ UINT32 QloadAlarmNumber; /* total alarm times */
+ BOOLEAN FlgQloadAlarm; /* 1: alarm occurs */
+
+ /* speed up use */
+ UINT32 QloadTimePeriodLast;
+ UINT32 QloadBusyTimeThreshold;
+#else
+
+#define QLOAD_DOES_ALARM_OCCUR(pAd) 0
+#endif /* QLOAD_FUNC_BUSY_TIME_ALARM */
+
+#endif /* AP_QLOAD_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+ /* for detect_wmm_traffic() BE TXOP use */
+ ULONG OneSecondnonBEpackets; /* record non BE packets per second */
+ UCHAR is_on;
+
+ /* for detect_wmm_traffic() BE/BK TXOP use */
+#define TIME_BASE (1000000/OS_HZ)
+#define TIME_ONE_SECOND (1000000/TIME_BASE)
+ UCHAR flg_be_adjust;
+ ULONG be_adjust_last_time;
+
+
+#ifdef WSC_INCLUDED
+ /* for multiple card */
+ UCHAR *pHmacData;
+#endif /* WSC_INCLUDED */
+
+#ifdef IKANOS_VX_1X0
+ struct IKANOS_TX_INFO IkanosTxInfo;
+ struct IKANOS_TX_INFO IkanosRxInfo[HW_BEACON_MAX_NUM + MAX_WDS_ENTRY +
+ MAX_APCLI_NUM + MAX_MESH_NUM];
+#endif /* IKANOS_VX_1X0 */
+
+
+#ifdef DBG_DIAGNOSE
+ RtmpDiagStruct DiagStruct;
+#endif /* DBG_DIAGNOSE */
+
+
+ UINT8 FlgCtsEnabled;
+ UINT8 PM_FlgSuspend;
+
+#ifdef RTMP_EFUSE_SUPPORT
+ BOOLEAN bUseEfuse;
+ BOOLEAN bEEPROMFile;
+ BOOLEAN bFroceEEPROMBuffer;
+ BOOLEAN bCalFreeIC;
+ UCHAR EEPROMImage[1024];
+#endif /* RTMP_EFUSE_SUPPORT */
+
+
+ EXT_CAP_INFO_ELEMENT ExtCapInfo;
+
+
+#ifdef VENDOR_FEATURE1_SUPPORT
+ UCHAR FifoUpdateDone, FifoUpdateRx;
+#endif /* VENDOR_FEATURE1_SUPPORT */
+
+ UINT8 RFICType;
+
+#ifdef LINUX
+#ifdef RT_CFG80211_SUPPORT
+ VOID *pCfgDev;
+ VOID *pCfg80211_CB;
+
+ BOOLEAN FlgCfg80211Scanning;
+ BOOLEAN FlgCfg80211Connecting;
+ UCHAR Cfg80211_Alpha2[2];
+#endif /* RT_CFG80211_SUPPORT */
+#endif /* LINUX */
+
+#ifdef OS_ABL_SUPPORT
+#ifdef MAT_SUPPORT
+ /* used in OS_ABL */
+ BOOLEAN (*MATPktRxNeedConvert) (RTMP_ADAPTER *pAd, PNET_DEV net_dev);
+
+ PUCHAR (*MATEngineRxHandle)(RTMP_ADAPTER *pAd, PNDIS_PACKET pPkt, UINT infIdx);
+#endif /* MAT_SUPPORT */
+#endif /* OS_ABL_SUPPORT */
+
+ UINT32 ContinueMemAllocFailCount;
+
+ struct {
+ INT IeLen;
+ UCHAR *pIe;
+ } ProbeRespIE[MAX_LEN_OF_BSS_TABLE];
+
+ /* purpose: We free all kernel resources when module is removed */
+ LIST_HEADER RscTimerMemList; /* resource timers memory */
+ LIST_HEADER RscTaskMemList; /* resource tasks memory */
+ LIST_HEADER RscLockMemList; /* resource locks memory */
+ LIST_HEADER RscTaskletMemList; /* resource tasklets memory */
+ LIST_HEADER RscSemMemList; /* resource semaphore memory */
+ LIST_HEADER RscAtomicMemList; /* resource atomic memory */
+
+ /* purpose: Cancel all timers when module is removed */
+ LIST_HEADER RscTimerCreateList; /* timers list */
+
+#ifdef OS_ABL_SUPPORT
+#endif /* OS_ABL_SUPPORT */
+
+
+
+
+
+#if (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT)
+ WOW_CFG_STRUCT WOW_Cfg; /* data structure for wake on wireless */
+#endif /* (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT) */
+
+#ifdef WLAN_SKB_RECYCLE
+ struct sk_buff_head rx0_recycle;
+#endif /* WLAN_SKB_RECYCLE */
+
+#ifdef FPGA_MODE
+ INT tx_kick_cnt;
+ INT phy_rates;
+ INT data_phy;
+ UCHAR data_bw;
+ UCHAR data_mcs;
+ UCHAR data_gi;
+ UCHAR data_basize;
+ BOOLEAN fpga_on;
+#endif /* FPGA_MODE */
+#ifdef WFA_VHT_PF
+ BOOLEAN force_amsdu;
+#endif /* WFA_VHT_PF */
+
+ UCHAR bloopBackTest;
+ BOOLEAN bHwTxLookupRate;
+ TXWI_STRUC NullTxWI;
+ BOOLEAN TestMulMac;
+
+ struct MCU_CTRL MCUCtrl;
+
+#ifdef CONFIG_MULTI_CHANNEL
+ USHORT NullBufOffset[2];
+ CHAR NullFrBuf[100];
+ UINT32 NullFrLen;
+ UINT32 MultiChannelFlowCtl;
+ RTMP_OS_TASK MultiChannelTask;
+ UCHAR MultiChannelAction;
+#endif /* CONFIG_MULTI_CHANNEL */
+
+#ifdef SINGLE_SKU_V2
+ LIST_HEADER SingleSkuPwrList;
+ UCHAR DefaultTargetPwr;
+ CHAR SingleSkuRatePwrDiff[18];
+#endif /* SINGLE_SKU_V2 */
+
+};
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
+/* The offset of the Tx power tuning entry (zero-based array) */
+#define TX_POWER_TUNING_ENTRY_OFFSET 30
+
+/* The lower-bound of the Tx power tuning entry */
+#define LOWERBOUND_TX_POWER_TUNING_ENTRY -30
+
+/* The upper-bound of the Tx power tuning entry in G band */
+#define UPPERBOUND_TX_POWER_TUNING_ENTRY(__pAd) ((__pAd)->chipCap.TxAlcTxPowerUpperBound_2G)
+
+#ifdef A_BAND_SUPPORT
+/* The upper-bound of the Tx power tuning entry in A band */
+#define UPPERBOUND_TX_POWER_TUNING_ENTRY_5G(__pAd) ((__pAd)->chipCap.TxAlcTxPowerUpperBound_5G)
+#endif /* A_BAND_SUPPORT */
+
+/* Temperature compensation lookup table */
+
+#define TEMPERATURE_COMPENSATION_LOOKUP_TABLE_OFFSET 7
+
+/* The lower/upper power delta index for the TSSI rate table */
+
+#define LOWER_POWER_DELTA_INDEX 0
+#define UPPER_POWER_DELTA_INDEX 24
+
+/* The offset of the TSSI rate table */
+
+#define TSSI_RATIO_TABLE_OFFSET 12
+
+
+/* Get the power delta bound */
+
+#define GET_TSSI_RATE_TABLE_INDEX(x) (((x) > UPPER_POWER_DELTA_INDEX) ? (UPPER_POWER_DELTA_INDEX) : (((x) < LOWER_POWER_DELTA_INDEX) ? (LOWER_POWER_DELTA_INDEX) : ((x))))
+
+/* 802.11b CCK TSSI information */
+
+typedef union _CCK_TSSI_INFO
+{
+#ifdef RT_BIG_ENDIAN
+ struct
+ {
+ UCHAR Reserved:1;
+ UCHAR ShortPreamble:1;
+ UCHAR Rate:2;
+ UCHAR Tx40MSel:2;
+ UCHAR TxType:2;
+ } field;
+#else
+ struct
+ {
+ UCHAR TxType:2;
+ UCHAR Tx40MSel:2;
+ UCHAR Rate:2;
+ UCHAR ShortPreamble:1;
+ UCHAR Reserved:1;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+
+ UCHAR value;
+} CCK_TSSI_INFO, *PCCK_TSSI_INFO;
+
+
+/* 802.11a/g OFDM TSSI information */
+
+typedef union _OFDM_TSSI_INFO
+{
+#ifdef RT_BIG_ENDIAN
+ struct
+ {
+ UCHAR Rate:4;
+ UCHAR Tx40MSel:2;
+ UCHAR TxType:2;
+ } field;
+#else
+ struct
+ {
+ UCHAR TxType:2;
+ UCHAR Tx40MSel:2;
+ UCHAR Rate:4;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+
+ UCHAR value;
+} OFDM_TSSI_INFO, *POFDM_TSSI_INFO;
+
+
+/* 802.11n HT TSSI information */
+
+typedef struct _HT_TSSI_INFO {
+ union {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ UCHAR SGI:1;
+ UCHAR STBC:2;
+ UCHAR Aggregation:1;
+ UCHAR Tx40MSel:2;
+ UCHAR TxType:2;
+ } field;
+#else
+ struct {
+ UCHAR TxType:2;
+ UCHAR Tx40MSel:2;
+ UCHAR Aggregation:1;
+ UCHAR STBC:2;
+ UCHAR SGI:1;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+
+ UCHAR value;
+ } PartA;
+
+ union {
+#ifdef RT_BIG_ENDIAN
+ struct {
+ UCHAR BW:1;
+ UCHAR MCS:7;
+ } field;
+#else
+ struct {
+ UCHAR MCS:7;
+ UCHAR BW:1;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+ UCHAR value;
+ } PartB;
+} HT_TSSI_INFO, *PHT_TSSI_INFO;
+
+typedef struct _TSSI_INFO_{
+ UCHAR tssi_info_0;
+ union {
+ CCK_TSSI_INFO cck_tssi_info;
+ OFDM_TSSI_INFO ofdm_tssi_info;
+ HT_TSSI_INFO ht_tssi_info_1;
+ UCHAR byte;
+ }tssi_info_1;
+ HT_TSSI_INFO ht_tssi_info_2;
+}TSSI_INFO;
+
+#endif /* RTMP_INTERNAL_TX_ALC || RTMP_TEMPERATURE_COMPENSATION */
+
+
+/***************************************************************************
+ * Rx Path software control block related data structures
+ **************************************************************************/
+typedef struct _RX_BLK_
+{
+ UCHAR hw_rx_info[RXD_SIZE]; /* include "RXD_STRUC RxD" and "RXINFO_STRUC rx_info " */
+ RXINFO_STRUC *pRxInfo;
+#ifdef RLT_MAC
+ RXFCE_INFO *pRxFceInfo;
+#endif /* RLT_MAC */
+ RXWI_STRUC *pRxWI;
+ PHEADER_802_11 pHeader;
+ PNDIS_PACKET pRxPacket;
+ UCHAR *pData;
+ USHORT DataSize;
+ USHORT Flags;
+ UCHAR UserPriority; /* for calculate TKIP MIC using */
+ UCHAR OpMode; /* 0:OPMODE_STA 1:OPMODE_AP */
+ UCHAR wcid; /* copy of pRxWI->RxWIWirelessCliID */
+ UCHAR mcs;
+ UCHAR U2M;
+#ifdef HDR_TRANS_SUPPORT
+ BOOLEAN bHdrRxTrans; /* this packet's header is translated to 802.3 by HW */
+ BOOLEAN bHdrVlanTaged; /* VLAN tag is added to this header */
+ UCHAR *pTransData;
+ USHORT TransDataSize;
+#endif /* HDR_TRANS_SUPPORT */
+} RX_BLK;
+
+
+#define RX_BLK_SET_FLAG(_pRxBlk, _flag) (_pRxBlk->Flags |= _flag)
+#define RX_BLK_TEST_FLAG(_pRxBlk, _flag) (_pRxBlk->Flags & _flag)
+#define RX_BLK_CLEAR_FLAG(_pRxBlk, _flag) (_pRxBlk->Flags &= ~(_flag))
+
+
+#define fRX_WDS 0x0001
+#define fRX_AMSDU 0x0002
+#define fRX_ARALINK 0x0004
+#define fRX_HTC 0x0008
+#define fRX_PAD 0x0010
+#define fRX_AMPDU 0x0020
+#define fRX_QOS 0x0040
+#define fRX_INFRA 0x0080
+#define fRX_EAP 0x0100
+#define fRX_MESH 0x0200
+#define fRX_APCLI 0x0400
+#define fRX_DLS 0x0800
+#define fRX_WPI 0x1000
+#define fRX_P2PGO 0x2000
+#define fRX_P2PCLI 0x4000
+
+#define LENGTH_AMSDU_SUBFRAMEHEAD 14
+#define LENGTH_ARALINK_SUBFRAMEHEAD 14
+#define LENGTH_ARALINK_HEADER_FIELD 2
+
+
+/***************************************************************************
+ * Tx Path software control block related data structures
+ **************************************************************************/
+#define TX_UNKOWN_FRAME 0x00
+#define TX_MCAST_FRAME 0x01
+#define TX_LEGACY_FRAME 0x02
+#define TX_AMPDU_FRAME 0x04
+#define TX_AMSDU_FRAME 0x08
+#define TX_RALINK_FRAME 0x10
+#define TX_FRAG_FRAME 0x20
+
+
+/* Currently the sizeof(TX_BLK) is 148 bytes. */
+typedef struct _TX_BLK_
+{
+ UCHAR QueIdx;
+ UCHAR TxFrameType; /* Indicate the Transmission type of the all frames in one batch */
+ UCHAR TotalFrameNum; /* Total frame number want to send-out in one batch */
+ USHORT TotalFragNum; /* Total frame fragments required in one batch */
+ USHORT TotalFrameLen; /* Total length of all frames want to send-out in one batch */
+
+ QUEUE_HEADER TxPacketList;
+ MAC_TABLE_ENTRY *pMacEntry; /* NULL: packet with 802.11 RA field is multicast/broadcast address */
+ HTTRANSMIT_SETTING *pTransmit;
+
+ /* Following structure used for the characteristics of a specific packet. */
+ PNDIS_PACKET pPacket;
+ PUCHAR pSrcBufHeader; /* Reference to the head of sk_buff->data */
+ PUCHAR pSrcBufData; /* Reference to the sk_buff->data, will changed depends on hanlding progresss */
+ UINT SrcBufLen; /* Length of packet payload which not including Layer 2 header */
+
+ PUCHAR pExtraLlcSnapEncap; /* NULL means no extra LLC/SNAP is required */
+#ifndef VENDOR_FEATURE1_SUPPORT
+ /*
+ Note: Can not insert any other new parameters
+ between pExtraLlcSnapEncap & HeaderBuf; Or
+ the start address of HeaderBuf will not be aligned by 4.
+
+ But we can not change HeaderBuf[128] to HeaderBuf[32] because
+ many codes use HeaderBuf[index].
+ */
+ UCHAR HeaderBuf[128]; /* TempBuffer for TX_INFO + TX_WI + TSO_INFO + 802.11 Header + padding + AMSDU SubHeader + LLC/SNAP */
+#else
+ UINT32 HeaderBuffer[32]; /* total 128B, use UINT32 to avoid alignment problem */
+ UCHAR *HeaderBuf;
+#endif /* VENDOR_FEATURE1_SUPPORT */
+ UCHAR MpduHeaderLen; /* 802.11 header length NOT including the padding */
+ UCHAR HdrPadLen; /* recording Header Padding Length; */
+ UCHAR apidx; /* The interface associated to this packet */
+ UCHAR Wcid; /* The MAC entry associated to this packet */
+ UCHAR UserPriority; /* priority class of packet */
+ UCHAR FrameGap; /* what kind of IFS this packet use */
+ UCHAR MpduReqNum; /* number of fragments of this frame */
+ UCHAR TxRate; /* TODO: Obsoleted? Should change to MCS? */
+ UCHAR CipherAlg; /* cipher alogrithm */
+ PCIPHER_KEY pKey;
+ UCHAR KeyIdx; /* Indicate the transmit key index */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+ UINT ApCliIfidx;
+ PAPCLI_STRUCT pApCliEntry;
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+ UINT32 Flags; /*See following definitions for detail. */
+
+ /*YOU SHOULD NOT TOUCH IT! Following parameters are used for hardware-depended layer. */
+ ULONG Priv; /* Hardware specific value saved in here. */
+
+#ifdef CONFIG_AP_SUPPORT
+ MULTISSID_STRUCT *pMbss;
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef TXBF_SUPPORT
+ UCHAR TxSndgPkt; /* 1: sounding 2: NDP sounding */
+ UCHAR TxNDPSndgBW;
+ UCHAR TxNDPSndgMcs;
+#endif /* TXBF_SUPPORT */
+
+#ifdef TX_PKT_SG
+ PACKET_INFO pkt_info;
+#endif /* TX_PKT_SG */
+ UCHAR OpMode;
+
+#ifdef HDR_TRANS_SUPPORT
+ BOOLEAN NeedTrans; /* indicate the packet needs to do hw header translate */
+#endif /* HDR_TRANS_SUPPORT */
+} TX_BLK, *PTX_BLK;
+
+
+#define fTX_bRtsRequired 0x0001 /* Indicate if need send RTS frame for protection. Not used in RT2860/RT2870. */
+#define fTX_bAckRequired 0x0002 /* the packet need ack response */
+#define fTX_bPiggyBack 0x0004 /* Legacy device use Piggback or not */
+#define fTX_bHTRate 0x0008 /* allow to use HT rate */
+#define fTX_bForceNonQoS 0x0010 /* force to transmit frame without WMM-QoS in HT mode */
+#define fTX_bAllowFrag 0x0020 /* allow to fragment the packet, A-MPDU, A-MSDU, A-Ralink is not allowed to fragment */
+#define fTX_bMoreData 0x0040 /* there are more data packets in PowerSave Queue */
+#define fTX_bWMM 0x0080 /* QOS Data */
+#define fTX_bClearEAPFrame 0x0100
+
+#define fTX_bSwEncrypt 0x0400 /* this packet need to be encrypted by software before TX */
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+#define fTX_bApCliPacket 0x0200
+#endif /* APCLI_SUPPORT */
+
+#ifdef WDS_SUPPORT
+#define fTX_bWDSEntry 0x1000 /* Used when WDS_SUPPORT */
+#endif /* WDS_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef UAPSD_SUPPORT
+#define fTX_bWMM_UAPSD_EOSP 0x0800 /* Used when UAPSD_SUPPORT */
+#endif /* UAPSD_SUPPORT */
+
+
+
+#ifdef WAPI_SUPPORT
+#define fTX_bWPIDataFrame 0x8000 /* indicate this packet is an WPI data frame, it need to be encrypted by software */
+#endif /* WAPI_SUPPORT */
+
+#ifdef CLIENT_WDS
+#define fTX_bClientWDSFrame 0x10000
+#endif /* CLIENT_WDS */
+
+
+#define TX_BLK_SET_FLAG(_pTxBlk, _flag) (_pTxBlk->Flags |= _flag)
+#define TX_BLK_TEST_FLAG(_pTxBlk, _flag) (((_pTxBlk->Flags & _flag) == _flag) ? 1 : 0)
+#define TX_BLK_CLEAR_FLAG(_pTxBlk, _flag) (_pTxBlk->Flags &= ~(_flag))
+
+
+
+
+#ifdef RT_BIG_ENDIAN
+/***************************************************************************
+ * Endian conversion related functions
+ **************************************************************************/
+/*
+ ========================================================================
+
+ Routine Description:
+ Endian conversion of Tx/Rx descriptor .
+
+ Arguments:
+ pAd Pointer to our adapter
+ pData Pointer to Tx/Rx descriptor
+ DescriptorType Direction of the frame
+
+ Return Value:
+ None
+
+ Note:
+ Call this function when read or update descriptor
+ ========================================================================
+*/
+static inline VOID RTMPWIEndianChange(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pData,
+ IN ULONG DescriptorType)
+{
+ int size;
+ int i;
+ UINT8 TXWISize = pAd->chipCap.TXWISize;
+ UINT8 RXWISize = pAd->chipCap.RXWISize;
+
+ size = ((DescriptorType == TYPE_TXWI) ? TXWISize : RXWISize);
+
+ if(DescriptorType == TYPE_TXWI)
+ {
+ *((UINT32 *)(pData)) = SWAP32(*((UINT32 *)(pData))); /* Byte 0~3 */
+ *((UINT32 *)(pData + 4)) = SWAP32(*((UINT32 *)(pData+4))); /* Byte 4~7 */
+ }
+ else
+ {
+ for(i=0; i < size/4 ; i++)
+ *(((UINT32 *)pData) +i) = SWAP32(*(((UINT32 *)pData)+i));
+ }
+}
+
+
+
+
+/*
+ ========================================================================
+
+ Routine Description:
+ Endian conversion of Tx/Rx descriptor .
+
+ Arguments:
+ pAd Pointer to our adapter
+ pData Pointer to Tx/Rx descriptor
+ DescriptorType Direction of the frame
+
+ Return Value:
+ None
+
+ Note:
+ Call this function when read or update descriptor
+ ========================================================================
+*/
+
+#ifdef RTMP_MAC_USB
+static inline VOID RTMPDescriptorEndianChange(UCHAR *pData, ULONG DescType)
+{
+ *((UINT32 *)(pData)) = SWAP32(*((UINT32 *)(pData)));
+}
+#endif /* RTMP_MAC_USB */
+/*
+ ========================================================================
+
+ Routine Description:
+ Endian conversion of all kinds of 802.11 frames .
+
+ Arguments:
+ pAd Pointer to our adapter
+ pData Pointer to the 802.11 frame structure
+ Dir Direction of the frame
+ FromRxDoneInt Caller is from RxDone interrupt
+
+ Return Value:
+ None
+
+ Note:
+ Call this function when read or update buffer data
+ ========================================================================
+*/
+static inline VOID RTMPFrameEndianChange(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pData,
+ IN ULONG Dir,
+ IN BOOLEAN FromRxDoneInt)
+{
+ PHEADER_802_11 pFrame;
+ PUCHAR pMacHdr;
+
+ /* swab 16 bit fields - Frame Control field */
+ if(Dir == DIR_READ)
+ {
+ *(USHORT *)pData = SWAP16(*(USHORT *)pData);
+ }
+
+ pFrame = (PHEADER_802_11) pData;
+ pMacHdr = (PUCHAR) pFrame;
+
+ /* swab 16 bit fields - Duration/ID field */
+ *(USHORT *)(pMacHdr + 2) = SWAP16(*(USHORT *)(pMacHdr + 2));
+
+ if (pFrame->FC.Type != BTYPE_CNTL)
+ {
+ /* swab 16 bit fields - Sequence Control field */
+ *(USHORT *)(pMacHdr + 22) = SWAP16(*(USHORT *)(pMacHdr + 22));
+ }
+
+ if(pFrame->FC.Type == BTYPE_MGMT)
+ {
+ switch(pFrame->FC.SubType)
+ {
+ case SUBTYPE_ASSOC_REQ:
+ case SUBTYPE_REASSOC_REQ:
+ /* swab 16 bit fields - CapabilityInfo field */
+ pMacHdr += sizeof(HEADER_802_11);
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+
+ /* swab 16 bit fields - Listen Interval field */
+ pMacHdr += 2;
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+ break;
+
+ case SUBTYPE_ASSOC_RSP:
+ case SUBTYPE_REASSOC_RSP:
+ /* swab 16 bit fields - CapabilityInfo field */
+ pMacHdr += sizeof(HEADER_802_11);
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+
+ /* swab 16 bit fields - Status Code field */
+ pMacHdr += 2;
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+
+ /* swab 16 bit fields - AID field */
+ pMacHdr += 2;
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+ break;
+
+ case SUBTYPE_AUTH:
+ /* When the WEP bit is on, don't do the conversion here.
+ This is only shared WEP can hit this condition.
+ For AP, it shall do conversion after decryption.
+ For STA, it shall do conversion before encryption. */
+ if (pFrame->FC.Wep == 1)
+ break;
+ else
+ {
+ /* swab 16 bit fields - Auth Alg No. field */
+ pMacHdr += sizeof(HEADER_802_11);
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+
+ /* swab 16 bit fields - Auth Seq No. field */
+ pMacHdr += 2;
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+
+ /* swab 16 bit fields - Status Code field */
+ pMacHdr += 2;
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+ }
+ break;
+
+ case SUBTYPE_BEACON:
+ case SUBTYPE_PROBE_RSP:
+ /* swab 16 bit fields - BeaconInterval field */
+ pMacHdr += (sizeof(HEADER_802_11) + TIMESTAMP_LEN);
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+
+ /* swab 16 bit fields - CapabilityInfo field */
+ pMacHdr += sizeof(USHORT);
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+ break;
+
+ case SUBTYPE_DEAUTH:
+ case SUBTYPE_DISASSOC:
+ /* If the PMF is negotiated, those frames shall be encrypted */
+ if(!FromRxDoneInt && pFrame->FC.Wep == 1)
+ break;
+ else
+ {
+ /* swab 16 bit fields - Reason code field */
+ pMacHdr += sizeof(HEADER_802_11);
+ *(USHORT *)pMacHdr = SWAP16(*(USHORT *)pMacHdr);
+ }
+ break;
+ }
+ }
+ else if( pFrame->FC.Type == BTYPE_DATA )
+ {
+ }
+ else if(pFrame->FC.Type == BTYPE_CNTL)
+ {
+ switch(pFrame->FC.SubType)
+ {
+ case SUBTYPE_BLOCK_ACK_REQ:
+ {
+ PFRAME_BA_REQ pBAReq = (PFRAME_BA_REQ)pFrame;
+ *(USHORT *)(&pBAReq->BARControl) = SWAP16(*(USHORT *)(&pBAReq->BARControl));
+ pBAReq->BAStartingSeq.word = SWAP16(pBAReq->BAStartingSeq.word);
+ }
+ break;
+ case SUBTYPE_BLOCK_ACK:
+ /* For Block Ack packet, the HT_CONTROL field is in the same offset with Addr3 */
+ *(UINT32 *)(&pFrame->Addr3[0]) = SWAP32(*(UINT32 *)(&pFrame->Addr3[0]));
+ break;
+
+ case SUBTYPE_ACK:
+ /*For ACK packet, the HT_CONTROL field is in the same offset with Addr2 */
+ *(UINT32 *)(&pFrame->Addr2[0])= SWAP32(*(UINT32 *)(&pFrame->Addr2[0]));
+ break;
+ }
+ }
+ else
+ {
+ DBGPRINT(RT_DEBUG_ERROR,("Invalid Frame Type!!!\n"));
+ }
+
+ /* swab 16 bit fields - Frame Control */
+ if(Dir == DIR_WRITE)
+ {
+ *(USHORT *)pData = SWAP16(*(USHORT *)pData);
+ }
+}
+#endif /* RT_BIG_ENDIAN */
+
+
+/***************************************************************************
+ * Other static inline function definitions
+ **************************************************************************/
+static inline VOID ConvertMulticastIP2MAC(
+ IN PUCHAR pIpAddr,
+ IN PUCHAR *ppMacAddr,
+ IN UINT16 ProtoType)
+{
+ if (pIpAddr == NULL)
+ return;
+
+ if (ppMacAddr == NULL || *ppMacAddr == NULL)
+ return;
+
+ switch (ProtoType)
+ {
+ case ETH_P_IPV6:
+/* memset(*ppMacAddr, 0, ETH_LENGTH_OF_ADDRESS); */
+ *(*ppMacAddr) = 0x33;
+ *(*ppMacAddr + 1) = 0x33;
+ *(*ppMacAddr + 2) = pIpAddr[12];
+ *(*ppMacAddr + 3) = pIpAddr[13];
+ *(*ppMacAddr + 4) = pIpAddr[14];
+ *(*ppMacAddr + 5) = pIpAddr[15];
+ break;
+
+ case ETH_P_IP:
+ default:
+/* memset(*ppMacAddr, 0, ETH_LENGTH_OF_ADDRESS); */
+ *(*ppMacAddr) = 0x01;
+ *(*ppMacAddr + 1) = 0x00;
+ *(*ppMacAddr + 2) = 0x5e;
+ *(*ppMacAddr + 3) = pIpAddr[1] & 0x7f;
+ *(*ppMacAddr + 4) = pIpAddr[2];
+ *(*ppMacAddr + 5) = pIpAddr[3];
+ break;
+ }
+
+ return;
+}
+
+
+char *get_phymode_str(int phy_mode);
+char *get_bw_str(int bandwidth);
+
+
+BOOLEAN RTMPCheckForHang(
+ IN NDIS_HANDLE MiniportAdapterContext);
+
+/*
+ Private routines in rtmp_init.c
+*/
+NDIS_STATUS RTMPAllocTxRxRingMemory(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef RESOURCE_PRE_ALLOC
+NDIS_STATUS RTMPInitTxRxRingMemory(
+ IN RTMP_ADAPTER *pAd);
+#endif /* RESOURCE_PRE_ALLOC */
+
+NDIS_STATUS RTMPReadParametersHook(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS RTMPSetProfileParameters(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING pBuffer);
+
+INT RTMPGetKeyParameter(
+ IN PSTRING key,
+ OUT PSTRING dest,
+ IN INT destsize,
+ IN PSTRING buffer,
+ IN BOOLEAN bTrimSpace);
+
+#ifdef WSC_INCLUDED
+VOID rtmp_read_wsc_user_parms_from_file(
+ IN PRTMP_ADAPTER pAd,
+ IN char *tmpbuf,
+ IN char *buffer);
+#endif/*WSC_INCLUDED*/
+
+VOID rtmp_read_multest_from_file(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING tmpbuf,
+ IN PSTRING buffer);
+
+#ifdef SINGLE_SKU_V2
+NDIS_STATUS RTMPSetSingleSKUParameters(
+ IN RTMP_ADAPTER *pAd);
+
+VOID InitSkuRateDiffTable(
+ IN PRTMP_ADAPTER pAd );
+
+UCHAR GetSkuChannelBasePwr(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR channel);
+
+UCHAR GetSkuRatePwr(
+ IN PRTMP_ADAPTER pAd,
+ IN CHAR phymode,
+ IN UCHAR channel,
+ IN UCHAR bw);
+
+VOID UpdateSkuRatePwr(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR channel,
+ IN UCHAR bw,
+ IN CHAR base_pwr);
+#endif /* SINGLE_SKU_V2 */
+
+VOID AP_WDS_KeyNameMakeUp(
+ IN STRING *pKey,
+ IN UINT32 KeyMaxSize,
+ IN INT KeyId);
+
+VOID AsicUpdateMulTestRxWCIDTable(
+ IN PRTMP_ADAPTER pAd);
+
+MAC_TABLE_ENTRY *MulTestTableLookup(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN BOOLEAN bResetIdelCount);
+
+VOID AsicUpdateMulTestEncryption(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR wcid);
+
+MAC_TABLE_ENTRY *MacTableInsertMulTestEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ UINT WdsTabIdx);
+
+
+
+#ifdef RLT_RF
+NDIS_STATUS rlt_rf_write(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR bank,
+ IN UCHAR regID,
+ IN UCHAR value);
+
+NDIS_STATUS rlt_rf_read(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR bank,
+ IN UCHAR regID,
+ IN UCHAR *pValue);
+#endif /* RLT_RF */
+
+VOID NICReadEEPROMParameters(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING mac_addr);
+
+VOID NICInitAsicFromEEPROM(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS NICInitializeAdapter(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bHardReset);
+
+NDIS_STATUS NICInitializeAsic(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bHardReset);
+
+
+VOID RTMPRingCleanUp(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR RingType);
+
+VOID UserCfgExit(
+ IN RTMP_ADAPTER *pAd);
+
+VOID UserCfgInit(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS NICLoadFirmware(
+ IN PRTMP_ADAPTER pAd);
+
+VOID NICEraseFirmware(
+ IN PRTMP_ADAPTER pAd);
+
+VOID NICUpdateFifoStaCounters(
+ IN PRTMP_ADAPTER pAd);
+
+VOID NICUpdateRawCounters(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+VOID NICUpdateRxStatusCnt1(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Idx);
+
+UINT32 NICSumFalseCCACnt(
+IN PRTMP_ADAPTER pAd);
+
+UINT32 NICSumPLCPErrCnt(
+IN PRTMP_ADAPTER pAd);
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+#ifdef FIFO_EXT_SUPPORT
+BOOLEAN NicGetMacFifoTxCnt(
+ IN RTMP_ADAPTER *pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID AsicFifoExtSet(
+ IN RTMP_ADAPTER *pAd);
+
+VOID AsicFifoExtEntryClean(
+ IN RTMP_ADAPTER * pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+#endif /* FIFO_EXT_SUPPORT */
+
+VOID NicResetRawCounters(RTMP_ADAPTER *pAd);
+
+VOID NicGetTxRawCounters(
+ IN RTMP_ADAPTER *pAd,
+ IN TX_STA_CNT0_STRUC *pStaTxCnt0,
+ IN TX_STA_CNT1_STRUC *pStaTxCnt1);
+
+VOID RTMPZeroMemory(
+ IN PVOID pSrc,
+ IN ULONG Length);
+
+ULONG RTMPCompareMemory(
+ IN PVOID pSrc1,
+ IN PVOID pSrc2,
+ IN ULONG Length);
+
+VOID RTMPMoveMemory(
+ OUT PVOID pDest,
+ IN PVOID pSrc,
+ IN ULONG Length);
+
+VOID AtoH(
+ PSTRING src,
+ PUCHAR dest,
+ int destlen);
+
+UCHAR BtoH(
+ char ch);
+
+VOID RTMP_TimerListAdd(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *pRsc);
+
+VOID RTMP_TimerListRelease(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMP_AllTimerListRelease(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPInitTimer(
+ IN PRTMP_ADAPTER pAd,
+ IN PRALINK_TIMER_STRUCT pTimer,
+ IN PVOID pTimerFunc,
+ IN PVOID pData,
+ IN BOOLEAN Repeat);
+
+VOID RTMPSetTimer(
+ IN PRALINK_TIMER_STRUCT pTimer,
+ IN ULONG Value);
+
+
+VOID RTMPModTimer(
+ IN PRALINK_TIMER_STRUCT pTimer,
+ IN ULONG Value);
+
+VOID RTMPCancelTimer(
+ IN PRALINK_TIMER_STRUCT pTimer,
+ OUT BOOLEAN *pCancelled);
+
+VOID RTMPReleaseTimer(
+ IN PRALINK_TIMER_STRUCT pTimer,
+ OUT BOOLEAN *pCancelled);
+
+VOID RTMPEnableRxTx(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AntCfgInit(
+ IN PRTMP_ADAPTER pAd);
+
+/* */
+/* prototype in action.c */
+/* */
+VOID ActionStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID MlmeADDBAAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeDELBAAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeDLSAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeInvalidAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeQOSAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+#ifdef DOT11_N_SUPPORT
+VOID PeerAddBAReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerAddBARspAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerDelBAAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerBAAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+#endif /* DOT11_N_SUPPORT */
+
+VOID SendPSMPAction(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR Psmp);
+
+#ifdef CONFIG_AP_SUPPORT
+VOID SendBeaconRequest(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID PeerRMAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerPublicAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+
+#ifdef CONFIG_AP_SUPPORT
+VOID ApPublicAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID PeerBSSTranAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+#ifdef DOT11_N_SUPPORT
+VOID PeerHTAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+#endif /* DOT11_N_SUPPORT */
+
+VOID PeerQOSAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+#ifdef QOS_DLS_SUPPORT
+VOID PeerDLSAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+#endif /* QOS_DLS_SUPPORT */
+
+
+#ifdef DOT11_N_SUPPORT
+VOID RECBATimerTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID ORIBATimerTimeout(
+ IN PRTMP_ADAPTER pAd);
+
+VOID SendRefreshBAR(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+#ifdef DOT11N_DRAFT3
+VOID RTMP_11N_D3_TimerInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID SendBSS2040CoexistMgmtAction(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR apidx,
+ IN UCHAR InfoReq);
+
+VOID SendNotifyBWActionFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR apidx);
+
+BOOLEAN ChannelSwitchSanityCheck(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR NewChannel,
+ IN UCHAR Secondary);
+
+VOID ChannelSwitchAction(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR Channel,
+ IN UCHAR Secondary);
+
+ULONG BuildIntolerantChannelRep(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDest);
+
+VOID Update2040CoexistFrameAndNotify(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN BOOLEAN bAddIntolerantCha);
+
+VOID Send2040CoexistAction(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN BOOLEAN bAddIntolerantCha);
+
+VOID UpdateBssScanParm(
+ IN PRTMP_ADAPTER pAd,
+ IN OVERLAP_BSS_SCAN_IE APBssScan);
+#endif /* DOT11N_DRAFT3 */
+
+VOID AsicEnableRalinkBurstMode(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicDisableRalinkBurstMode(
+ IN PRTMP_ADAPTER pAd);
+#endif /* DOT11_N_SUPPORT */
+
+VOID ActHeaderInit(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT PHEADER_802_11 pHdr80211,
+ IN PUCHAR Addr1,
+ IN PUCHAR Addr2,
+ IN PUCHAR Addr3);
+
+VOID BarHeaderInit(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT PFRAME_BAR pCntlBar,
+ IN PUCHAR pDA,
+ IN PUCHAR pSA);
+
+VOID InsertActField(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pFrameBuf,
+ OUT PULONG pFrameLen,
+ IN UINT8 Category,
+ IN UINT8 ActCode);
+
+BOOLEAN QosBADataParse(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bAMSDU,
+ IN PUCHAR p8023Header,
+ IN UCHAR WCID,
+ IN UCHAR TID,
+ IN USHORT Sequence,
+ IN UCHAR DataOffset,
+ IN USHORT Datasize,
+ IN UINT CurRxIndex);
+
+#ifdef DOT11_N_SUPPORT
+BOOLEAN CntlEnqueueForRecv(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Wcid,
+ IN ULONG MsgLen,
+ IN PFRAME_BA_REQ pMsg);
+
+VOID BaAutoManSwitch(
+ IN PRTMP_ADAPTER pAd);
+#endif /* DOT11_N_SUPPORT */
+
+VOID HTIOTCheck(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BatRecIdx);
+
+/* */
+/* Private routines in rtmp_data.c */
+/* */
+BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT32 int_reg);
+
+VOID RTMPHandleMgmtRingDmaDoneInterrupt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPHandleTBTTInterrupt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPHandlePreTBTTInterrupt(
+ IN PRTMP_ADAPTER pAd);
+
+void RTMPHandleTwakeupInterrupt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTMPHandleRxCoherentInterrupt(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef CONFIG_AP_SUPPORT
+VOID RTMPHandleMcuInterrupt(
+ IN PRTMP_ADAPTER pAd);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+NDIS_STATUS STASendPacket(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket);
+
+VOID STASendPackets(
+ IN NDIS_HANDLE MiniportAdapterContext,
+ IN PPNDIS_PACKET ppPacketArray,
+ IN UINT NumberOfPackets);
+
+VOID RTMPDeQueuePacket(
+ IN RTMP_ADAPTER *pAd,
+ IN BOOLEAN bIntContext,
+ IN UCHAR QueIdx,
+ IN INT Max_Tx_Packets);
+
+NDIS_STATUS RTMPHardTransmit(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR QueIdx,
+ OUT PULONG pFreeTXDLeft);
+
+NDIS_STATUS STAHardTransmit(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN UCHAR QueIdx);
+
+VOID STARxEAPOLFrameIndicate(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+NDIS_STATUS RTMPFreeTXDRequest(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR RingType,
+ IN UCHAR NumberRequired,
+ IN PUCHAR FreeNumberIs);
+
+NDIS_STATUS MlmeHardTransmit(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR QueIdx,
+ IN PNDIS_PACKET pPacket,
+ IN BOOLEAN FlgDataQForce,
+ IN BOOLEAN FlgIsLocked);
+
+NDIS_STATUS MlmeHardTransmitMgmtRing(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR QueIdx,
+ IN PNDIS_PACKET pPacket);
+
+
+USHORT RTMPCalcDuration(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR Rate,
+ IN ULONG Size);
+
+VOID RTMPWriteTxWI(
+ IN RTMP_ADAPTER *pAd,
+ IN TXWI_STRUC *pTxWI,
+ IN BOOLEAN FRAG,
+ IN BOOLEAN CFACK,
+ IN BOOLEAN InsTimestamp,
+ IN BOOLEAN AMPDU,
+ IN BOOLEAN Ack,
+ IN BOOLEAN NSeq, /* HW new a sequence. */
+ IN UCHAR BASize,
+ IN UCHAR WCID,
+ IN ULONG Length,
+ IN UCHAR PID,
+ IN UCHAR TID,
+ IN UCHAR TxRate,
+ IN UCHAR Txopmode,
+ IN BOOLEAN CfAck,
+ IN HTTRANSMIT_SETTING *pTransmit);
+
+
+VOID RTMPWriteTxWI_Data(
+ IN RTMP_ADAPTER *pAd,
+ INOUT TXWI_STRUC *pTxWI,
+ IN TX_BLK *pTxBlk);
+
+
+VOID RTMPWriteTxWI_Cache(
+ IN RTMP_ADAPTER *pAd,
+ INOUT TXWI_STRUC *pTxWI,
+ IN TX_BLK *pTxBlk);
+
+VOID RTMPSuspendMsduTransmission(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RTMPResumeMsduTransmission(
+ IN RTMP_ADAPTER *pAd);
+
+NDIS_STATUS MiniportMMRequest(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR QueIdx,
+ IN UCHAR *pData,
+ IN UINT Length);
+
+VOID RTMPSendNullFrame(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR TxRate,
+ IN BOOLEAN bQosNull,
+ IN USHORT PwrMgmt);
+
+#ifdef CONFIG_MULTI_CHANNEL
+VOID RTMPP2PSendNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR TxRate,
+ IN BOOLEAN bQosNull,
+ IN USHORT PwrMgmt);
+#endif /*CONFIG_MULTI_CHANNEL*/
+
+
+
+
+BOOLEAN RTMPFreeTXDUponTxDmaDone(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR QueIdx);
+
+BOOLEAN RTMPCheckEtherType(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN PMAC_TABLE_ENTRY pMacEntry,
+ IN UCHAR OpMode,
+ OUT PUCHAR pUserPriority,
+ OUT PUCHAR pQueIdx);
+
+
+VOID RTMPCckBbpTuning(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT TxRate);
+/* */
+/* MLME routines */
+/* */
+
+/* Asic/RF/BBP related functions */
+VOID AsicGetTxPowerOffset(
+ IN PRTMP_ADAPTER pAd,
+ IN PULONG TxPwr);
+
+VOID AsicGetAutoAgcOffsetForExternalTxAlc(
+ IN PRTMP_ADAPTER pAd,
+ IN PCHAR pDeltaPwr,
+ IN PCHAR pTotalDeltaPwr,
+ IN PCHAR pAgcCompensate,
+ IN PCHAR pDeltaPowerByBbpR1);
+
+#ifdef RTMP_TEMPERATURE_COMPENSATION
+VOID AsicGetAutoAgcOffsetForTemperatureSensor(
+ IN PRTMP_ADAPTER pAd,
+ IN PCHAR pDeltaPwr,
+ IN PCHAR pTotalDeltaPwr,
+ IN PCHAR pAgcCompensate,
+ IN PCHAR pDeltaPowerByBbpR1);
+#endif /* RTMP_TEMPERATURE_COMPENSATION */
+
+#ifdef SINGLE_SKU
+VOID GetSingleSkuDeltaPower(
+ IN PRTMP_ADAPTER pAd,
+ IN PCHAR pTotalDeltaPower,
+ INOUT PULONG pSingleSKUTotalDeltaPwr,
+ INOUT PUCHAR pSingleSKUBbpR1Offset);
+#endif /* SINGLE_SKU*/
+
+VOID AsicPercentageDeltaPower(
+ IN PRTMP_ADAPTER pAd,
+ IN CHAR Rssi,
+ INOUT PCHAR pDeltaPwr,
+ INOUT PCHAR pDeltaPowerByBbpR1);
+
+VOID AsicCompensatePowerViaBBP(
+ IN PRTMP_ADAPTER pAd,
+ INOUT PCHAR pTotalDeltaPower);
+
+VOID AsicAdjustTxPower(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicUpdateProtect(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT OperaionMode,
+ IN UCHAR SetMask,
+ IN BOOLEAN bDisableBGProtect,
+ IN BOOLEAN bNonGFExist);
+
+VOID AsicBBPAdjust(
+ IN RTMP_ADAPTER *pAd);
+
+VOID AsicSwitchChannel(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Channel,
+ IN BOOLEAN bScan);
+
+INT AsicSetChannel(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR ch,
+ IN UCHAR bw,
+ IN UCHAR ext_ch,
+ IN BOOLEAN bScan);
+
+VOID AsicLockChannel(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Channel) ;
+
+VOID AsicAntennaSelect(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Channel);
+
+VOID AsicResetBBPAgent(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID AsicSetBssid(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pBssid);
+
+VOID AsicSetMcastWC(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID AsicDelWcidTab(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid);
+
+#ifdef DOT11_N_SUPPORT
+VOID AsicEnableRDG(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicDisableRDG(
+ IN PRTMP_ADAPTER pAd);
+#endif /* DOT11_N_SUPPORT */
+
+VOID AsicDisableSync(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicEnableBssSync(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicEnableIbssSync(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicSetEdcaParm(
+ IN PRTMP_ADAPTER pAd,
+ IN PEDCA_PARM pEdcaParm);
+
+VOID AsicSetSlotTime(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bUseShortSlotTime);
+
+VOID AsicAddSharedKeyEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BssIndex,
+ IN UCHAR KeyIdx,
+ IN PCIPHER_KEY pCipherKey);
+
+VOID AsicRemoveSharedKeyEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BssIndex,
+ IN UCHAR KeyIdx);
+
+VOID AsicUpdateWCIDIVEIV(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT WCID,
+ IN ULONG uIV,
+ IN ULONG uEIV);
+
+VOID AsicUpdateRxWCIDTable(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT WCID,
+ IN PUCHAR pAddr);
+
+VOID AsicUpdateWcidAttributeEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BssIdx,
+ IN UCHAR KeyIdx,
+ IN UCHAR CipherAlg,
+ IN UINT8 Wcid,
+ IN UINT8 KeyTabFlag);
+
+VOID AsicAddPairwiseKeyEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR WCID,
+ IN PCIPHER_KEY pCipherKey);
+
+VOID AsicRemovePairwiseKeyEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid);
+
+BOOLEAN AsicSendCommandToMcu(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Command,
+ IN UCHAR Token,
+ IN UCHAR Arg0,
+ IN UCHAR Arg1,
+ IN BOOLEAN in_atomic);
+
+BOOLEAN AsicSendCommandToMcuBBP(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Command,
+ IN UCHAR Token,
+ IN UCHAR Arg0,
+ IN UCHAR Arg1,
+ IN BOOLEAN FlgIsNeedLocked);
+
+
+
+#ifdef WAPI_SUPPORT
+VOID AsicUpdateWAPIPN(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT WCID,
+ IN ULONG pn_low,
+ IN ULONG pn_high);
+#endif /* WAPI_SUPPORT */
+
+#ifdef VCORECAL_SUPPORT
+VOID AsicVCORecalibration(
+ IN PRTMP_ADAPTER pAd);
+#endif /* VCORECAL_SUPPORT */
+
+#ifdef STREAM_MODE_SUPPORT
+UINT32 StreamModeRegVal(
+ IN RTMP_ADAPTER *pAd);
+
+VOID AsicSetStreamMode(
+ IN RTMP_ADAPTER *pAd,
+ IN PUCHAR pMacAddr,
+ IN INT chainIdx,
+ IN BOOLEAN bEnabled);
+
+VOID RtmpStreamModeInit(
+ IN RTMP_ADAPTER *pAd);
+
+/*
+ Update the Tx chain address
+ Parameters
+ pAd: The adapter data structure
+ pMacAddress: The MAC address of the peer STA
+
+ Return Value:
+ None
+*/
+VOID AsicUpdateTxChainAddress(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pMacAddress);
+
+INT Set_StreamMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_StreamModeMac_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_StreamModeMCS_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* STREAM_MODE_SUPPORT */
+
+#ifdef WOW_SUPPORT
+#ifdef RTMP_MAC_USB
+/* For WOW, 8051 MUC send full frame */
+VOID AsicWOWSendNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR TxRate,
+ IN BOOLEAN bQosNull);
+
+VOID AsicLoadWOWFirmware(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN WOW);
+#endif /* RTMP_MAC_USB */
+#endif /* WOW_SUPPORT */
+
+VOID MacAddrRandomBssid(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pAddr);
+
+VOID MgtMacHeaderInit(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT PHEADER_802_11 pHdr80211,
+ IN UCHAR SubType,
+ IN UCHAR ToDs,
+ IN PUCHAR pDA,
+ IN PUCHAR pBssid);
+
+VOID MlmeRadioOff(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MlmeRadioOn(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID BssTableInit(
+ IN BSS_TABLE *Tab);
+
+#ifdef DOT11_N_SUPPORT
+VOID BATableInit(
+ IN PRTMP_ADAPTER pAd,
+ IN BA_TABLE *Tab);
+
+VOID BATableExit(
+ IN RTMP_ADAPTER *pAd);
+#endif /* DOT11_N_SUPPORT */
+
+ULONG BssTableSearch(
+ IN BSS_TABLE *Tab,
+ IN PUCHAR pBssid,
+ IN UCHAR Channel);
+
+ULONG BssSsidTableSearch(
+ IN BSS_TABLE *Tab,
+ IN PUCHAR pBssid,
+ IN PUCHAR pSsid,
+ IN UCHAR SsidLen,
+ IN UCHAR Channel);
+
+ULONG BssTableSearchWithSSID(
+ IN BSS_TABLE *Tab,
+ IN PUCHAR Bssid,
+ IN PUCHAR pSsid,
+ IN UCHAR SsidLen,
+ IN UCHAR Channel);
+
+ULONG BssSsidTableSearchBySSID(
+ IN BSS_TABLE *Tab,
+ IN PUCHAR pSsid,
+ IN UCHAR SsidLen);
+
+VOID BssTableDeleteEntry(
+ IN OUT PBSS_TABLE pTab,
+ IN PUCHAR pBssid,
+ IN UCHAR Channel);
+
+ULONG BssTableSetEntry(
+ IN PRTMP_ADAPTER pAd,
+ OUT BSS_TABLE *Tab,
+ IN BCN_IE_LIST *ie_list,
+ IN CHAR Rssi,
+ IN USHORT LengthVIE,
+ IN PNDIS_802_11_VARIABLE_IEs pVIE);
+
+
+#ifdef DOT11_N_SUPPORT
+VOID BATableInsertEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Aid,
+ IN USHORT TimeOutValue,
+ IN USHORT StartingSeq,
+ IN UCHAR TID,
+ IN UCHAR BAWinSize,
+ IN UCHAR OriginatorStatus,
+ IN BOOLEAN IsRecipient);
+
+#ifdef DOT11N_DRAFT3
+VOID Bss2040CoexistTimeOut(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+
+VOID TriEventInit(
+ IN PRTMP_ADAPTER pAd);
+
+INT TriEventTableSetEntry(
+ IN PRTMP_ADAPTER pAd,
+ OUT TRIGGER_EVENT_TAB *Tab,
+ IN PUCHAR pBssid,
+ IN HT_CAPABILITY_IE *pHtCapability,
+ IN UCHAR HtCapabilityLen,
+ IN UCHAR RegClass,
+ IN UCHAR ChannelNo);
+
+#endif /* DOT11N_DRAFT3 */
+#endif /* DOT11_N_SUPPORT */
+
+VOID BssTableSsidSort(
+ IN PRTMP_ADAPTER pAd,
+ OUT BSS_TABLE *OutTab,
+ IN CHAR Ssid[],
+ IN UCHAR SsidLen);
+
+VOID BssTableSortByRssi(
+ IN OUT BSS_TABLE *OutTab);
+
+VOID BssCipherParse(
+ IN OUT PBSS_ENTRY pBss);
+
+NDIS_STATUS MlmeQueueInit(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE *Queue);
+
+VOID MlmeQueueDestroy(
+ IN MLME_QUEUE *Queue);
+
+BOOLEAN MlmeEnqueue(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Machine,
+ IN ULONG MsgType,
+ IN ULONG MsgLen,
+ IN VOID *Msg,
+ IN ULONG Priv);
+
+BOOLEAN MlmeEnqueueForRecv(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Wcid,
+ IN ULONG TimeStampHigh,
+ IN ULONG TimeStampLow,
+ IN UCHAR Rssi0,
+ IN UCHAR Rssi1,
+ IN UCHAR Rssi2,
+ IN UCHAR AntSel,
+ IN ULONG MsgLen,
+ IN PVOID Msg,
+ IN UCHAR Signal,
+ IN UCHAR OpMode);
+
+#ifdef WSC_INCLUDED
+BOOLEAN MlmeEnqueueForWsc(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG eventID,
+ IN LONG senderID,
+ IN ULONG Machine,
+ IN ULONG MsgType,
+ IN ULONG MsgLen,
+ IN VOID *Msg);
+#endif /* WSC_INCLUDED */
+
+BOOLEAN MlmeDequeue(
+ IN MLME_QUEUE *Queue,
+ OUT MLME_QUEUE_ELEM **Elem);
+
+VOID MlmeRestartStateMachine(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN MlmeQueueEmpty(
+ IN MLME_QUEUE *Queue);
+
+BOOLEAN MlmeQueueFull(
+ IN MLME_QUEUE *Queue,
+ IN UCHAR SendId);
+
+BOOLEAN MsgTypeSubst(
+ IN PRTMP_ADAPTER pAd,
+ IN PFRAME_802_11 pFrame,
+ OUT INT *Machine,
+ OUT INT *MsgType);
+
+VOID StateMachineInit(
+ IN STATE_MACHINE *Sm,
+ IN STATE_MACHINE_FUNC Trans[],
+ IN ULONG StNr,
+ IN ULONG MsgNr,
+ IN STATE_MACHINE_FUNC DefFunc,
+ IN ULONG InitState,
+ IN ULONG Base);
+
+VOID StateMachineSetAction(
+ IN STATE_MACHINE *S,
+ IN ULONG St,
+ ULONG Msg,
+ IN STATE_MACHINE_FUNC F);
+
+VOID StateMachinePerformAction(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ IN MLME_QUEUE_ELEM *Elem,
+ IN ULONG CurrState);
+
+VOID Drop(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID AssocStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID ReassocTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID AssocTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID DisassocTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+/*---------------------------------------------- */
+VOID MlmeDisassocReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeAssocReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeReassocReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeDisassocReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerAssocRspAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerReassocRspAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerDisassocAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID DisassocTimeoutAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID AssocTimeoutAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID ReassocTimeoutAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID Cls3errAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr);
+
+VOID InvalidStateWhenAssoc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID InvalidStateWhenReassoc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID InvalidStateWhenDisassociate(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+#ifdef RTMP_MAC_USB
+VOID MlmeCntlConfirm(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG MsgType,
+ IN USHORT Msg);
+#endif /* RTMP_MAC_USB */
+
+VOID ComposePsPoll(
+ IN PRTMP_ADAPTER pAd);
+
+VOID ComposeNullFrame(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AssocPostProc(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr2,
+ IN USHORT CapabilityInfo,
+ IN USHORT Aid,
+ IN UCHAR SupRate[],
+ IN UCHAR SupRateLen,
+ IN UCHAR ExtRate[],
+ IN UCHAR ExtRateLen,
+ IN PEDCA_PARM pEdcaParm,
+ IN IE_LISTS *ie_list,
+ IN HT_CAPABILITY_IE *pHtCapability,
+ IN UCHAR HtCapabilityLen,
+ IN ADD_HT_INFO_IE *pAddHtInfo);
+
+VOID AuthStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTATE_MACHINE sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID AuthTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID MlmeAuthReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerAuthRspAtSeq2Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerAuthRspAtSeq4Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID AuthTimeoutAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID Cls2errAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr);
+
+VOID MlmeDeauthReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID InvalidStateWhenAuth(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+/*============================================= */
+
+VOID AuthRspStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTATE_MACHINE Sm,
+ IN STATE_MACHINE_FUNC Trans[]);
+
+VOID PeerDeauthAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerAuthSimpleRspGenAndSend(
+ IN PRTMP_ADAPTER pAd,
+ IN PHEADER_802_11 pHdr80211,
+ IN USHORT Alg,
+ IN USHORT Seq,
+ IN USHORT Reason,
+ IN USHORT Status);
+
+/* */
+/* Private routines in dls.c */
+/* */
+#ifdef CONFIG_AP_SUPPORT
+#ifdef QOS_DLS_SUPPORT
+VOID APDLSStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID APPeerDlsReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APPeerDlsRspAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID APPeerDlsTearDownAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+#endif /* QOS_DLS_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef QOS_DLS_SUPPORT
+BOOLEAN PeerDlsReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pDA,
+ OUT PUCHAR pSA,
+ OUT USHORT *pCapabilityInfo,
+ OUT USHORT *pDlsTimeout,
+ OUT UCHAR *pRatesLen,
+ OUT UCHAR Rates[],
+ OUT UCHAR *pHtCapabilityLen,
+ OUT HT_CAPABILITY_IE *pHtCapability);
+
+BOOLEAN PeerDlsRspSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pDA,
+ OUT PUCHAR pSA,
+ OUT USHORT *pCapabilityInfo,
+ OUT USHORT *pStatus,
+ OUT UCHAR *pRatesLen,
+ OUT UCHAR Rates[],
+ OUT UCHAR *pHtCapabilityLen,
+ OUT HT_CAPABILITY_IE *pHtCapability);
+
+BOOLEAN PeerDlsTearDownSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pDA,
+ OUT PUCHAR pSA,
+ OUT USHORT *pReason);
+#endif /* QOS_DLS_SUPPORT */
+
+BOOLEAN PeerProbeReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2,
+ OUT CHAR Ssid[],
+ OUT UCHAR *SsidLen,
+ OUT BOOLEAN *bRequestRssi);
+
+/*======================================== */
+
+VOID SyncStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *Sm,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID BeaconTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID ScanTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID MlmeScanReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID InvalidStateWhenScan(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID InvalidStateWhenJoin(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID InvalidStateWhenStart(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerBeacon(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID EnqueueProbeRequest(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN ScanRunning(
+ IN PRTMP_ADAPTER pAd);
+/*========================================= */
+
+VOID MlmeCntlInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+VOID MlmeCntlMachinePerformAction(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlIdleProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlOidScanProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlOidSsidProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM * Elem);
+
+VOID CntlOidRTBssidProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM * Elem);
+
+VOID CntlMlmeRoamingProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM * Elem);
+
+VOID CntlWaitDisassocProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlWaitJoinProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlWaitReassocProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlWaitStartProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlWaitAuthProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlWaitAuthProc2(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID CntlWaitAssocProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+#ifdef QOS_DLS_SUPPORT
+VOID CntlOidDLSSetupProc(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+#endif /* QOS_DLS_SUPPORT */
+
+
+VOID LinkUp(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BssType);
+
+VOID LinkDown(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN IsReqFromAP);
+
+VOID IterateOnBssTab(
+ IN PRTMP_ADAPTER pAd);
+
+VOID IterateOnBssTab2(
+ IN PRTMP_ADAPTER pAd);;
+
+VOID JoinParmFill(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT MLME_JOIN_REQ_STRUCT *JoinReq,
+ IN ULONG BssIdx);
+
+VOID AssocParmFill(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT MLME_ASSOC_REQ_STRUCT *AssocReq,
+ IN PUCHAR pAddr,
+ IN USHORT CapabilityInfo,
+ IN ULONG Timeout,
+ IN USHORT ListenIntv);
+
+VOID ScanParmFill(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT MLME_SCAN_REQ_STRUCT *ScanReq,
+ IN STRING Ssid[],
+ IN UCHAR SsidLen,
+ IN UCHAR BssType,
+ IN UCHAR ScanType);
+
+VOID DisassocParmFill(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT MLME_DISASSOC_REQ_STRUCT *DisassocReq,
+ IN PUCHAR pAddr,
+ IN USHORT Reason);
+
+VOID StartParmFill(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT MLME_START_REQ_STRUCT *StartReq,
+ IN CHAR Ssid[],
+ IN UCHAR SsidLen);
+
+VOID AuthParmFill(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT MLME_AUTH_REQ_STRUCT *AuthReq,
+ IN PUCHAR pAddr,
+ IN USHORT Alg);
+
+VOID EnqueuePsPoll(
+ IN PRTMP_ADAPTER pAd);
+
+VOID EnqueueBeaconFrame(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MlmeJoinReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeScanReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeStartReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeForceJoinReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeForceScanReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID ScanTimeoutAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID BeaconTimeoutAtJoinAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerBeaconAtScanAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerBeaconAtJoinAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerBeacon(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerProbeReqAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID ScanNextChannel(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR OpMode);
+
+
+ULONG MakeIbssBeacon(
+ IN PRTMP_ADAPTER pAd);
+
+
+BOOLEAN MlmeScanReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT UCHAR *BssType,
+ OUT CHAR ssid[],
+ OUT UCHAR *SsidLen,
+ OUT UCHAR *ScanType);
+
+
+BOOLEAN PeerBeaconAndProbeRspSanity_Old(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ IN UCHAR MsgChannel,
+ OUT PUCHAR pAddr2,
+ OUT PUCHAR pBssid,
+ OUT CHAR Ssid[],
+ OUT UCHAR *pSsidLen,
+ OUT UCHAR *pBssType,
+ OUT USHORT *pBeaconPeriod,
+ OUT UCHAR *pChannel,
+ OUT UCHAR *pNewChannel,
+ OUT LARGE_INTEGER *pTimestamp,
+ OUT CF_PARM *pCfParm,
+ OUT USHORT *pAtimWin,
+ OUT USHORT *pCapabilityInfo,
+ OUT UCHAR *pErp,
+ OUT UCHAR *pDtimCount,
+ OUT UCHAR *pDtimPeriod,
+ OUT UCHAR *pBcastFlag,
+ OUT UCHAR *pMessageToMe,
+ OUT UCHAR SupRate[],
+ OUT UCHAR *pSupRateLen,
+ OUT UCHAR ExtRate[],
+ OUT UCHAR *pExtRateLen,
+ OUT UCHAR *pCkipFlag,
+ OUT UCHAR *pAironetCellPowerLimit,
+ OUT PEDCA_PARM pEdcaParm,
+ OUT PQBSS_LOAD_PARM pQbssLoad,
+ OUT PQOS_CAPABILITY_PARM pQosCapability,
+ OUT ULONG *pRalinkIe,
+ OUT UCHAR *pHtCapabilityLen,
+ OUT HT_CAPABILITY_IE *pHtCapability,
+ OUT EXT_CAP_INFO_ELEMENT *pExtCapInfo,
+ OUT UCHAR *AddHtInfoLen,
+ OUT ADD_HT_INFO_IE *AddHtInfo,
+ OUT UCHAR *NewExtChannel,
+ OUT USHORT *LengthVIE,
+ OUT PNDIS_802_11_VARIABLE_IEs pVIE);
+
+
+BOOLEAN PeerBeaconAndProbeRspSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ IN UCHAR MsgChannel,
+ OUT BCN_IE_LIST *ie_list,
+ OUT USHORT *LengthVIE,
+ OUT PNDIS_802_11_VARIABLE_IEs pVIE);
+
+
+#ifdef DOT11_N_SUPPORT
+#ifdef DOT11N_DRAFT3
+BOOLEAN PeerBeaconAndProbeRspSanity2(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ IN OVERLAP_BSS_SCAN_IE *BssScan,
+ OUT UCHAR *RegClass);
+#endif /* DOT11N_DRAFT3 */
+#endif /* DOT11_N_SUPPORT */
+
+BOOLEAN PeerAddBAReqActionSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *pMsg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2);
+
+BOOLEAN PeerAddBARspActionSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *pMsg,
+ IN ULONG MsgLen);
+
+BOOLEAN PeerDelBAActionSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN VOID *pMsg,
+ IN ULONG MsgLen);
+
+BOOLEAN MlmeAssocReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pApAddr,
+ OUT USHORT *CapabilityInfo,
+ OUT ULONG *Timeout,
+ OUT USHORT *ListenIntv);
+
+BOOLEAN MlmeAuthReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr,
+ OUT ULONG *Timeout,
+ OUT USHORT *Alg);
+
+BOOLEAN MlmeStartReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT CHAR Ssid[],
+ OUT UCHAR *Ssidlen);
+
+BOOLEAN PeerAuthSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr,
+ OUT USHORT *Alg,
+ OUT USHORT *Seq,
+ OUT USHORT *Status,
+ OUT CHAR ChlgText[]);
+
+BOOLEAN PeerAssocRspSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *pMsg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2,
+ OUT USHORT *pCapabilityInfo,
+ OUT USHORT *pStatus,
+ OUT USHORT *pAid,
+ OUT UCHAR SupRate[],
+ OUT UCHAR *pSupRateLen,
+ OUT UCHAR ExtRate[],
+ OUT UCHAR *pExtRateLen,
+ OUT HT_CAPABILITY_IE *pHtCapability,
+ OUT ADD_HT_INFO_IE *pAddHtInfo, /* AP might use this additional ht info IE */
+ OUT UCHAR *pHtCapabilityLen,
+ OUT UCHAR *pAddHtInfoLen,
+ OUT UCHAR *pNewExtChannelOffset,
+ OUT PEDCA_PARM pEdcaParm,
+ OUT EXT_CAP_INFO_ELEMENT *pExtCapInfo,
+ OUT UCHAR *pCkipFlag,
+ OUT IE_LISTS *ie_list);
+
+BOOLEAN PeerDisassocSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2,
+ OUT USHORT *Reason);
+
+BOOLEAN PeerDeauthSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr1,
+ OUT PUCHAR pAddr2,
+ OUT PUCHAR pAddr3,
+ OUT USHORT *Reason);
+
+BOOLEAN GetTimBit(
+ IN CHAR *Ptr,
+ IN USHORT Aid,
+ OUT UCHAR *TimLen,
+ OUT UCHAR *BcastFlag,
+ OUT UCHAR *DtimCount,
+ OUT UCHAR *DtimPeriod,
+ OUT UCHAR *MessageToMe);
+
+UCHAR ChannelSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR channel);
+
+NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(
+ IN PBSS_ENTRY pBss);
+
+BOOLEAN MlmeDelBAReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen);
+
+BOOLEAN MlmeAddBAReqSanity(
+ IN PRTMP_ADAPTER pAd,
+ IN VOID *Msg,
+ IN ULONG MsgLen,
+ OUT PUCHAR pAddr2);
+
+ULONG MakeOutgoingFrame(
+ OUT UCHAR *Buffer,
+ OUT ULONG *Length, ...);
+
+UCHAR RandomByte(
+ IN PRTMP_ADAPTER pAd);
+
+UCHAR RandomByte2(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicUpdateAutoFallBackTable(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pTxRate);
+
+
+
+VOID MlmePeriodicExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID LinkDownExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID LinkUpExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID STAMlmePeriodicExec(
+ PRTMP_ADAPTER pAd);
+
+VOID MlmeAutoScan(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MlmeAutoReconnectLastSSID(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN MlmeValidateSSID(
+ IN PUCHAR pSsid,
+ IN UCHAR SsidLen);
+
+VOID MlmeCheckForRoaming(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Now32);
+
+BOOLEAN MlmeCheckForFastRoaming(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef TXBF_SUPPORT
+BOOLEAN MlmeTxBfAllowed(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN struct _RTMP_RA_LEGACY_TB *pTxRate);
+#endif /* TXBF_SUPPORT */
+
+#ifdef AGS_SUPPORT
+INT Show_AGS_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+
+#ifdef CONFIG_AP_SUPPORT
+VOID ApMlmeDynamicTxRateSwitchingAGS(
+ IN RTMP_ADAPTER *pAd,
+ IN INT idx);
+
+VOID ApQuickResponeForRateUpExecAGS(
+ IN RTMP_ADAPTER *pAd,
+ IN INT idx);
+
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* AGS_SUPPORT */
+
+VOID MlmeCalculateChannelQuality(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pMacEntry,
+ IN ULONG Now);
+
+VOID MlmeCheckPsmChange(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Now32);
+
+VOID MlmeSetPsmBit(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT psm);
+
+VOID MlmeSetTxPreamble(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT TxPreamble);
+
+VOID UpdateBasicRateBitmap(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MlmeUpdateTxRates(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bLinkUp,
+ IN UCHAR apidx);
+
+#ifdef DOT11_N_SUPPORT
+VOID MlmeUpdateHtTxRates(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apidx);
+#endif /* DOT11_N_SUPPORT */
+
+VOID RTMPCheckRates(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT UCHAR SupRate[],
+ IN OUT UCHAR *SupRateLen);
+
+
+BOOLEAN RTMPCheckHt(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR Wcid,
+ INOUT HT_CAPABILITY_IE *pHtCapability,
+ INOUT ADD_HT_INFO_IE *pAddHtInfo);
+
+#ifdef DOT11_VHT_AC
+BOOLEAN RTMPCheckVht(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR Wcid,
+ IN VHT_CAP_IE *vht_cap,
+ IN VHT_OP_IE *vht_op);
+#endif /* DOT11_VHT_AC */
+
+VOID RTMPUpdateMlmeRate(
+ IN PRTMP_ADAPTER pAd);
+
+CHAR RTMPMaxRssi(
+ IN PRTMP_ADAPTER pAd,
+ IN CHAR Rssi0,
+ IN CHAR Rssi1,
+ IN CHAR Rssi2);
+
+CHAR RTMPAvgRssi(
+ IN PRTMP_ADAPTER pAd,
+ IN RSSI_SAMPLE *pRssi);
+
+
+CHAR RTMPMinSnr(
+ IN PRTMP_ADAPTER pAd,
+ IN CHAR Snr0,
+ IN CHAR Snr1);
+
+VOID AsicSetRxAnt(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Ant);
+
+#ifdef RTMP_EFUSE_SUPPORT
+INT set_eFuseGetFreeBlockCount_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT set_eFusedump_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT set_eFuseLoadFromBin_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+VOID eFusePhysicalReadRegisters(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ IN USHORT Length,
+ OUT USHORT* pData);
+
+int RtmpEfuseSupportCheck(
+ IN RTMP_ADAPTER *pAd);
+
+#ifdef RALINK_ATE
+INT set_eFuseBufferModeWriteBack_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* RALINK_ATE */
+#endif /* RTMP_EFUSE_SUPPORT */
+
+
+
+
+
+VOID AsicEvaluateRxAnt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID AsicRxAntEvalTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID APSDPeriodicExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+UCHAR RTMPStaFixedTxMode(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID RTMPUpdateLegacyTxSetting(
+ UCHAR fixed_tx_mode,
+ PMAC_TABLE_ENTRY pEntry);
+
+BOOLEAN RTMPAutoRateSwitchCheck(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS MlmeInit(
+ IN PRTMP_ADAPTER pAd);
+
+
+
+#ifdef RTMP_TEMPERATURE_COMPENSATION
+VOID InitLookupTable(
+ IN PRTMP_ADAPTER pAd);
+#endif /* RTMP_TEMPERATURE_COMPENSATION */
+
+VOID MlmeHandler(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MlmeHalt(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MlmeResetRalinkCounters(
+ IN PRTMP_ADAPTER pAd);
+
+VOID BuildChannelList(
+ IN PRTMP_ADAPTER pAd);
+
+UCHAR FirstChannel(
+ IN PRTMP_ADAPTER pAd);
+
+UCHAR NextChannel(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR channel);
+
+VOID ChangeToCellPowerLimit(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR AironetCellPowerLimit);
+
+/* */
+/* Prototypes of function definition in cmm_tkip.c */
+/* */
+VOID RTMPInitMICEngine(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pKey,
+ IN PUCHAR pDA,
+ IN PUCHAR pSA,
+ IN UCHAR UserPriority,
+ IN PUCHAR pMICKey);
+
+BOOLEAN RTMPTkipCompareMICValue(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pSrc,
+ IN PUCHAR pDA,
+ IN PUCHAR pSA,
+ IN PUCHAR pMICKey,
+ IN UCHAR UserPriority,
+ IN UINT Len);
+
+VOID RTMPCalculateMICValue(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN PUCHAR pEncap,
+ IN PCIPHER_KEY pKey,
+ IN UCHAR apidx);
+
+VOID RTMPTkipAppendByte(
+ IN PTKIP_KEY_INFO pTkip,
+ IN UCHAR uChar);
+
+VOID RTMPTkipAppend(
+ IN PTKIP_KEY_INFO pTkip,
+ IN PUCHAR pSrc,
+ IN UINT nBytes);
+
+VOID RTMPTkipGetMIC(
+ IN PTKIP_KEY_INFO pTkip);
+
+/* */
+/* Prototypes of function definition in cmm_cfg.c */
+/* */
+INT RT_CfgSetCountryRegion(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg,
+ IN INT band);
+
+INT RT_CfgSetWirelessMode(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+UCHAR cfgmode_2_wmode(UCHAR cfg_mode);
+UCHAR wmode_2_cfgmode(UCHAR wmode);
+UCHAR *wmode_2_str(UCHAR wmode);
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef MBSS_SUPPORT
+INT RT_CfgSetMbssWirelessMode(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* MBSS_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+INT RT_CfgSetShortSlot(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT RT_CfgSetWepKey(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING keyString,
+ IN CIPHER_KEY *pSharedKey,
+ IN INT keyIdx);
+
+INT RT_CfgSetWPAPSKKey(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING keyString,
+ IN INT keyStringLen,
+ IN UCHAR *pHashStr,
+ IN INT hashStrLen,
+ OUT PUCHAR pPMKBuf);
+
+INT RT_CfgSetFixedTxPhyMode(
+ IN PSTRING arg);
+
+INT RT_CfgSetMacAddress(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT RT_CfgSetTxMCSProc(
+ IN PSTRING arg,
+ OUT BOOLEAN *pAutoRate);
+
+INT RT_CfgSetAutoFallBack(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef WSC_INCLUDED
+INT RT_CfgSetWscPinCode(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING pPinCodeStr,
+ OUT PWSC_CTRL pWscControl);
+#endif /* WSC_INCLUDED */
+
+INT Set_Antenna_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+INT Set_MO_FalseCCATh_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+/* */
+/* Prototypes of function definition in cmm_info.c */
+/* */
+NDIS_STATUS RTMPWPARemoveKeyProc(
+ IN PRTMP_ADAPTER pAd,
+ IN PVOID pBuf);
+
+VOID RTMPWPARemoveAllKeys(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN RTMPCheckStrPrintAble(
+ IN CHAR *pInPutStr,
+ IN UCHAR strLen);
+
+VOID RTMPSetPhyMode(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG phymode);
+
+VOID RTMPUpdateHTIE(
+ IN RT_HT_CAPABILITY *pRtHt,
+ IN UCHAR *pMcsSet,
+ OUT HT_CAPABILITY_IE *pHtCapability,
+ OUT ADD_HT_INFO_IE *pAddHtInfo);
+
+VOID RTMPAddWcidAttributeEntry(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BssIdx,
+ IN UCHAR KeyIdx,
+ IN UCHAR CipherAlg,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+PSTRING GetEncryptType(
+ CHAR enc);
+
+PSTRING GetAuthMode(
+ CHAR auth);
+
+#ifdef DOT11_N_SUPPORT
+VOID RTMPSetHT(
+ IN PRTMP_ADAPTER pAd,
+ IN OID_SET_HT_PHYMODE *pHTPhyMode);
+
+VOID RTMPSetIndividualHT(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apidx);
+
+UCHAR get_cent_ch_by_htinfo(
+ RTMP_ADAPTER *pAd,
+ ADD_HT_INFO_IE *ht_op,
+ HT_CAPABILITY_IE *ht_cap);
+
+INT get_ht_cent_ch(RTMP_ADAPTER *pAd, UCHAR *rf_bw, UCHAR *ext_ch);
+INT ht_mode_adjust(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry, HT_CAPABILITY_IE *peer, RT_HT_CAPABILITY *my);
+INT set_ht_fixed_mcs(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry, UCHAR fixed_mcs, UCHAR mcs_bound);
+INT get_ht_max_mcs(RTMP_ADAPTER *pAd, UCHAR *desire_mcs, UCHAR *cap_mcs);
+#endif /* DOT11_N_SUPPORT */
+
+VOID RTMPDisableDesiredHtInfo(
+ IN PRTMP_ADAPTER pAd);
+
+#ifdef SYSTEM_LOG_SUPPORT
+VOID RtmpDrvSendWirelessEvent(
+ IN VOID *pAdSrc,
+ IN USHORT Event_flag,
+ IN PUCHAR pAddr,
+ IN UCHAR BssIdx,
+ IN CHAR Rssi);
+#else
+#define RtmpDrvSendWirelessEvent(_pAd, _Event_flag, _pAddr, _BssIdx, _Rssi)
+#endif /* SYSTEM_LOG_SUPPORT */
+
+CHAR ConvertToRssi(
+ IN PRTMP_ADAPTER pAd,
+ IN CHAR Rssi,
+ IN UCHAR RssiNumber,
+ IN UCHAR AntSel,
+ IN UCHAR BW);
+
+CHAR ConvertToSnr(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Snr);
+
+#ifdef DOT11N_DRAFT3
+VOID BuildEffectedChannelList(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID DeleteEffectedChannelList(
+ IN PRTMP_ADAPTER pAd);
+
+VOID CntlChannelWidth(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR PrimaryChannel,
+ IN UCHAR CentralChannel,
+ IN UCHAR ChannelWidth,
+ IN UCHAR SecondaryChannelOffset);
+
+#endif /* DOT11N_DRAFT3 */
+
+
+VOID APAsicEvaluateRxAnt(
+ IN PRTMP_ADAPTER pAd);
+
+
+VOID APAsicRxAntEvalTimeout(
+ IN PRTMP_ADAPTER pAd);
+
+
+/* */
+/* function prototype in ap_wpa.c */
+/* */
+VOID RTMPGetTxTscFromAsic(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apidx,
+ OUT PUCHAR pTxTsc);
+
+MAC_TABLE_ENTRY *PACInquiry(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG Wcid);
+
+UINT APValidateRSNIE(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN PUCHAR pRsnIe,
+ IN UCHAR rsnie_len);
+
+VOID HandleCounterMeasure(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID WPAStart4WayHS(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN ULONG TimeInterval);
+
+VOID WPAStart2WayGroupHS(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID PeerPairMsg1Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerPairMsg2Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerPairMsg3Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerPairMsg4Action(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerGroupMsg1Action(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID PeerGroupMsg2Action(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN VOID *Msg,
+ IN UINT MsgLen);
+
+VOID CMTimerExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID WPARetryExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+#ifdef TXBF_SUPPORT
+VOID eTxBfProbeTimerExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+#endif /* TXBF_SUPPORT */
+
+VOID EnqueueStartForPSKExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID RTMPHandleSTAKey(
+ IN PRTMP_ADAPTER pAdapter,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID MlmeDeAuthAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN USHORT Reason,
+ IN BOOLEAN bDataFrameFirst);
+
+
+VOID GREKEYPeriodicExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID AES_128_CMAC(
+ IN PUCHAR key,
+ IN PUCHAR input,
+ IN INT len,
+ OUT PUCHAR mac);
+
+#ifdef DOT1X_SUPPORT
+VOID WpaSend(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PUCHAR pPacket,
+ IN ULONG Len);
+
+VOID RTMPAddPMKIDCache(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN PUCHAR pAddr,
+ IN UCHAR *PMKID,
+ IN UCHAR *PMK);
+
+INT RTMPSearchPMKIDCache(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN PUCHAR pAddr);
+
+VOID RTMPDeletePMKIDCache(
+ IN PRTMP_ADAPTER pAd,
+ IN INT apidx,
+ IN INT idx);
+
+VOID RTMPMaintainPMKIDCache(
+ IN PRTMP_ADAPTER pAd);
+#else
+#define RTMPMaintainPMKIDCache(_pAd)
+#endif /* DOT1X_SUPPORT */
+
+#ifdef RESOURCE_PRE_ALLOC
+VOID RTMPResetTxRxRingMemory(
+ IN RTMP_ADAPTER *pAd);
+#endif /* RESOURCE_PRE_ALLOC */
+
+VOID RTMPFreeTxRxRingMemory(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN RTMP_FillTxBlkInfo(
+ IN RTMP_ADAPTER *pAd,
+ IN TX_BLK *pTxBlk);
+
+ void announce_802_3_packet(
+ IN VOID *pAdSrc,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR OpMode);
+
+#ifdef DOT11_N_SUPPORT
+UINT BA_Reorder_AMSDU_Annnounce(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR OpMode);
+#endif /* DOT11_N_SUPPORT */
+
+PNET_DEV get_netdev_from_bssid(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR FromWhichBSSID);
+
+
+#ifdef DOT11_N_SUPPORT
+void ba_flush_reordering_timeout_mpdus(
+ IN PRTMP_ADAPTER pAd,
+ IN PBA_REC_ENTRY pBAEntry,
+ IN ULONG Now32);
+
+
+VOID BAOriSessionSetUp(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR TID,
+ IN USHORT TimeOut,
+ IN ULONG DelayTime,
+ IN BOOLEAN isForced);
+
+VOID BASessionTearDownALL(
+ IN OUT PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid);
+
+VOID BAOriSessionTearDown(
+ IN OUT PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR TID,
+ IN BOOLEAN bPassive,
+ IN BOOLEAN bForceSend);
+
+VOID BARecSessionTearDown(
+ IN OUT PRTMP_ADAPTER pAd,
+ IN UCHAR Wcid,
+ IN UCHAR TID,
+ IN BOOLEAN bPassive);
+#endif /* DOT11_N_SUPPORT */
+
+BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num);
+void ba_reordering_resource_release(PRTMP_ADAPTER pAd);
+
+INT ComputeChecksum(
+ IN UINT PIN);
+
+UINT GenerateWpsPinCode(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bFromApcli,
+ IN UCHAR apidx);
+
+#ifdef WSC_INCLUDED
+INT Set_WscGenPinCode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WscVendorPinCode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef WSC_AP_SUPPORT
+VOID RTMPIoctlSetWSCOOB(IN PRTMP_ADAPTER pAd);
+#endif
+
+#ifdef WSC_STA_SUPPORT
+VOID CntlWscIterate(
+ IN PRTMP_ADAPTER pAd);
+
+USHORT WscGetAuthTypeFromStr(
+ IN PSTRING arg);
+
+USHORT WscGetEncrypTypeFromStr(
+ IN PSTRING arg);
+#endif /* WSC_STA_SUPPORT */
+/* */
+/* prototype in wsc.c */
+/* */
+BOOLEAN WscMsgTypeSubst(
+ IN UCHAR EAPType,
+ IN UCHAR EAPCode,
+ OUT INT *MsgType);
+
+VOID WscStateMachineInit(
+ IN PRTMP_ADAPTER pAd,
+ IN STATE_MACHINE *S,
+ OUT STATE_MACHINE_FUNC Trans[]);
+
+
+VOID WscEAPOLStartAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID WscEAPAction(
+ IN PRTMP_ADAPTER pAdapter,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID WscEapEnrolleeAction(
+ IN PRTMP_ADAPTER pAdapter,
+ IN MLME_QUEUE_ELEM *Elem,
+ IN UCHAR MsgType,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN PWSC_CTRL pWscControl);
+
+#ifdef CONFIG_AP_SUPPORT
+VOID WscEapApProxyAction(
+ IN PRTMP_ADAPTER pAdapter,
+ IN MLME_QUEUE_ELEM *Elem,
+ IN UCHAR MsgType,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN PWSC_CTRL pWscControl);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID WscEapRegistrarAction(
+ IN PRTMP_ADAPTER pAdapter,
+ IN MLME_QUEUE_ELEM *Elem,
+ IN UCHAR MsgType,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscEAPOLTimeOutAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID Wsc2MinsTimeOutAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+UCHAR WscRxMsgType(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PMLME_QUEUE_ELEM pElem);
+
+VOID WscInitRegistrarPair(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN UCHAR apidx);
+
+VOID WscSendEapReqId(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN UCHAR CurOpMode);
+
+VOID WscSendEapolStart(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pBssid,
+ IN UCHAR CurOpMode);
+
+VOID WscSendEapRspId(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscMacHeaderInit(
+ IN PRTMP_ADAPTER pAd,
+ IN OUT PHEADER_802_11 Hdr,
+ IN PUCHAR pAddr1,
+ IN PUCHAR pBSSID,
+ IN BOOLEAN bFromApCli);
+
+VOID WscSendMessage(
+ IN PRTMP_ADAPTER pAdapter,
+ IN UCHAR OpCode,
+ IN PUCHAR pData,
+ IN INT Len,
+ IN PWSC_CTRL pWscControl,
+ IN UCHAR OpMode, /* 0: AP Mode, 1: AP Client Mode, 2: STA Mode */
+ IN UCHAR EapType);
+
+VOID WscSendEapReqAck(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID WscSendEapReqDone(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PMLME_QUEUE_ELEM pElem);
+
+VOID WscSendEapFail(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN BOOLEAN bSendDeAuth);
+
+VOID WscM2DTimeOutAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID WscUPnPMsgTimeOutAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+int WscSendUPnPConfReqMsg(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apIdx,
+ IN PUCHAR ssidStr,
+ IN PUCHAR macAddr,
+ IN INT Status,
+ IN UINT eventID,
+ IN UCHAR CurOpMode);
+
+
+int WscSendUPnPMessage(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apIdx,
+ IN USHORT msgType,
+ IN USHORT msgSubType,
+ IN PUCHAR pData,
+ IN INT dataLen,
+ IN UINT eventID,
+ IN UINT toIPAddr,
+ IN PUCHAR pMACAddr,
+ IN UCHAR CurOpMode);
+
+VOID WscUPnPErrHandle(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl,
+ IN UINT eventID);
+
+VOID WscBuildBeaconIE(
+ IN PRTMP_ADAPTER pAdapter,
+ IN UCHAR b_configured,
+ IN BOOLEAN b_selRegistrar,
+ IN USHORT devPwdId,
+ IN USHORT selRegCfgMethods,
+ IN UCHAR apidx,
+ IN UCHAR *pAuthorizedMACs,
+ IN UCHAR AuthorizedMACsLen,
+ IN UCHAR CurOpMode);
+
+VOID WscBuildProbeRespIE(
+ IN PRTMP_ADAPTER pAdapter,
+ IN UCHAR respType,
+ IN UCHAR scState,
+ IN BOOLEAN b_selRegistrar,
+ IN USHORT devPwdId,
+ IN USHORT selRegCfgMethods,
+ IN UCHAR apidx,
+ IN UCHAR *pAuthorizedMACs,
+ IN INT AuthorizedMACsLen,
+ IN UCHAR CurOpMode);
+
+
+#ifdef CONFIG_AP_SUPPORT
+VOID WscBuildAssocRespIE(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR ApIdx,
+ IN UCHAR Reason,
+ OUT PUCHAR pOutBuf,
+ OUT PUCHAR pIeLen);
+
+VOID WscSelectedRegistrar(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR RegInfo,
+ IN UINT length,
+ IN UCHAR apidx);
+
+VOID WscInformFromWPA(
+ IN PMAC_TABLE_ENTRY pEntry);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+VOID WscProfileRetryTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID WscPBCTimeOutAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID WscScanTimeOutAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+
+INT WscGenerateUUID(
+ RTMP_ADAPTER *pAd,
+ UCHAR *uuidHexStr,
+ UCHAR *uuidAscStr,
+ int apIdx,
+ BOOLEAN bUseCurrentTime);
+
+VOID WscStop(
+ IN PRTMP_ADAPTER pAd,
+#ifdef CONFIG_AP_SUPPORT
+ IN BOOLEAN bFromApcli,
+#endif /* CONFIG_AP_SUPPORT */
+ IN PWSC_CTRL pWscControl);
+
+VOID WscInit(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bFromApcli,
+ IN UCHAR BssIndex);
+
+BOOLEAN ValidateChecksum(
+ IN UINT PIN);
+
+UINT WscRandomGen4digitPinCode(
+ IN PRTMP_ADAPTER pAd);
+
+UINT WscRandomGeneratePinCode(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apidx);
+
+int BuildMessageM1(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM2(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM2D(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM3(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM4(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM5(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM6(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM7(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageM8(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageDONE(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageACK(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int BuildMessageNACK(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ OUT VOID *pbuf);
+
+int ProcessMessageM1(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM2(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN VOID *precv,
+ IN INT Length,
+ IN UCHAR apidx,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM2D(
+ IN PRTMP_ADAPTER pAdapter,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM3(
+ IN PRTMP_ADAPTER pAdapter,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM4(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM5(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM6(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM7(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN VOID *precv,
+ IN INT Length,
+ OUT PWSC_REG_DATA pReg);
+
+int ProcessMessageM8(
+ IN PRTMP_ADAPTER pAdapter,
+ IN VOID *precv,
+ IN INT Length,
+ IN PWSC_CTRL pWscControl);
+
+USHORT WscGetAuthType(
+ IN NDIS_802_11_AUTHENTICATION_MODE authType);
+
+USHORT WscGetEncryType(
+ IN NDIS_802_11_WEP_STATUS encryType);
+
+NDIS_STATUS WscThreadInit(
+ IN RTMP_ADAPTER *pAd);
+
+BOOLEAN WscThreadExit(
+ IN RTMP_ADAPTER *pAd);
+
+int AppendWSCTLV(
+ IN USHORT index,
+ OUT UCHAR * obuf,
+ IN UCHAR * ibuf,
+ IN USHORT varlen);
+
+VOID WscGetRegDataPIN(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT PinCode,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscPushPBCAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscScanExec(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl);
+
+BOOLEAN WscPBCExec(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bFromM2,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscPBCBssTableSort(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscGenRandomKey(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl,
+ INOUT PUCHAR pKey,
+ INOUT PUSHORT pKeyLen);
+
+VOID WscCreateProfileFromCfg(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR OpMode, /* 0: AP Mode, 1: AP Client Mode, 2: STA Mode */
+ IN PWSC_CTRL pWscControl,
+ OUT PWSC_PROFILE pWscProfile);
+
+void WscWriteConfToPortCfg(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl,
+ IN PWSC_CREDENTIAL pCredential,
+ IN BOOLEAN bEnrollee);
+
+#ifdef APCLI_SUPPORT
+void WscWriteConfToApCliCfg(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl,
+ IN PWSC_CREDENTIAL pCredential,
+ IN BOOLEAN bEnrollee);
+#endif /* APCLI_SUPPORT */
+
+VOID WpsSmProcess(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+VOID WscPBCSessionOverlapCheck(
+ IN PRTMP_ADAPTER pAd);
+
+VOID WscPBC_DPID_FromSTA(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pMacAddr);
+
+#ifdef CONFIG_AP_SUPPORT
+INT WscGetConfWithoutTrigger(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl,
+ IN BOOLEAN bFromUPnP);
+
+BOOLEAN WscReadProfileFromUfdFile(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR ApIdx,
+ IN PSTRING pUfdFileName);
+
+BOOLEAN WscWriteProfileToUfdFile(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR ApIdx,
+ IN PSTRING pUfdFileName);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID WscCheckWpsIeFromWpsAP(
+ IN PRTMP_ADAPTER pAd,
+ IN PEID_STRUCT pEid,
+ OUT PUSHORT pDPIDFromAP);
+
+
+/* WSC hardware push button function 0811 */
+VOID WSC_HDR_BTN_Init(
+ IN PRTMP_ADAPTER pAd);
+
+VOID WSC_HDR_BTN_Stop(
+ IN PRTMP_ADAPTER pAd);
+
+VOID WSC_HDR_BTN_CheckHandler(
+ IN PRTMP_ADAPTER pAd);
+#ifdef WSC_LED_SUPPORT
+BOOLEAN WscSupportWPSLEDMode(
+ IN PRTMP_ADAPTER pAdapter);
+
+BOOLEAN WscSupportWPSLEDMode10(
+ IN PRTMP_ADAPTER pAdapter);
+
+BOOLEAN WscAPHasSecuritySetting(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl);
+
+VOID WscLEDTimer(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID WscSkipTurnOffLEDTimer(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+#endif /* WSC_LED_SUPPORT */
+
+
+
+#ifdef CONFIG_AP_SUPPORT
+VOID WscUpdatePortCfgTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+#endif /* CONFIG_AP_SUPPORT */
+
+VOID WscCheckPeerDPID(
+ IN PRTMP_ADAPTER pAd,
+ IN PFRAME_802_11 Fr,
+ IN PUCHAR eid_data,
+ IN INT eid_len);
+
+VOID WscClearPeerList(
+ IN PLIST_HEADER pWscEnList);
+
+PWSC_PEER_ENTRY WscFindPeerEntry(
+ IN PLIST_HEADER pWscEnList,
+ IN PUCHAR pMacAddr);
+
+VOID WscDelListEntryByMAC(
+ PLIST_HEADER pWscEnList,
+ IN PUCHAR pMacAddr);;
+
+VOID WscInsertPeerEntryByMAC(
+ IN PLIST_HEADER pWscEnList,
+ IN PUCHAR pMacAddr);
+
+#ifdef CONFIG_AP_SUPPORT
+INT WscApShowPeerList(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+VOID WscMaintainPeerList(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWpsCtrl);
+
+VOID WscAssignEntryMAC(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWpsCtrl);
+
+#ifdef WSC_V2_SUPPORT
+#ifdef CONFIG_AP_SUPPORT
+VOID WscOnOff(
+ IN PRTMP_ADAPTER pAd,
+ IN INT ApIdx,
+ IN BOOLEAN bOff);
+
+VOID WscAddEntryToAclList(
+ IN PRTMP_ADAPTER pAd,
+ IN INT ApIdx,
+ IN PUCHAR pMacAddr);
+
+VOID WscSetupLockTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID WscCheckPinAttackCount(
+ IN PRTMP_ADAPTER pAd,
+ IN PWSC_CTRL pWscControl);
+#endif /* CONFIG_AP_SUPPORT */
+
+BOOLEAN WscGenV2Msg(
+ IN PWSC_CTRL pWpsCtrl,
+ IN BOOLEAN bSelRegistrar,
+ IN PUCHAR pAuthorizedMACs,
+ IN INT AuthorizedMACsLen,
+ OUT UCHAR **pOutBuf,
+ OUT INT *pOutBufLen);
+
+BOOLEAN WscParseV2SubItem(
+ IN UCHAR SubID,
+ IN PUCHAR pData,
+ IN USHORT DataLen,
+ OUT PUCHAR pOutBuf,
+ OUT PUCHAR pOutBufLen);
+
+VOID WscSendEapFragAck(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID WscSendEapFragData(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PWSC_CTRL pWscControl,
+ IN PMAC_TABLE_ENTRY pEntry);
+#endif /* WSC_V2_SUPPORT */
+
+BOOLEAN WscGetDataFromPeerByTag(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pIeData,
+ IN INT IeDataLen,
+ IN USHORT WscTag,
+ OUT PUCHAR pWscBuf,
+ OUT PUSHORT pWscBufLen);
+
+#endif /* WSC_INCLUDED */
+
+
+
+
+BOOLEAN rtstrmactohex(
+ IN PSTRING s1,
+ IN PSTRING s2);
+
+BOOLEAN rtstrcasecmp(
+ IN PSTRING s1,
+ IN PSTRING s2);
+
+PSTRING rtstrstruncasecmp(
+ IN PSTRING s1,
+ IN PSTRING s2);
+
+PSTRING rtstrstr(
+ IN const PSTRING s1,
+ IN const PSTRING s2);
+
+PSTRING rstrtok(
+ IN PSTRING s,
+ IN const PSTRING ct);
+
+int rtinet_aton(
+ const PSTRING cp,
+ unsigned int *addr);
+
+/*//////// common ioctl functions ////////*/
+INT Set_DriverVersion_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CountryRegion_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_CountryRegionABand_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WirelessMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_MBSS_WirelessMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Channel_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+INT Set_ShortSlot_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_TxPower_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BGProtection_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_TxPreamble_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_RTSThreshold_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_FragThreshold_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_TxBurst_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+
+#ifdef AGGREGATION_SUPPORT
+INT Set_PktAggregate_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* AGGREGATION_SUPPORT */
+
+#ifdef INF_PPA_SUPPORT
+INT Set_INF_AMAZON_SE_PPA_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR arg);
+
+INT ifx_ra_start_xmit (
+ IN struct net_device *rx_dev,
+ IN struct net_device *tx_dev,
+ IN struct sk_buff *skb,
+ IN int len);
+#endif /* INF_PPA_SUPPORT */
+
+INT Set_IEEE80211H_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef EXT_BUILD_CHANNEL_LIST
+INT Set_ExtCountryCode_Proc(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+INT Set_ExtDfsType_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ChannelListAdd_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ChannelListShow_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+INT Set_ChannelListDel_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* EXT_BUILD_CHANNEL_LIST */
+
+#ifdef DBG
+INT Set_Debug_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_DebugFunc_Proc(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+#endif
+
+#ifdef TXBF_SUPPORT
+INT Set_ReadITxBf_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ReadETxBf_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WriteITxBf_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WriteETxBf_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_StatITxBf_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_StatETxBf_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_TxBfTag_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ITxBfTimeout_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfTimeout_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_InvTxBfTag_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ITxBfCal_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ITxBfDivCal_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ITxBfLnaCal_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfEnCond_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfCodebook_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfCoefficient_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfGrouping_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfNoncompress_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ETxBfIncapable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_NoSndgCntThrd_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_NdpSndgStreams_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_Trigger_Sounding_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ITxBfEn_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#endif /* TXBF_SUPPORT */
+
+INT Set_RateAdaptInterval(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+
+#ifdef PRE_ANT_SWITCH
+INT Set_PreAntSwitch_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PreAntSwitchRSSI_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PreAntSwitchTimeout_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#endif /* PRE_ANT_SWITCH */
+
+
+#ifdef CFO_TRACK
+INT Set_CFOTrack_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef CFO_TRACK
+#ifdef CONFIG_AP_SUPPORT
+INT rtmp_cfo_track(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry, INT lastClient);
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* CFO_TRACK */
+
+#endif // CFO_TRACK //
+
+#ifdef DBG_CTRL_SUPPORT
+INT Set_DebugFlags_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef INCLUDE_DEBUG_QUEUE
+INT Set_DebugQueue_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+void dbQueueEnqueue(
+ IN UCHAR type,
+ IN UCHAR *data);
+
+void dbQueueEnqueueTxFrame(
+ IN UCHAR *pTxWI,
+ IN UCHAR *pHeader_802_11);
+
+void dbQueueEnqueueRxFrame(
+ IN UCHAR *pRxWI,
+ IN UCHAR *pHeader_802_11,
+ IN ULONG flags);
+#endif /* INCLUDE_DEBUG_QUEUE */
+#endif /* DBG_CTRL_SUPPORT */
+
+INT Show_DescInfo_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Show_MacTable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT show_devinfo_proc(RTMP_ADAPTER *pAd, PSTRING arg);
+
+
+INT Set_ResetStatCounter_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef DOT11_N_SUPPORT
+INT Set_BASetup_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BADecline_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BAOriTearDown_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BARecTearDown_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtBw_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtMcs_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtGi_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtOpMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtStbc_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtHtc_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtExtcha_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtMpduDensity_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtBaWinSize_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtRdg_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtLinkAdapt_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtAmsdu_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtAutoBa_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtProtect_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtMimoPs_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef DOT11N_DRAFT3
+INT Set_HT_BssCoex_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING pParam);
+
+INT Set_HT_BssCoexApCntThr_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING pParam);
+#endif /* DOT11N_DRAFT3 */
+
+
+#ifdef CONFIG_AP_SUPPORT
+INT Set_HtTxStream_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtRxStream_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#ifdef DOT11_N_SUPPORT
+#ifdef GREENAP_SUPPORT
+INT Set_GreenAP_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* GREENAP_SUPPORT */
+#endif /* DOT11_N_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+INT Set_ForceShortGI_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ForceGF_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT SetCommonHT(RTMP_ADAPTER *pAd);
+
+INT Set_SendPSMPAction_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+void convert_reordering_packet_to_preAMSDU_or_802_3_packet(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+INT Set_HtMIMOPSmode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+
+INT Set_HtTxBASize_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_HtDisallowTKIP_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_BurstMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* DOT11_N_SUPPORT */
+
+
+#ifdef DOT11_VHT_AC
+INT Set_VhtBw_Proc(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_VhtStbc_Proc(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+#endif /* DOT11_VHT_AC */
+
+
+#ifdef APCLI_SUPPORT
+INT RTMPIoctlConnStatus(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+#endif /*APCLI_SUPPORT*/
+
+
+
+
+
+#ifdef CONFIG_AP_SUPPORT
+VOID detect_wmm_traffic(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR up,
+ IN UCHAR bOutput);
+
+VOID dynamic_tune_be_tx_op(
+ IN RTMP_ADAPTER *pAd,
+ IN ULONG nonBEpackets);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef DOT11_N_SUPPORT
+VOID Handle_BSS_Width_Trigger_Events(RTMP_ADAPTER *pAd);
+
+void build_ext_channel_switch_ie(
+ IN RTMP_ADAPTER *pAd,
+ IN HT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE *pIE);
+
+void assoc_ht_info_debugshow(
+ IN RTMP_ADAPTER *pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR ht_cap_len,
+ IN HT_CAPABILITY_IE *pHTCapability);
+#endif /* DOT11_N_SUPPORT */
+
+BOOLEAN APRxDoneInterruptHandle(RTMP_ADAPTER *pAd);
+BOOLEAN STARxDoneInterruptHandle(RTMP_ADAPTER *pAd, BOOLEAN argc);
+BOOLEAN RxDoneInterruptHandle(RTMP_ADAPTER *pAd);
+
+NTSTATUS StopDmaRx(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR Level);
+NTSTATUS StopDmaTx(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR Level);
+
+#ifdef DOT11_N_SUPPORT
+/* AMPDU packet indication */
+VOID Indicate_AMPDU_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+#ifdef HDR_TRANS_SUPPORT
+VOID Indicate_AMPDU_Packet_Hdr_Trns(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+#endif /* HDR_TRANS_SUPPORT */
+
+/* AMSDU packet indication */
+VOID Indicate_AMSDU_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+VOID BaReOrderingBufferMaintain(
+ IN PRTMP_ADAPTER pAd);
+#endif /* DOT11_N_SUPPORT */
+
+/* Normal legacy Rx packet indication */
+VOID Indicate_Legacy_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+#ifdef HDR_TRANS_SUPPORT
+VOID Indicate_Legacy_Packet_Hdr_Trns(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+#endif /* HDR_TRANS_SUPPORT */
+
+VOID Indicate_EAPOL_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+UINT deaggregate_AMSDU_announce(
+ IN PRTMP_ADAPTER pAd,
+ PNDIS_PACKET pPacket,
+ IN PUCHAR pData,
+ IN ULONG DataSize,
+ IN UCHAR OpMode);
+
+#ifdef TXBF_SUPPORT
+BOOLEAN clientSupportsETxBF(RTMP_ADAPTER *pAd, HT_BF_CAP *pTxBFCap);
+void setETxBFCap(RTMP_ADAPTER *pAd, HT_BF_CAP *pTxBFCap);
+
+#ifdef ETXBF_EN_COND3_SUPPORT
+VOID txSndgSameMcs(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY * pEnt, UCHAR smoothMfb);
+VOID txSndgOtherGroup(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry);
+VOID txMrqInvTxBF(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry);
+VOID chooseBestMethod(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry, UCHAR mfb);
+VOID rxBestSndg(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry);
+#endif /* ETXBF_EN_COND3_SUPPORT */
+
+VOID handleBfFb(RTMP_ADAPTER *pAd, RX_BLK *pRxBlk);
+
+VOID TxBFInit(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN BOOLEAN supportsETxBF);
+
+VOID eTxBFProbing(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID Trigger_Sounding_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR SndgType,
+ IN UCHAR SndgBW,
+ IN UCHAR SndgMcs,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID rtmp_asic_set_bf(
+ IN RTMP_ADAPTER *pAd);
+
+BOOLEAN rtmp_chk_itxbf_calibration(
+ IN RTMP_ADAPTER *pAd);
+
+#endif /* TXBF_SUPPORT */
+
+BOOLEAN CmdRspEventCallbackHandle(PRTMP_ADAPTER pAd, PUCHAR pRspBuffer);
+
+#ifdef CONFIG_AP_SUPPORT
+/* remove LLC and get 802_3 Header */
+#define RTMP_AP_802_11_REMOVE_LLC_AND_CONVERT_TO_802_3(_pRxBlk, _pHeader802_3) \
+{ \
+ PUCHAR _pRemovedLLCSNAP = NULL, _pDA, _pSA; \
+ \
+ \
+ if (RX_BLK_TEST_FLAG(_pRxBlk, fRX_WDS) || RX_BLK_TEST_FLAG(_pRxBlk, fRX_MESH)) \
+ { \
+ _pDA = _pRxBlk->pHeader->Addr3; \
+ _pSA = (PUCHAR)_pRxBlk->pHeader + sizeof(HEADER_802_11); \
+ } \
+ else if (RX_BLK_TEST_FLAG(_pRxBlk, fRX_APCLI)) \
+ { \
+ _pDA = _pRxBlk->pHeader->Addr1; \
+ _pSA = _pRxBlk->pHeader->Addr3; \
+ } \
+ else \
+ { \
+ _pDA = _pRxBlk->pHeader->Addr3; \
+ _pSA = _pRxBlk->pHeader->Addr2; \
+ } \
+ \
+ CONVERT_TO_802_3(_pHeader802_3, _pDA, _pSA, _pRxBlk->pData, \
+ _pRxBlk->DataSize, _pRemovedLLCSNAP); \
+}
+#endif /* CONFIG_AP_SUPPORT */
+
+
+
+BOOLEAN APFowardWirelessStaToWirelessSta(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN ULONG FromWhichBSSID);
+
+VOID Announce_or_Forward_802_3_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR FromWhichBSSID);
+
+VOID Sta_Announce_or_Forward_802_3_Packet(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR FromWhichBSSID);
+
+#ifdef CONFIG_AP_SUPPORT
+#define AP_ANNOUNCE_OR_FORWARD_802_3_PACKET(_pAd, _pPacket, _FromWhichBSS)\
+ Announce_or_Forward_802_3_Packet(_pAd, _pPacket, _FromWhichBSS);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+
+
+
+/* Normal, AMPDU or AMSDU */
+VOID CmmRxnonRalinkFrameIndicate(
+ IN RTMP_ADAPTER *pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+#ifdef HDR_TRANS_SUPPORT
+VOID CmmRxnonRalinkFrameIndicate_Hdr_Trns(
+ IN RTMP_ADAPTER *pAd,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+#endif /* HDR_TRANS_SUPPORT */
+
+VOID CmmRxRalinkFrameIndicate(
+ IN RTMP_ADAPTER *pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN RX_BLK *pRxBlk,
+ IN UCHAR FromWhichBSSID);
+
+VOID Update_Rssi_Sample(
+ IN RTMP_ADAPTER *pAd,
+ IN RSSI_SAMPLE *pRssi,
+ IN RXWI_STRUC *pRxWI);
+
+PNDIS_PACKET GetPacketFromRxRing(
+ IN RTMP_ADAPTER *pAd,
+ OUT RX_BLK *pRxBlk,
+ OUT BOOLEAN *pbReschedule,
+ INOUT UINT32 *pRxPending);
+
+PNDIS_PACKET RTMPDeFragmentDataFrame(
+ IN RTMP_ADAPTER *pAd,
+ IN RX_BLK *pRxBlk);
+
+/*////////////////////////////////////*/
+
+#if defined (AP_SCAN_SUPPORT) || defined (CONFIG_STA_SUPPORT)
+VOID RTMPIoctlGetSiteSurvey(
+ IN PRTMP_ADAPTER pAdapter,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+#endif
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+INT Set_ApCli_AuthMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_ApCli_EncrypType_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef MAT_SUPPORT
+
+VOID getIPv6MacTbInfo(MAT_STRUCT *, char *, ULONG);
+
+VOID getIPMacTbInfo(
+ IN MAT_STRUCT *pMatCfg,
+ IN char *pOutBuf,
+ IN ULONG BufLen);
+
+NDIS_STATUS MATEngineInit(
+ IN RTMP_ADAPTER *pAd);
+
+NDIS_STATUS MATEngineExit(
+ IN RTMP_ADAPTER *pAd);
+
+PUCHAR MATEngineRxHandle(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPkt,
+ IN UINT infIdx);
+
+
+PUCHAR MATEngineTxHandle(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPkt,
+ IN UINT infIdx,
+ IN UCHAR OpMode);
+
+BOOLEAN MATPktRxNeedConvert(
+ IN PRTMP_ADAPTER pAd,
+ IN PNET_DEV net_dev);
+
+#endif /* MAT_SUPPORT */
+
+#ifdef CONFIG_AP_SUPPORT
+typedef struct CountryCodeToCountryRegion {
+ USHORT CountryNum;
+ UCHAR IsoName[3];
+ /*UCHAR CountryName[40]; */
+ PSTRING pCountryName;
+ BOOLEAN SupportABand;
+ /*ULONG RegDomainNum11A; */
+ UCHAR RegDomainNum11A;
+ BOOLEAN SupportGBand;
+ /*ULONG RegDomainNum11G; */
+ UCHAR RegDomainNum11G;
+} COUNTRY_CODE_TO_COUNTRY_REGION;
+#endif /* CONFIG_AP_SUPPORT */
+
+#ifdef SNMP_SUPPORT
+/*for snmp */
+typedef struct _DefaultKeyIdxValue
+{
+ UCHAR KeyIdx;
+ UCHAR Value[16];
+} DefaultKeyIdxValue, *PDefaultKeyIdxValue;
+#endif
+
+
+
+INT Set_FixedTxMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef CONFIG_APSTA_MIXED_SUPPORT
+INT Set_OpMode_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* CONFIG_APSTA_MIXED_SUPPORT */
+
+INT Set_LongRetryLimit_Proc(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+INT Set_ShortRetryLimit_Proc(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+INT Set_AutoFallBack_Proc(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PSTRING arg);
+
+
+VOID RT28XXDMADisable(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RT28XXDMAEnable(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RT28xx_UpdateBeaconToAsic(
+ IN RTMP_ADAPTER * pAd,
+ IN INT apidx,
+ IN ULONG BeaconLen,
+ IN ULONG UpdatePos);
+
+void CfgInitHook(PRTMP_ADAPTER pAd);
+
+
+NDIS_STATUS RtmpNetTaskInit(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RtmpNetTaskExit(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS RtmpMgmtTaskInit(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RtmpMgmtTaskExit(
+ IN RTMP_ADAPTER *pAd);
+
+void tbtt_tasklet(unsigned long data);
+
+
+
+
+
+
+VOID AsicTurnOffRFClk(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Channel);
+
+
+
+#ifdef RTMP_TIMER_TASK_SUPPORT
+INT RtmpTimerQThread(
+ IN ULONG Context);
+
+RTMP_TIMER_TASK_ENTRY *RtmpTimerQInsert(
+ IN RTMP_ADAPTER *pAd,
+ IN RALINK_TIMER_STRUCT *pTimer);
+
+BOOLEAN RtmpTimerQRemove(
+ IN RTMP_ADAPTER *pAd,
+ IN RALINK_TIMER_STRUCT *pTimer);
+
+void RtmpTimerQExit(
+ IN RTMP_ADAPTER *pAd);
+
+void RtmpTimerQInit(
+ IN RTMP_ADAPTER *pAd);
+#endif /* RTMP_TIMER_TASK_SUPPORT */
+
+
+#ifdef RTMP_MAC_USB
+
+NTSTATUS RTUSBMultiRead(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ OUT PUCHAR pData,
+ IN USHORT length);
+
+NTSTATUS RTUSBMultiWrite(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ IN PUCHAR pData,
+ IN USHORT length,
+ IN BOOLEAN bWriteHigh);
+
+NTSTATUS RTUSBMultiWrite_nBytes(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ IN PUCHAR pData,
+ IN USHORT length,
+ IN USHORT batchLen);
+
+NTSTATUS RTUSBMultiWrite_OneByte(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ IN PUCHAR pData);
+
+NTSTATUS RTUSBReadBBPRegister(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Id,
+ IN PUCHAR pValue);
+
+NTSTATUS RTUSBWriteBBPRegister(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Id,
+ IN UCHAR Value);
+
+NTSTATUS RTUSBWriteRFRegister(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT32 Value);
+
+NTSTATUS RTUSB_VendorRequest(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT32 TransferFlags,
+ IN UCHAR ReservedBits,
+ IN UCHAR Request,
+ IN USHORT Value,
+ IN USHORT Index,
+ IN PVOID TransferBuffer,
+ IN UINT32 TransferBufferLength);
+
+NTSTATUS RTUSBReadEEPROM(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ OUT PUCHAR pData,
+ IN USHORT length);
+
+NTSTATUS RTUSBWriteEEPROM(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ IN PUCHAR pData,
+ IN USHORT length);
+
+VOID RTUSBPutToSleep(
+ IN PRTMP_ADAPTER pAd);
+
+NTSTATUS RTUSBWakeUp(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS RTUSBEnqueueCmdFromNdis(
+ IN PRTMP_ADAPTER pAd,
+ IN NDIS_OID Oid,
+ IN BOOLEAN SetInformation,
+ IN PVOID pInformationBuffer,
+ IN UINT32 InformationBufferLength);
+
+VOID RTUSBDequeueCmd(
+ IN PCmdQ cmdq,
+ OUT PCmdQElmt *pcmdqelmt);
+
+INT RTUSBCmdThread(
+ IN ULONG Context);
+
+VOID RTUSBBssBeaconExit(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RTUSBBssBeaconStop(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RTUSBBssBeaconStart(
+ IN RTMP_ADAPTER * pAd);
+
+VOID RTUSBBssBeaconInit(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RTUSBWatchDog(
+ IN RTMP_ADAPTER *pAd);
+
+NTSTATUS RTUSBWriteMACRegister(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ IN UINT32 Value,
+ IN BOOLEAN bWriteHigh);
+
+NTSTATUS RTUSBReadMACRegister(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT Offset,
+ OUT PUINT32 pValue);
+
+NTSTATUS RTUSBSingleWrite(
+ IN RTMP_ADAPTER *pAd,
+ IN USHORT Offset,
+ IN USHORT Value,
+ IN BOOLEAN bWriteHigh);
+
+NTSTATUS RTUSBFirmwareWrite(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pFwImage,
+ IN ULONG FwLen);
+
+NTSTATUS RTUSBVenderReset(
+ IN PRTMP_ADAPTER pAd);
+
+NDIS_STATUS RTUSBSetHardWareRegister(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PVOID pBuf);
+
+NDIS_STATUS RTUSBQueryHardWareRegister(
+ IN PRTMP_ADAPTER pAdapter,
+ IN PVOID pBuf);
+
+/*VOID CMDHandler( */
+/* IN PRTMP_ADAPTER pAd); */
+
+NDIS_STATUS RTUSBWriteHWMACAddress(
+ IN RTMP_ADAPTER *pAd);
+
+VOID MlmeSetPsm(
+ IN RTMP_ADAPTER *pAd,
+ IN USHORT psm);
+
+NDIS_STATUS RTMPWPAAddKeyProc(
+ IN RTMP_ADAPTER *pAd,
+ IN VOID *pBuf);
+
+VOID AsicRxAntEvalAction(
+ IN RTMP_ADAPTER *pAd);
+
+void append_pkt(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR *pHeader802_3,
+ IN UINT HdrLen,
+ IN UCHAR *pData,
+ IN ULONG DataSize,
+ OUT PNDIS_PACKET *ppPacket);
+
+
+VOID RTUSBMlmeHardTransmit(
+ IN RTMP_ADAPTER *pAd,
+ IN MGMT_STRUC *pMgmt);
+
+INT MlmeThread(ULONG Context);
+
+
+/*
+ Function Prototype in rtusb_data.c
+*/
+NDIS_STATUS RTUSBFreeDescRequest(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR BulkOutPipeId,
+ IN UINT32 req_cnt);
+
+
+BOOLEAN RTUSBNeedQueueBackForAgg(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR BulkOutPipeId);
+
+
+/* Function Prototype in cmm_data_usb.c */
+USHORT RtmpUSB_WriteSubTxResource(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN BOOLEAN bIsLast,
+ OUT USHORT *FreeNumber);
+
+USHORT RtmpUSB_WriteSingleTxResource(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN BOOLEAN bIsLast,
+ OUT USHORT *FreeNumber);
+
+USHORT RtmpUSB_WriteFragTxResource(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN UCHAR fragNum,
+ OUT USHORT *FreeNumber);
+
+USHORT RtmpUSB_WriteMultiTxResource(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN UCHAR frameNum,
+ OUT USHORT *FreeNumber);
+
+VOID RtmpUSB_FinalWriteTxResource(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN USHORT totalMPDUSize,
+ IN USHORT TxIdx);
+
+VOID RtmpUSBDataLastTxIdx(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR QueIdx,
+ IN USHORT TxIdx);
+
+VOID RtmpUSBDataKickOut(
+ IN PRTMP_ADAPTER pAd,
+ IN TX_BLK *pTxBlk,
+ IN UCHAR QueIdx);
+
+int RtmpUSBMgmtKickOut(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR QueIdx,
+ IN PNDIS_PACKET pPacket,
+ IN PUCHAR pSrcBufVA,
+ IN UINT SrcBufLen);
+
+VOID RtmpUSBNullFrameKickOut(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR QueIdx,
+ IN UCHAR *pNullFrame,
+ IN UINT32 frameLen);
+
+VOID RtmpUsbStaAsicForceWakeupTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID RT28xxUsbStaAsicForceWakeup(
+ IN PRTMP_ADAPTER pAd,
+ IN BOOLEAN bFromTx);
+
+VOID RT28xxUsbStaAsicSleepThenAutoWakeup(
+ IN PRTMP_ADAPTER pAd,
+ IN USHORT TbttNumToNextWakeUp);
+
+VOID RT28xxUsbMlmeRadioOn(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RT28xxUsbMlmeRadioOFF(
+ IN PRTMP_ADAPTER pAd);
+VOID RT28xxUsbAsicRadioOff(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RT28xxUsbAsicRadioOn(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN AsicCheckCommandOk(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Command);
+
+VOID RT28xxUsbAsicWOWEnable(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RT28xxUsbAsicWOWDisable(
+ IN PRTMP_ADAPTER pAd);
+
+#endif /* RTMP_MAC_USB */
+
+#ifdef NEW_WOW_SUPPORT
+VOID RT28xxAndesWOWEnable(
+ IN PRTMP_ADAPTER pAd);
+VOID RT28xxAndesWOWDisable(
+ IN PRTMP_ADAPTER pAd);
+#endif /* NEW_WOW_SUPPORT */
+
+#if (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT)
+VOID RT28xxAsicWOWEnable(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RT28xxAsicWOWDisable(
+ IN PRTMP_ADAPTER pAd);
+#endif /* (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT) */
+
+NDIS_STATUS RTMPCheckRxError(
+ IN RTMP_ADAPTER *pAd,
+ IN PHEADER_802_11 pHeader,
+ IN RXWI_STRUC *pRxWI,
+ IN RXINFO_STRUC *pRxInfo);
+
+
+/*////////////////////////////////////*/
+
+#ifdef AP_QLOAD_SUPPORT
+VOID QBSS_LoadInit(
+ IN RTMP_ADAPTER *pAd);
+
+VOID QBSS_LoadAlarmReset(
+ IN RTMP_ADAPTER *pAd);
+
+VOID QBSS_LoadAlarmResume(
+ IN RTMP_ADAPTER *pAd);
+
+UINT32 QBSS_LoadBusyTimeGet(
+ IN RTMP_ADAPTER *pAd);
+
+BOOLEAN QBSS_LoadIsAlarmIssued(
+ IN RTMP_ADAPTER *pAd);
+
+BOOLEAN QBSS_LoadIsBusyTimeAccepted(
+ IN RTMP_ADAPTER *pAd,
+ IN UINT32 BusyTime);
+
+UINT32 QBSS_LoadElementAppend(
+ IN RTMP_ADAPTER *pAd,
+ OUT UINT8 *buf_p);
+
+UINT32 QBSS_LoadElementParse(
+ IN RTMP_ADAPTER *pAd,
+ IN UINT8 *pElement,
+ OUT UINT16 *pStationCount,
+ OUT UINT8 *pChanUtil,
+ OUT UINT16 *pAvalAdmCap);
+
+VOID QBSS_LoadUpdate(
+ IN RTMP_ADAPTER *pAd,
+ IN ULONG UpTime);
+
+VOID QBSS_LoadStatusClear(
+ IN RTMP_ADAPTER *pAd);
+
+INT Show_QoSLoad_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* AP_QLOAD_SUPPORT */
+
+/*///////////////////////////////////*/
+INT RTMPShowCfgValue(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING pName,
+ IN PSTRING pBuf,
+ IN UINT32 MaxLen);
+
+PSTRING RTMPGetRalinkAuthModeStr(
+ IN NDIS_802_11_AUTHENTICATION_MODE authMode);
+
+PSTRING RTMPGetRalinkEncryModeStr(
+ IN USHORT encryMode);
+/*//////////////////////////////////*/
+
+
+
+VOID ReSyncBeaconTime(RTMP_ADAPTER *pAd);
+VOID RTMPSetAGCInitValue(RTMP_ADAPTER *pAd, UCHAR BandWidth);
+
+#ifdef TXBF_SUPPORT
+VOID handleHtcField(
+ IN PRTMP_ADAPTER pAd,
+ IN RX_BLK *pRxBlk);
+#endif /* TXBF_SUPPORT */
+
+#ifdef MFB_SUPPORT
+VOID MFB_PerPareMRQ(
+ IN PRTMP_ADAPTER pAd,
+ OUT VOID* pBuf,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID MFB_PerPareMFB(
+ IN PRTMP_ADAPTER pAd,
+ OUT VOID* pBuf,
+ IN PMAC_TABLE_ENTRY pEntry);
+#endif /* MFB_SUPPORT */
+
+#define VIRTUAL_IF_INC(__pAd) ((__pAd)->VirtualIfCnt++)
+#define VIRTUAL_IF_DEC(__pAd) ((__pAd)->VirtualIfCnt--)
+#define VIRTUAL_IF_NUM(__pAd) ((__pAd)->VirtualIfCnt)
+
+
+
+#ifdef RTMP_USB_SUPPORT
+/*
+ * Function Prototype in rtusb_bulk.c
+ */
+
+#ifdef INF_AMAZON_SE
+VOID SoftwareFlowControl(
+ IN PRTMP_ADAPTER pAd) ;
+#endif /* INF_AMAZON_SE */
+
+
+VOID RTUSBInitTxDesc(
+ IN PRTMP_ADAPTER pAd,
+ IN PTX_CONTEXT pTxContext,
+ IN UCHAR BulkOutPipeId,
+ IN usb_complete_t Func);
+
+VOID RTUSBInitHTTxDesc(
+ IN PRTMP_ADAPTER pAd,
+ IN PHT_TX_CONTEXT pTxContext,
+ IN UCHAR BulkOutPipeId,
+ IN ULONG BulkOutSize,
+ IN usb_complete_t Func);
+
+VOID RTUSBInitRxDesc(
+ IN PRTMP_ADAPTER pAd,
+ IN PRX_CONTEXT pRxContext);
+
+VOID RTUSBCleanUpDataBulkOutQueue(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBCancelPendingBulkOutIRP(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBBulkOutDataPacket(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR BulkOutPipeId,
+ IN UCHAR Index);
+
+VOID RTUSBBulkOutNullFrame(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBBulkOutRTSFrame(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBCancelPendingBulkInIRP(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBCancelPendingIRPs(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBBulkOutMLMEPacket(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR Index);
+
+VOID RTUSBBulkOutPsPoll(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBCleanUpMLMEBulkOutQueue(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBKickBulkOut(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBBulkReceive(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTUSBBulkCmdRspEventReceive(
+ IN PRTMP_ADAPTER pAd);
+
+VOID DoBulkIn(
+ IN RTMP_ADAPTER *pAd);
+
+VOID RTUSBInitRxDesc(
+ IN PRTMP_ADAPTER pAd,
+ IN PRX_CONTEXT pRxContext);
+
+VOID RTUSBBulkRxHandle(
+ IN unsigned long data);
+#endif /* RTMP_USB_SUPPORT */
+
+
+#ifdef SOFT_ENCRYPT
+BOOLEAN RTMPExpandPacketForSwEncrypt(
+ IN PRTMP_ADAPTER pAd,
+ IN PTX_BLK pTxBlk);
+
+VOID RTMPUpdateSwCacheCipherInfo(
+ IN PRTMP_ADAPTER pAd,
+ IN PTX_BLK pTxBlk,
+ IN PUCHAR pHdr);
+#endif /* SOFT_ENCRYPT */
+
+
+/*
+ OS Related funciton prototype definitions.
+ TODO: Maybe we need to move these function prototypes to other proper place.
+*/
+
+VOID RTInitializeCmdQ(
+ IN PCmdQ cmdq);
+
+INT RTPCICmdThread(
+ IN ULONG Context);
+
+VOID CMDHandler(
+ IN PRTMP_ADAPTER pAd);
+
+VOID RTThreadDequeueCmd(
+ IN PCmdQ cmdq,
+ OUT PCmdQElmt *pcmdqelmt);
+
+NDIS_STATUS RTEnqueueInternalCmd(
+ IN PRTMP_ADAPTER pAd,
+ IN NDIS_OID Oid,
+ IN PVOID pInformationBuffer,
+ IN UINT32 InformationBufferLength);
+
+#ifdef HOSTAPD_SUPPORT
+VOID ieee80211_notify_michael_failure(
+ IN PRTMP_ADAPTER pAd,
+ IN PHEADER_802_11 pHeader,
+ IN UINT keyix,
+ IN INT report);
+
+const CHAR* ether_sprintf(const UINT8 *mac);
+#endif/*HOSTAPD_SUPPORT*/
+
+#ifdef VENDOR_FEATURE3_SUPPORT
+VOID RTMP_IO_WRITE32(
+ PRTMP_ADAPTER pAd,
+ UINT32 Offset,
+ UINT32 Value);
+
+VOID RTMP_BBP_IO_READ8_BY_REG_ID(
+ PRTMP_ADAPTER pAd,
+ UINT32 Offset,
+ UINT8 *pValue);
+
+VOID RTMP_BBP_IO_READ8(
+ PRTMP_ADAPTER pAd,
+ UCHAR Offset,
+ UINT8 *pValue,
+ BOOLEAN FlgValidMCR);
+
+VOID RTMP_BBP_IO_WRITE8_BY_REG_ID(
+ PRTMP_ADAPTER pAd,
+ UINT32 Offset,
+ UINT8 Value);
+
+VOID RTMP_BBP_IO_WRITE8(
+ PRTMP_ADAPTER pAd,
+ UCHAR Offset,
+ UINT8 Value,
+ BOOLEAN FlgValidMCR);
+#endif /* VENDOR_FEATURE3_SUPPORT */
+
+
+INT AsicGetMacVersion(
+ IN RTMP_ADAPTER *pAd);
+
+INT WaitForAsicReady(
+ IN RTMP_ADAPTER *pAd);
+
+BOOLEAN CHAN_PropertyCheck(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT32 ChanNum,
+ IN UCHAR Property);
+
+
+void getRate(
+ IN HTTRANSMIT_SETTING HTSetting,
+ OUT ULONG* fLastTxRxRate);
+
+
+#ifdef APCLI_SUPPORT
+#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
+VOID ApcliSendAssocIEsToWpaSupplicant(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT ifIndex);
+
+INT ApcliWpaCheckEapCode(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pFrame,
+ IN USHORT FrameLen,
+ IN USHORT OffSet);
+
+VOID ApcliWpaSendEapolStart(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pBssid,
+ IN PMAC_TABLE_ENTRY pMacEntry,
+ IN PAPCLI_STRUCT pApCliEntry);
+
+
+VOID ApCliRTMPSendNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR TxRate,
+ IN BOOLEAN bQosNull,
+ IN PMAC_TABLE_ENTRY pMacEntry);
+
+#endif/*APCLI_WPA_SUPPLICANT_SUPPORT*/
+#endif/*APCLI_SUPPORT*/
+
+
+void RTMP_IndicateMediaState(
+ IN PRTMP_ADAPTER pAd,
+ IN NDIS_MEDIA_STATE media_state);
+
+#if defined(RT3350) || defined(RT33xx)
+VOID RTMP_TxEvmCalibration(
+ IN PRTMP_ADAPTER pAd);
+#endif /* defined(RT3350) || defined(RT33xx) */
+
+INT RTMPSetInformation(
+ IN RTMP_ADAPTER *pAd,
+ IN OUT RTMP_IOCTL_INPUT_STRUCT *rq,
+ IN INT cmd);
+
+INT RTMPQueryInformation(
+ IN RTMP_ADAPTER *pAd,
+ INOUT RTMP_IOCTL_INPUT_STRUCT *rq,
+ IN INT cmd);
+
+VOID RTMPIoctlShow(
+ IN RTMP_ADAPTER *pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *rq,
+ IN UINT32 subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+
+INT RTMP_COM_IoctlHandle(
+ IN VOID *pAdSrc,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq,
+ IN INT cmd,
+ IN USHORT subcmd,
+ IN VOID *pData,
+ IN ULONG Data);
+
+#ifdef CONFIG_AP_SUPPORT
+INT RTMP_AP_IoctlPrepare(
+ IN RTMP_ADAPTER *pAd,
+ IN VOID *pCB);
+#endif /* CONFIG_AP_SUPPORT */
+
+
+INT Set_VcoPeriod_Proc(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+INT Set_RateAlg_Proc(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+
+#ifdef SINGLE_SKU
+INT Set_ModuleTxpower_Proc(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING arg);
+#endif /* SINGLE_SKU */
+
+VOID RtmpEnqueueNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN UCHAR TxRate,
+ IN UCHAR PID,
+ IN UCHAR apidx,
+ IN BOOLEAN bQosNull,
+ IN BOOLEAN bEOSP,
+ IN UCHAR OldUP);
+
+VOID RtmpCleanupPsQueue(
+ IN PRTMP_ADAPTER pAd,
+ IN PQUEUE_HEADER pQueue);
+
+#ifdef CONFIG_MULTI_CHANNEL
+VOID RtmpPrepareHwNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN BOOLEAN bQosNull,
+ IN BOOLEAN bEOSP,
+ IN UCHAR OldUP,
+ IN UCHAR OpMode,
+ IN UCHAR PwrMgmt,
+ IN BOOLEAN bWaitACK,
+ IN CHAR Index);
+
+VOID RTMPHwSendNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR TxRate,
+ IN BOOLEAN bQosNull,
+ IN USHORT PwrMgmt,
+ IN CHAR Index);
+
+VOID RtmpEnqueueLastNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pAddr,
+ IN UCHAR TxRate,
+ IN UCHAR PID,
+ IN UCHAR apidx,
+ IN BOOLEAN bQosNull,
+ IN BOOLEAN bEOSP,
+ IN UCHAR OldUP,
+ IN UCHAR PwrMgmt,
+ IN UCHAR OpMode);
+
+VOID RtmpPrepareHwNullFrame(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN BOOLEAN bQosNull,
+ IN BOOLEAN bEOSP,
+ IN UCHAR OldUP,
+ IN UCHAR OpMode,
+ IN UCHAR PwrMgmt,
+ IN BOOLEAN bWaitACK,
+ IN CHAR Index);
+
+VOID MCC_ChangeAction(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID ConcurrentP2PConnectTimeout(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+NDIS_STATUS MultiChannelThreadInit(
+ IN PRTMP_ADAPTER pAd);
+
+BOOLEAN MultiChannelThreadExit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MultiChannelTimerStop(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MultiChannelTimerStart(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID MultiChannelSwitchToRa(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MultiChannelSwitchToP2P(
+ IN PRTMP_ADAPTER pAd);
+#endif /* CONFIG_MULTI_CHANNEL */
+
+
+UCHAR dot11_2_ra_rate(UCHAR MaxSupportedRateIn500Kbps);
+UCHAR dot11_max_sup_rate(INT SupRateLen, UCHAR *SupRate, INT ExtRateLen, UCHAR *ExtRate);
+
+VOID set_entry_phy_cfg(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry);
+VOID MacTableReset(RTMP_ADAPTER *pAd);
+MAC_TABLE_ENTRY *MacTableLookup(RTMP_ADAPTER *pAd, UCHAR *pAddr);
+BOOLEAN MacTableDeleteEntry(RTMP_ADAPTER *pAd, USHORT wcid, UCHAR *pAddr);
+MAC_TABLE_ENTRY *MacTableInsertEntry(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR *pAddr,
+ IN UCHAR apidx,
+ IN UCHAR OpMode,
+ IN BOOLEAN CleanAll);
+
+
+
+VOID dumpTxWI(RTMP_ADAPTER *pAd, TXWI_STRUC *pTxWI);
+VOID dump_rxwi(RTMP_ADAPTER *pAd, RXWI_STRUC *pRxWI);
+VOID dump_txinfo(RTMP_ADAPTER *pAd, TXINFO_STRUC *pTxInfo);
+VOID dump_rxinfo(RTMP_ADAPTER *pAd, RXINFO_STRUC *pRxInfo);
+#if defined(RT65xx) || defined(MT7601)
+VOID dumpRxFCEInfo(RTMP_ADAPTER *pAd, RXFCE_INFO *pRxFceInfo);
+#endif /* defined(RT65xx) || defined(MT7601) */
+
+
+
+#ifdef FPGA_MODE
+INT set_tx_kickcnt(RTMP_ADAPTER *pAd, PSTRING arg);
+INT set_data_phy_mode(RTMP_ADAPTER *pAd, PSTRING arg);
+INT set_data_bw(RTMP_ADAPTER *pAd, PSTRING arg);
+INT set_data_mcs(RTMP_ADAPTER *pAd, PSTRING arg);
+INT set_data_gi(RTMP_ADAPTER *pAd, PSTRING arg);
+INT set_data_basize(RTMP_ADAPTER *pAd, PSTRING arg);
+INT set_fpga_mode(RTMP_ADAPTER *pAd, PSTRING arg);
+#endif /* FPGA_MODE */
+
+#ifdef WFA_VHT_PF
+INT set_force_amsdu(RTMP_ADAPTER *pAd, PSTRING arg);
+#endif /* WFA_VHT_PF */
+
+
+
+#ifdef RLT_RF
+INT set_rf(RTMP_ADAPTER *pAd, PSTRING arg);
+#endif /* RLT_RF */
+
+BOOLEAN CmdRspEventHandle(RTMP_ADAPTER *pAd);
+
+
+
+#endif /* __RTMP_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_M51.h b/cleopatre/devkit/mt7601udrv/include/rtmp_M51.h
new file mode 100644
index 0000000000..410005e2cc
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_M51.h
@@ -0,0 +1,53 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_M51.h
+
+ Abstract:
+ Miniport header file for mcu related information
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_M51_H__
+#define __RTMP_M51_H__
+
+struct _RTMP_ADAPTER;
+
+INT RtmpAsicEraseFirmware(
+ struct _RTMP_ADAPTER *pAd);
+
+NDIS_STATUS RtmpAsicLoadFirmware(
+ struct _RTMP_ADAPTER *pAd);
+
+NDIS_STATUS isMCUnotReady(
+ struct _RTMP_ADAPTER *pAd);
+
+NDIS_STATUS isMCUNeedToLoadFIrmware(
+ struct _RTMP_ADAPTER *pAd);
+
+INT RtmpAsicSendCommandToMcu(
+ struct _RTMP_ADAPTER *pAd,
+ UCHAR Command,
+ UCHAR Token,
+ UCHAR Arg0,
+ UCHAR Arg1,
+ BOOLEAN FlgIsNeedLocked);
+#endif
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_and.h b/cleopatre/devkit/mt7601udrv/include/rtmp_and.h
new file mode 100644
index 0000000000..396dd67938
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_and.h
@@ -0,0 +1,137 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_and.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_AND_H__
+#define __RTMP_AND_H__
+
+/*
+ * Power opration
+ */
+enum PWR_OP {
+ RADIO_OFF = 0x30,
+ RADIO_ON,
+ RADIO_OFF_AUTO_WAKEUP,
+ RADIO_OFF_ADVANCE,
+ RADIO_ON_ADVANCE,
+};
+
+
+/*
+ * Calibration ID
+ */
+enum CALIBRATION_ID {
+ R_CALIBRATION = 1,
+ DCOC_CALIBRATION,
+};
+
+/*
+ * Function set ID
+ */
+enum FUN_ID {
+ Q_SELECT = 1,
+ ATOMIC_TSSI_SETTING = 5,
+};
+
+/*
+ * Command response RX Ring selection
+ */
+enum RX_RING_ID {
+ RX_RING0,
+ RX_RING1,
+};
+
+/*
+ * Command type table
+ */
+enum CMD_TYPE {
+ CMD_FUN_SET_OP = 1,
+ CMD_BURST_WRITE = 8,
+ CMD_READ_MODIFY_WRITE,
+ CMD_RANDOM_READ,
+ CMD_BURST_READ,
+ CMD_RANDOM_WRITE = 12,
+ CMD_LED_MODE_OP = 16,
+ CMD_POWER_SAVING_OP = 20,
+ CMD_WOW_CONFIG,
+ CMD_WOW_QUERY,
+ CMD_WOW_FEATURE = 24,
+ CMD_CARRIER_DETECT_OP = 28,
+ CMD_RADOR_DETECT_OP,
+ CMD_SWITCH_CHANNEL_OP,
+ CMD_CALIBRATION_OP,
+ CMD_BEACON_OP,
+ CMD_ANTENNA_OP
+};
+
+/*
+ * Event type table
+ */
+enum EVENT_TYPE {
+ CMD_DONE,
+ CMD_ERROR,
+ CMD_RETRY,
+ EVENT_PWR_RSP,
+ EVENT_WOW_RSP,
+ EVENT_CARRIER_DETECT_RSP,
+ EVENT_DFS_DETECT_RSP,
+};
+
+#define ANDES_CALIBRATION_R 1
+#define ANDES_CALIBRATION_LC 3
+#define ANDES_CALIBRATION_LOFT 4
+#define ANDES_CALIBRATION_TXIQ 5
+#define ANDES_CALIBRATION_BW 6
+#define ANDES_CALIBRATION_DPD 7
+#define ANDES_CALIBRATION_RXIQ 8
+#define ANDES_CALIBRATION_TXDCOC 9
+
+INT AsicSendCommandToAndes(PRTMP_ADAPTER pAd, struct CMD_UNIT CmdUnit);
+NDIS_STATUS USBLoadFirmwareToAndes(RTMP_ADAPTER *pAd);
+NDIS_STATUS PCILoadFirmwareToAndes(RTMP_ADAPTER *pAd);
+INT AsicSendCmdToAndes(PRTMP_ADAPTER pAd, struct CMD_UNIT *CmdUnit);
+INT AndesBurstWrite(PRTMP_ADAPTER pAd, UINT32 Offset, UINT32 *Data, UINT32 Count);
+INT AndesBurstRead(PRTMP_ADAPTER pAd, UINT32 Offset, UINT32 Cnt, UINT32 *Data);
+INT AndesRandomRead(PRTMP_ADAPTER pAd, RTMP_REG_PAIR *RegPair, UINT32 Num);
+INT AndesRFRandomRead(PRTMP_ADAPTER pAd, BANK_RF_REG_PAIR *RegPair, UINT32 Num);
+INT AndesReadModifyWrite(PRTMP_ADAPTER pAd, R_M_W_REG *RegPair, UINT32 Num);
+INT AndesRFReadModifyWrite(PRTMP_ADAPTER pAd, RF_R_M_W_REG *RegPair, UINT32 Num);
+INT AndesRandomWritePair(PRTMP_ADAPTER pAd, RTMP_REG_PAIR *RegPair, UINT32 Num);
+INT AndesRFRandomWritePair(PRTMP_ADAPTER pAd, BANK_RF_REG_PAIR *RegPair, UINT32 Num);
+INT AndesRandomWrite(PRTMP_ADAPTER pAd, UINT32 Num, ...);
+INT AndesRFRandomWrite(PRTMP_ADAPTER pAd, UINT32 Num, ...);
+#ifdef MT7601
+INT AndesBBPRandomWritePair(PRTMP_ADAPTER pAd, RTMP_REG_PAIR *RegPair, UINT32 Num);
+INT AndesBBPRandomWrite(PRTMP_ADAPTER pAd, UINT32 Num, ...);
+#endif /* MT7601 */
+INT AndesFunSetOP(PRTMP_ADAPTER pAd, UINT32 FunID, UINT32 Param);
+INT AndesPwrSavingOP(PRTMP_ADAPTER pAd, UINT32 PwrOP, UINT32 PwrLevel,
+ UINT32 ListenInterval, UINT32 PreTBTTLeadTime,
+ UINT8 TIMByteOffset, UINT8 TIMBytePattern);
+INT AndesCalibrationOP(PRTMP_ADAPTER, UINT32 CalibrationID, UINT32 Param);
+BOOLEAN IsInBandCmdProcessing(PRTMP_ADAPTER pAd);
+UCHAR GetCmdRspNum(PRTMP_ADAPTER pAd);
+#endif
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_chip.h b/cleopatre/devkit/mt7601udrv/include/rtmp_chip.h
new file mode 100644
index 0000000000..26104131ba
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_chip.h
@@ -0,0 +1,1095 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_chip.h
+
+ Abstract:
+ Ralink Wireless Chip related definition & structures
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_CHIP_H__
+#define __RTMP_CHIP_H__
+
+#include "rtmp_type.h"
+
+struct _RTMP_ADAPTER;
+struct _RSSI_SAMPLE;
+
+#include "mac_ral/pbf.h"
+
+#include "eeprom.h"
+
+
+#ifdef RTMP_MAC_USB
+#include "mac_ral/rtmp_mac.h"
+#include "mac_ral/mac_usb.h"
+#endif /* RTMP_MAC_USB */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifdef RT3290
+#include "chip/rt3290.h"
+#endif /* RT3290 */
+
+#ifdef RT65xx
+#include "chip/rt6590.h"
+#endif /* RT65xx */
+
+#ifdef RT8592
+#include "chip/rt6590.h"
+#endif /* RT8592 */
+
+#include "rtmp_mcu.h"
+
+#ifdef MT7601
+#include "chip/mt7601.h"
+#endif /* MT7601 */
+
+#define IS_RT3090A(_pAd) ((((_pAd)->MACVersion & 0xffff0000) == 0x30900000))
+
+/* We will have a cost down version which mac version is 0x3090xxxx */
+#define IS_RT3090(_pAd) ((((_pAd)->MACVersion & 0xffff0000) == 0x30710000) || (IS_RT3090A(_pAd)))
+
+#define IS_RT3070(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x30700000)
+#define IS_RT3071(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x30710000)
+#define IS_RT2070(_pAd) (((_pAd)->RfIcType == RFIC_2020) || ((_pAd)->EFuseTag == 0x27))
+
+#define IS_RT2860(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x28600000)
+#define IS_RT2872(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x28720000)
+#define IS_RT2880(_pAd) (IS_RT2860(_pAd) && IS_RBUS_INF(_pAd))
+
+#define IS_RT30xx(_pAd) (((_pAd)->MACVersion & 0xfff00000) == 0x30700000||IS_RT3090A(_pAd)||IS_RT3390(_pAd))
+
+#define IS_RT3052B(_pAd) (((_pAd)->CommonCfg.CID == 0x102) && (((_pAd)->CommonCfg.CN >> 16) == 0x3033))
+#define IS_RT3052(_pAd) (((_pAd)->MACVersion == 0x28720200) && (_pAd->Antenna.field.TxPath == 2))
+#define IS_RT3050(_pAd) (((_pAd)->MACVersion == 0x28720200) && ((_pAd)->RfIcType == RFIC_3020))
+#define IS_RT3350(_pAd) (((_pAd)->MACVersion == 0x28720200) && ((_pAd)->RfIcType == RFIC_3320))
+#define IS_RT3352(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x33520000)
+#define IS_RT5350(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x53500000)
+#define IS_RT305x(_pAd) (IS_RT3050(_pAd) || IS_RT3052(_pAd) || IS_RT3350(_pAd) || IS_RT3352(_pAd) || IS_RT5350(_pAd))
+#define IS_RT3050_3052_3350(_pAd) (\
+ ((_pAd)->MACVersion == 0x28720200) && \
+ ((((_pAd)->CommonCfg.CN >> 16) == 0x3333) || (((_pAd)->CommonCfg.CN >> 16) == 0x3033)) \
+)
+
+
+/* RT3572, 3592, 3562, 3062 share the same MAC version */
+#define IS_RT3572(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x35720000)
+
+/* Check if it is RT3xxx, or Specified ID in registry for debug */
+#define IS_DEV_RT3xxx(_pAd)( \
+ (_pAd->DeviceID == NIC3090_PCIe_DEVICE_ID) || \
+ (_pAd->DeviceID == NIC3091_PCIe_DEVICE_ID) || \
+ (_pAd->DeviceID == NIC3092_PCIe_DEVICE_ID) || \
+ (_pAd->DeviceID == NIC3592_PCIe_DEVICE_ID) || \
+ ((_pAd->DeviceID == NIC3593_PCI_OR_PCIe_DEVICE_ID) && (RT3593OverPCIe(_pAd))) \
+)
+
+#define RT3593_DEVICE_ID_CHECK(__DevId) \
+ (0)
+
+#define RT3592_DEVICE_ID_CHECK(__DevId) \
+ (__DevId == NIC3592_PCIe_DEVICE_ID)
+
+#define IS_RT2883(_pAd) (0)
+
+#define IS_RT3883(_pAd) (0)
+
+#define IS_VERSION_BEFORE_F(_pAd) (((_pAd)->MACVersion&0xffff) <= 0x0211)
+/* F version is 0x0212, E version is 0x0211. 309x can save more power after F version. */
+#define IS_VERSION_AFTER_F(_pAd) ((((_pAd)->MACVersion&0xffff) >= 0x0212) || (((_pAd)->b3090ESpecialChip == TRUE)))
+
+#define IS_RT3290(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x32900000)
+#define IS_RT3290LE(_pAd) ((((_pAd)->MACVersion & 0xffffffff) >= 0x32900011))
+
+/* 3593 */
+#define IS_RT3593(_pAd) (((_pAd)->MACVersion & 0xFFFF0000) == 0x35930000)
+
+/* RT5392 */
+#define IS_RT5392(_pAd) ((_pAd->MACVersion & 0xFFFF0000) == 0x53920000) /* Include RT5392, RT5372 and RT5362 */
+
+/* RT5390 */
+#define IS_RT5390(_pAd) ((((_pAd)->MACVersion & 0xFFFF0000) == 0x53900000) || IS_RT5390H(_pAd)) /* Include RT5390, RT5370 and RT5360 */
+
+/* RT5390F */
+#define IS_RT5390F(_pAd) ((IS_RT5390(_pAd)) && (((_pAd)->MACVersion & 0x0000FFFF) >= 0x0502))
+
+/* RT5370G */
+#define IS_RT5370G(_pAd) ((IS_RT5390(_pAd)) && (((_pAd)->MACVersion & 0x0000FFFF) >= 0x0503)) /* support HW PPAD ( the hardware rx antenna diversity ) */
+
+/* RT5390R */
+#define IS_RT5390R(_pAd) ((IS_RT5390(_pAd)) && (((_pAd)->MACVersion & 0x0000FFFF) == 0x1502)) /* support HW PPAD ( the hardware rx antenna diversity ) */
+
+/* PCIe interface NIC */
+#define IS_MINI_CARD(_pAd) ((_pAd)->Antenna.field.BoardType == BOARD_TYPE_MINI_CARD)
+
+/* 5390U (5370 using PCIe interface) */
+#define IS_RT5390U(_pAd) (IS_MINI_CARD(_pAd) && ((_pAd)->MACVersion & 0xFFFF0000) == 0x53900000)
+
+/* RT5390H */
+#define IS_RT5390H(_pAd) (((_pAd->MACVersion & 0xFFFF0000) == 0x53910000) && (((_pAd)->MACVersion & 0x0000FFFF) >= 0x1500))
+
+/* RT5390BC8 (WiFi + BT) */
+
+
+/* RT5390D */
+#define IS_RT5390D(_pAd) ((IS_RT5390(_pAd)) && (((_pAd)->MACVersion & 0x0000FFFF) >= 0x0502))
+
+/* RT5392C */
+#define IS_RT5392C(_pAd) ((IS_RT5392(_pAd)) && (((_pAd)->MACVersion & 0x0000FFFF) >= 0x0222)) /* Include RT5392, RT5372 and RT5362 */
+
+#define IS_RT5592(_pAd) (((_pAd)->MACVersion & 0xFFFF0000) == 0x55920000)
+#define REV_RT5592C 0x0221
+
+#define IS_RT65XX(_pAd) ((((_pAd)->MACVersion & 0xFFFF0000) == 0x65900000) ||\
+ (((_pAd)->MACVersion & 0xfffff000) == 0x85592000) || \
+ (((_pAd)->MACVersion & 0xfffff000) == 0x65900000) || \
+ (((_pAd)->MACVersion & 0xffff0000) == 0x76500000))
+
+#define IS_RT6570(_pAd) (((((_pAd)->MACVersion & 0xffff0000) == 0x76500000) || \
+ (((_pAd)->MACVersion & 0xffff0000) == 0x65900000)) && \
+ ((_pAd)->infType == RTMP_DEV_INF_USB))
+#define IS_RT6590(_pAd) ((((_pAd)->MACVersion & 0xffff0000) == 0x65900000) || \
+ (((_pAd)->MACVersion & 0xffff0000) == 0x76500000))
+#define IS_MT7650(_pAd) (((_pAd)->chipCap.ChipID && 0xffff0000) == 0x76500000)
+
+#define IS_MT76x2(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x76620000)
+#define IS_MT7662(_pAd) (((_pAd)->chipCap.ChipID && 0xffff0000) == 0x76620000)
+
+#define IS_MT76xx(_pAd) (IS_MT76x0(_pAd) || IS_MT76x2(_pAd))
+
+#define IS_RT8592(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x85590000)
+
+#define IS_RT8592(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x85590000)
+
+#define IS_MT7601(_pAd) ((((_pAd)->MACVersion & 0xFFFF0000) == 0x76010000))
+
+/* RT3592BC8 (WiFi + BT) */
+
+#define IS_USB_INF(_pAd) ((_pAd)->infType == RTMP_DEV_INF_USB)
+#define IS_PCIE_INF(_pAd) ((_pAd)->infType == RTMP_DEV_INF_PCIE)
+#define IS_PCI_INF(_pAd) (((_pAd)->infType == RTMP_DEV_INF_PCI) || IS_PCIE_INF(_pAd))
+#define IS_PCI_ONLY_INF(_pAd) ((_pAd)->infType == RTMP_DEV_INF_PCI)
+#define IS_RBUS_INF(_pAd) ((_pAd)->infType == RTMP_DEV_INF_RBUS)
+
+#define RT_REV_LT(_pAd, _chip, _rev)\
+ IS_##_chip(_pAd) && (((_pAd)->MACVersion & 0x0000FFFF) < (_rev))
+
+#define RT_REV_GTE(_pAd, _chip, _rev)\
+ IS_##_chip(_pAd) && (((_pAd)->MACVersion & 0x0000FFFF) >= (_rev))
+
+/* Dual-band NIC (RF/BBP/MAC are in the same chip.) */
+
+#define IS_RT_NEW_DUAL_BAND_NIC(_pAd) ((FALSE))
+
+
+/* Is the NIC dual-band NIC? */
+
+#define IS_DUAL_BAND_NIC(_pAd) (((_pAd->RfIcType == RFIC_2850) || (_pAd->RfIcType == RFIC_2750) || (_pAd->RfIcType == RFIC_3052) \
+ || (_pAd->RfIcType == RFIC_3053) || (_pAd->RfIcType == RFIC_2853) || (_pAd->RfIcType == RFIC_3853) \
+ || IS_RT_NEW_DUAL_BAND_NIC(_pAd)) && !IS_RT5390(_pAd))
+
+
+/* RT3593 over PCIe bus */
+#define RT3593OverPCIe(_pAd) (IS_RT3593(_pAd) && (_pAd->CommonCfg.bPCIeBus == TRUE))
+
+/* RT3593 over PCI bus */
+#define RT3593OverPCI(_pAd) (IS_RT3593(_pAd) && (_pAd->CommonCfg.bPCIeBus == FALSE))
+
+/*RT3390,RT3370 */
+#define IS_RT3390(_pAd) (((_pAd)->MACVersion & 0xFFFF0000) == 0x33900000)
+
+/* ------------------------------------------------------ */
+/* PCI registers - base address 0x0000 */
+/* ------------------------------------------------------ */
+#define CHIP_PCI_CFG 0x0000
+#define CHIP_PCI_EECTRL 0x0004
+#define CHIP_PCI_MCUCTRL 0x0008
+
+#define OPT_14 0x114
+
+#define RETRY_LIMIT 10
+
+/* ------------------------------------------------------ */
+/* BBP & RF definition */
+/* ------------------------------------------------------ */
+#define BUSY 1
+#define IDLE 0
+
+/*------------------------------------------------------------------------- */
+/* EEPROM definition */
+/*------------------------------------------------------------------------- */
+#define EEDO 0x08
+#define EEDI 0x04
+#define EECS 0x02
+#define EESK 0x01
+#define EERL 0x80
+
+#define EEPROM_WRITE_OPCODE 0x05
+#define EEPROM_READ_OPCODE 0x06
+#define EEPROM_EWDS_OPCODE 0x10
+#define EEPROM_EWEN_OPCODE 0x13
+
+#define NUM_EEPROM_BBP_PARMS 19 /* Include NIC Config 0, 1, CR, TX ALC step, BBPs */
+#define NUM_EEPROM_TX_G_PARMS 7
+
+#define VALID_EEPROM_VERSION 1
+#define EEPROM_VERSION_OFFSET 0x02
+#define EEPROM_NIC1_OFFSET 0x34 /* The address is from NIC config 0, not BBP register ID */
+#define EEPROM_NIC2_OFFSET 0x36 /* The address is from NIC config 1, not BBP register ID */
+
+
+#define EEPROM_COUNTRY_REGION 0x38
+
+#define EEPROM_DEFINE_MAX_TXPWR 0x4e
+
+#define EEPROM_FREQ_OFFSET 0x3a
+#define EEPROM_LEDAG_CONF_OFFSET 0x3c
+#define EEPROM_LEDACT_CONF_OFFSET 0x3e
+#define EEPROM_LED_POLARITY_OFFSET 0x40
+#if defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290)
+#define EEPROM_NIC3_OFFSET 0x42
+#endif /* defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290) */
+
+#define EEPROM_LNA_OFFSET 0x44
+
+#define EEPROM_RSSI_BG_OFFSET 0x46
+#define EEPROM_RSSI_A_OFFSET 0x4a
+#define EEPROM_TXMIXER_GAIN_2_4G 0x48
+#define EEPROM_TXMIXER_GAIN_5G 0x4c
+
+#define EEPROM_TXPOWER_DELTA 0x50 /* 20MHZ AND 40 MHZ use different power. This is delta in 40MHZ. */
+
+#define EEPROM_G_TX_PWR_OFFSET 0x52
+#define EEPROM_G_TX2_PWR_OFFSET 0x60
+
+#define EEPROM_G_TSSI_BOUND1 0x6e
+#define EEPROM_G_TSSI_BOUND2 0x70
+#define EEPROM_G_TSSI_BOUND3 0x72
+#define EEPROM_G_TSSI_BOUND4 0x74
+#define EEPROM_G_TSSI_BOUND5 0x76
+
+#ifdef MT7601
+#define EEPROM_TX0_TSSI_SLOPE 0x6e
+#define EEPROM_TX0_TSSI_OFFSET_GROUP1 0x70
+#define EEPROM_TX0_TSSI_OFFSET 0x76
+#define EEPROM_G_TARGET_POWER 0xD0
+#define EEPROM_FREQ_OFFSET_COMPERSATION 0xDA
+#endif /* MT7601 */
+
+
+#define EEPROM_A_TX_PWR_OFFSET 0x78
+#define EEPROM_A_TX2_PWR_OFFSET 0xa6
+
+#define MBSSID_MODE0 0
+#define MBSSID_MODE1 1
+
+enum FREQ_CAL_INIT_MODE {
+ FREQ_CAL_INIT_MODE0,
+ FREQ_CAL_INIT_MODE1,
+ FREQ_CAL_INIT_MODE2,
+ FREQ_CAL_INIT_UNKNOW,
+};
+
+enum FREQ_CAL_MODE {
+ FREQ_CAL_MODE0,
+ FREQ_CAL_MODE1,
+ FREQ_CAL_MODE2,
+};
+
+enum RXWI_FRQ_OFFSET_FIELD {
+ RXWI_FRQ_OFFSET_FIELD0, /* SNR1 */
+ RXWI_FRQ_OFFSET_FIELD1, /* Frequency Offset */
+};
+
+
+#define EEPROM_A_TSSI_BOUND1 0xd4
+#define EEPROM_A_TSSI_BOUND2 0xd6
+#define EEPROM_A_TSSI_BOUND3 0xd8
+#define EEPROM_A_TSSI_BOUND4 0xda
+#define EEPROM_A_TSSI_BOUND5 0xdc
+
+/* ITxBF calibration values EEPROM locations 0x1a0 to 0x1ab */
+#define EEPROM_ITXBF_CAL 0x1a0
+
+#define EEPROM_TXPOWER_BYRATE 0xde /* 20MHZ power. */
+#define EEPROM_TXPOWER_BYRATE_20MHZ_2_4G 0xde /* 20MHZ 2.4G tx power. */
+#define EEPROM_TXPOWER_BYRATE_40MHZ_2_4G 0xee /* 40MHZ 2.4G tx power. */
+#define EEPROM_TXPOWER_BYRATE_20MHZ_5G 0xfa /* 20MHZ 5G tx power. */
+#define EEPROM_TXPOWER_BYRATE_40MHZ_5G 0x10a /* 40MHZ 5G tx power. */
+
+#define EEPROM_BBP_BASE_OFFSET 0xf0 /* The address is from NIC config 0, not BBP register ID */
+
+/* */
+/* Bit mask for the Tx ALC and the Tx fine power control */
+/* */
+#define GET_TX_ALC_BIT_MASK 0x1F /* Valid: 0~31, and in 0.5dB step */
+#define GET_TX_FINE_POWER_CTRL_BIT_MASK 0xE0 /* Valid: 0~4, and in 0.1dB step */
+#define NUMBER_OF_BITS_FOR_TX_ALC 5 /* The length, in bit, of the Tx ALC field */
+
+
+/* TSSI gain and TSSI attenuation */
+
+#define EEPROM_TSSI_GAIN_AND_ATTENUATION 0x76
+
+/*#define EEPROM_Japan_TX_PWR_OFFSET 0x90 // 802.11j */
+/*#define EEPROM_Japan_TX2_PWR_OFFSET 0xbe */
+/*#define EEPROM_TSSI_REF_OFFSET 0x54 */
+/*#define EEPROM_TSSI_DELTA_OFFSET 0x24 */
+/*#define EEPROM_CCK_TX_PWR_OFFSET 0x62 */
+/*#define EEPROM_CALIBRATE_OFFSET 0x7c */
+
+#define EEPROM_NIC_CFG1_OFFSET 0
+#define EEPROM_NIC_CFG2_OFFSET 1
+#define EEPROM_NIC_CFG3_OFFSET 2
+#define EEPROM_COUNTRY_REG_OFFSET 3
+#define EEPROM_BBP_ARRAY_OFFSET 4
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
+/* */
+/* The TSSI over OFDM 54Mbps */
+/* */
+#define EEPROM_TSSI_OVER_OFDM_54 0x6E
+
+/* */
+/* The TSSI value/step (0.5 dB/unit) */
+/* */
+#define EEPROM_TSSI_STEP_OVER_2DOT4G 0x77
+#define EEPROM_TSSI_STEP_OVER_5DOT5G 0xDD
+#define TSSI_READ_SAMPLE_NUM 3
+
+/* */
+/* Per-channel Tx power offset (for the extended TSSI mode) */
+/* */
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_1 0x6F
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_3 0x70
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_5 0x71
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_7 0x72
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_9 0x73
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_11 0x74
+#define EEPROM_TX_POWER_OFFSET_OVER_CH_13 0x75
+
+/* */
+/* Tx power configuration (bit3:0 for Tx0 power setting and bit7:4 for Tx1 power setting) */
+/* */
+#define EEPROM_CCK_MCS0_MCS1 0xDE
+#define EEPROM_CCK_MCS2_MCS3 0xDF
+#define EEPROM_OFDM_MCS0_MCS1 0xE0
+#define EEPROM_OFDM_MCS2_MCS3 0xE1
+#define EEPROM_OFDM_MCS4_MCS5 0xE2
+#define EEPROM_OFDM_MCS6_MCS7 0xE3
+#define EEPROM_HT_MCS0_MCS1 0xE4
+#define EEPROM_HT_MCS2_MCS3 0xE5
+#define EEPROM_HT_MCS4_MCS5 0xE6
+#define EEPROM_HT_MCS6_MCS7 0xE7
+#define EEPROM_HT_MCS8_MCS9 0xE8
+#define EEPROM_HT_MCS10_MCS11 0xE9
+#define EEPROM_HT_MCS12_MCS13 0xEA
+#define EEPROM_HT_MCS14_MCS15 0xEB
+#define EEPROM_HT_USING_STBC_MCS0_MCS1 0xEC
+#define EEPROM_HT_USING_STBC_MCS2_MCS3 0xED
+#define EEPROM_HT_USING_STBC_MCS4_MCS5 0xEE
+#define EEPROM_HT_USING_STBC_MCS6_MCS7 0xEF
+
+/* */
+/* Bit mask for the Tx ALC and the Tx fine power control */
+/* */
+
+#define DEFAULT_BBP_TX_FINE_POWER_CTRL 0
+
+#endif /* RTMP_INTERNAL_TX_ALC || RTMP_TEMPERATURE_COMPENSATION */
+
+
+#ifdef RT_BIG_ENDIAN
+typedef union _EEPROM_ANTENNA_STRUC {
+ struct {
+ USHORT RssiIndicationMode:1; /* RSSI indication mode */
+ USHORT Rsv:1;
+ USHORT BoardType:2; /* 0: mini card; 1: USB pen */
+ USHORT RfIcType:4; /* see E2PROM document */
+ USHORT TxPath:4; /* 1: 1T, 2: 2T, 3: 3T */
+ USHORT RxPath:4; /* 1: 1R, 2: 2R, 3: 3R */
+ } field;
+ USHORT word;
+} EEPROM_ANTENNA_STRUC, *PEEPROM_ANTENNA_STRUC;
+#else
+typedef union _EEPROM_ANTENNA_STRUC {
+ struct {
+ USHORT RxPath:4; /* 1: 1R, 2: 2R, 3: 3R */
+ USHORT TxPath:4; /* 1: 1T, 2: 2T, 3: 3T */
+ USHORT RfIcType:4; /* see E2PROM document */
+ USHORT BoardType:2; /* 0: mini card; 1: USB pen */
+ USHORT Rsv:1;
+ USHORT RssiIndicationMode:1; /* RSSI indication mode */
+ } field;
+ USHORT word;
+} EEPROM_ANTENNA_STRUC, *PEEPROM_ANTENNA_STRUC;
+#endif
+
+
+/*
+ * EEPROM operation related marcos
+ */
+#define RT28xx_EEPROM_READ16(_pAd, _offset, _value) \
+ (_pAd)->chipOps.eeread((RTMP_ADAPTER *)(_pAd), (USHORT)(_offset), (PUSHORT)&(_value))
+
+#define RT28xx_EEPROM_WRITE16(_pAd, _offset, _value) \
+ (_pAd)->chipOps.eewrite((RTMP_ADAPTER *)(_pAd), (USHORT)(_offset), (USHORT)(_value))
+
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
+/* The Tx power tuning entry */
+typedef struct _TX_POWER_TUNING_ENTRY_STRUCT {
+ CHAR RF_TX_ALC; /* 3390: RF R12[4:0]: Tx0 ALC, 5390: RF R49[5:0]: Tx0 ALC */
+ CHAR MAC_PowerDelta; /* Tx power control over MAC 0x1314~0x1324 */
+} TX_POWER_TUNING_ENTRY_STRUCT, *PTX_POWER_TUNING_ENTRY_STRUCT;
+#endif /* defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION) */
+
+/*
+ 2860: 28xx
+ 2870: 28xx
+
+ 30xx:
+ 3090
+ 3070
+ 2070 3070
+
+ 33xx: 30xx
+ 3390 3090
+ 3370 3070
+
+ 35xx: 30xx
+ 3572, 2870, 28xx
+ 3062, 2860, 28xx
+ 3562, 2860, 28xx
+
+ 3593, 28xx, 30xx, 35xx
+
+ < Note: 3050, 3052, 3350 can not be compiled simultaneously. >
+ 305x:
+ 3052
+ 3050
+ 3350, 3050
+
+ 3352: 305x
+
+ 2880: 28xx
+ 2883:
+ 3883:
+*/
+
+struct _RTMP_CHIP_CAP_ {
+ UINT32 ChipID;
+ /* register */
+ REG_PAIR *pRFRegTable;
+ REG_PAIR *pBBPRegTable;
+ UCHAR bbpRegTbSize;
+
+ UINT32 MaxNumOfRfId;
+ UINT32 MaxNumOfBbpId;
+
+#define RF_REG_WT_METHOD_NONE 0
+#define RF_REG_WT_METHOD_STEP_ON 1
+ UCHAR RfReg17WtMethod;
+
+ /* beacon */
+ BOOLEAN FlgIsSupSpecBcnBuf; /* SPECIFIC_BCN_BUF_SUPPORT */
+ UINT8 BcnMaxNum; /* software use */
+ UINT8 BcnMaxHwNum; /* hardware limitation */
+ UINT8 WcidHwRsvNum; /* hardware available WCID number */
+ UINT16 BcnMaxHwSize; /* hardware maximum beacon size */
+ UINT16 BcnBase[HW_BEACON_MAX_NUM]; /* hardware beacon base address */
+
+ /* function */
+ /* use UINT8, not bit-or to speed up driver */
+ BOOLEAN FlgIsHwWapiSup;
+
+ /* VCO calibration mode */
+ UINT8 VcoPeriod; /* default 10s */
+#define VCO_CAL_DISABLE 0 /* not support */
+#define VCO_CAL_MODE_1 1 /* toggle RF7[0] */
+#define VCO_CAL_MODE_2 2 /* toggle RF3[7] */
+#define VCO_CAL_MODE_3 3 /* toggle RF4[7] */
+ UINT8 FlgIsVcoReCalMode;
+
+ BOOLEAN FlgIsHwAntennaDiversitySup;
+ BOOLEAN FlgSwBasedPPAD;
+#ifdef STREAM_MODE_SUPPORT
+ BOOLEAN FlgHwStreamMode;
+#endif /* STREAM_MODE_SUPPORT */
+#ifdef TXBF_SUPPORT
+ BOOLEAN FlgHwTxBfCap;
+#endif /* TXBF_SUPPORT */
+#ifdef FIFO_EXT_SUPPORT
+ BOOLEAN FlgHwFifoExtCap;
+#endif /* FIFO_EXT_SUPPORT */
+
+
+ enum ASIC_CAP asic_caps;
+ enum PHY_CAP phy_caps;
+
+#ifdef TXRX_SW_ANTDIV_SUPPORT
+ BOOLEAN bTxRxSwAntDiv;
+#endif /* TXRX_SW_ANTDIV_SUPPORT */
+
+ /* ---------------------------- signal ---------------------------------- */
+#define SNR_FORMULA1 0 /* ((0xeb - pAd->StaCfg.LastSNR0) * 3) / 16; */
+#define SNR_FORMULA2 1 /* (pAd->StaCfg.LastSNR0 * 3 + 8) >> 4; */
+#define SNR_FORMULA3 2 /* (pAd->StaCfg.LastSNR0) * 3) / 16; */
+ UINT8 SnrFormula;
+
+ UINT8 MaxNss; /* maximum Nss, 3 for 3883 or 3593 */
+
+ BOOLEAN bTempCompTxALC;
+
+ BOOLEAN bLimitPowerRange; /* TSSI compensation range limit */
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
+ UINT8 TxAlcTxPowerUpperBound_2G;
+ const TX_POWER_TUNING_ENTRY_STRUCT *TxPowerTuningTable_2G;
+#ifdef A_BAND_SUPPORT
+ UINT8 TxAlcTxPowerUpperBound_5G;
+ const TX_POWER_TUNING_ENTRY_STRUCT *TxPowerTuningTable_5G;
+#endif /* A_BAND_SUPPORT */
+
+#ifdef MT7601
+ MT7601_TX_ALC_DATA TxALCData;
+#endif /* MT7601 */
+#endif /* defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION) */
+
+#if defined(RTMP_INTERNAL_TX_ALC) || defined(SINGLE_SKU_V2)
+ INT16 PAModeCCK[4];
+ INT16 PAModeOFDM[8];
+ INT16 PAModeHT[16];
+#endif /* defined(RTMP_INTERNAL_TX_ALC) || defined(SINGLE_SKU_V2) */
+
+#ifdef MT7601
+ CHAR TemperatureRef25C;
+ UCHAR TemperatureMode;
+ BOOLEAN bPllLockProtect;
+ CHAR CurrentTemperBbpR49;
+ INT32 TemperatureDPD; // temperature when do DPD calibration
+ INT32 CurrentTemperature; // (BBP_R49 - Ref25C) * offset
+#endif /* MT7601 */
+ /* ---------------------------- packet ---------------------------------- */
+ UINT8 TXWISize;
+ UINT8 RXWISize;
+
+ /* ---------------------------- others ---------------------------------- */
+#ifdef RTMP_EFUSE_SUPPORT
+ UINT16 EFUSE_USAGE_MAP_START;
+ UINT16 EFUSE_USAGE_MAP_END;
+ UINT8 EFUSE_USAGE_MAP_SIZE;
+ UCHAR *EFUSE_DEFAULT_BIN;
+ UINT16 EFUSE_DEFAULT_BIN_SIZE;
+#endif /* RTMP_EFUSE_SUPPORT */
+
+#ifdef RTMP_FLASH_SUPPORT
+ UCHAR *eebuf;
+#endif /* RTMP_FLASH_SUPPORT */
+
+#ifdef CARRIER_DETECTION_SUPPORT
+ UCHAR carrier_func;
+#endif /* CARRIER_DETECTION_SUPPORT */
+#ifdef DFS_SUPPORT
+ UINT8 DfsEngineNum;
+#endif /* DFS_SUPPORT */
+
+ /*
+ Define the burst size of WPDMA of PCI
+ 0 : 4 DWORD (16bytes)
+ 1 : 8 DWORD (32 bytes)
+ 2 : 16 DWORD (64 bytes)
+ 3 : 32 DWORD (128 bytes)
+ */
+ UINT8 WPDMABurstSIZE;
+
+ /*
+ * 0: MBSSID_MODE0
+ * (The multiple MAC_ADDR/BSSID are distinguished by [bit2:bit0] of byte5)
+ * 1: MBSSID_MODE1
+ * (The multiple MAC_ADDR/BSSID are distinguished by [bit4:bit2] of byte0)
+ */
+ UINT8 MBSSIDMode;
+
+
+
+#ifdef RT5592EP_SUPPORT
+ UINT32 Priv; /* Flag for RT5592 EP */
+#endif /* RT5592EP_SUPPORT */
+
+#ifdef CONFIG_ANDES_SUPPORT
+ UINT32 WlanMemmapOffset;
+ UINT32 InbandPacketMaxLen;
+ UINT8 CmdRspRxRing;
+ BOOLEAN IsComboChip;
+#endif
+
+#ifdef SINGLE_SKU_V2
+ CHAR Apwrdelta;
+ CHAR Gpwrdelta;
+#endif /* SINGLE_SKU_V2 */
+
+#ifdef RTMP_USB_SUPPORT
+ UINT8 DataBulkInAddr;
+ UINT8 CommandRspBulkInAddr;
+ UINT8 WMM0ACBulkOutAddr[4];
+ UINT8 WMM1ACBulkOutAddr;
+ UINT8 CommandBulkOutAddr;
+#endif
+
+ enum MCU_TYPE MCUType;
+ UCHAR *FWImageName;
+};
+
+typedef VOID (*CHIP_SPEC_FUNC)(VOID *pAd, VOID *pData, ULONG Data);
+
+/* The chip specific function ID */
+typedef enum _CHIP_SPEC_ID
+{
+ CHIP_SPEC_RESV_FUNC
+} CHIP_SPEC_ID;
+
+#define CHIP_SPEC_ID_NUM CHIP_SPEC_RESV_FUNC
+
+
+struct _RTMP_CHIP_OP_ {
+ /* Calibration access related callback functions */
+ int (*eeinit)(struct _RTMP_ADAPTER *pAd);
+ int (*eeread)(struct _RTMP_ADAPTER *pAd, USHORT offset, PUSHORT pValue);
+ int (*eewrite)(struct _RTMP_ADAPTER *pAd, USHORT offset, USHORT value);
+
+ /* MCU related callback functions */
+ int (*loadFirmware)(struct _RTMP_ADAPTER *pAd);
+ int (*eraseFirmware)(struct _RTMP_ADAPTER *pAd);
+ int (*sendCommandToMcu)(struct _RTMP_ADAPTER *pAd, UCHAR cmd, UCHAR token, UCHAR arg0, UCHAR arg1, BOOLEAN FlgIsNeedLocked); /* int (*sendCommandToMcu)(RTMP_ADAPTER *pAd, UCHAR cmd, UCHAR token, UCHAR arg0, UCHAR arg1); */
+#ifdef CONFIG_ANDES_SUPPORT
+ int (*sendCommandToAndesMcu)(struct _RTMP_ADAPTER *pAd, UCHAR QueIdx, UCHAR cmd, UCHAR *pData, USHORT DataLen, BOOLEAN FlgIsNeedLocked);
+#endif /* CONFIG_ANDES_SUPPORT */
+
+ void (*AsicRfInit)(struct _RTMP_ADAPTER *pAd);
+ void (*AsicBbpInit)(struct _RTMP_ADAPTER *pAd);
+ void (*AsicMacInit)(struct _RTMP_ADAPTER *pAd);
+
+ void (*AsicRfTurnOn)(struct _RTMP_ADAPTER *pAd);
+ void (*AsicRfTurnOff)(struct _RTMP_ADAPTER *pAd);
+ void (*AsicReverseRfFromSleepMode)(struct _RTMP_ADAPTER *pAd, BOOLEAN FlgIsInitState);
+ void (*AsicHaltAction)(struct _RTMP_ADAPTER *pAd);
+
+ /* Power save */
+ VOID (*EnableAPMIMOPS)(IN struct _RTMP_ADAPTER *pAd, IN BOOLEAN ReduceCorePower);
+ VOID (*DisableAPMIMOPS)(IN struct _RTMP_ADAPTER *pAd);
+
+ /* Chip tuning */
+ VOID (*RxSensitivityTuning)(IN struct _RTMP_ADAPTER *pAd);
+
+ /* MAC */
+ VOID (*BeaconUpdate)(struct _RTMP_ADAPTER *pAd, USHORT Offset, UINT32 Value, UINT8 Unit);
+
+ /* BBP adjust */
+ VOID (*ChipBBPAdjust)(IN struct _RTMP_ADAPTER *pAd);
+
+ /* AGC */
+ VOID (*ChipAGCInit)(struct _RTMP_ADAPTER *pAd, UCHAR bw);
+ UCHAR (*ChipAGCAdjust)(struct _RTMP_ADAPTER *pAd, CHAR Rssi, UCHAR OrigR66Value);
+
+ /* Channel */
+ VOID (*ChipSwitchChannel)(struct _RTMP_ADAPTER *pAd, UCHAR ch, BOOLEAN bScan);
+
+ /* IQ Calibration */
+ VOID (*ChipIQCalibration)(struct _RTMP_ADAPTER *pAd, UCHAR Channel);
+
+ /* TX ALC */
+ UINT32 (*TSSIRatio)(INT32 delta_power);
+ VOID (*InitDesiredTSSITable)(IN struct _RTMP_ADAPTER *pAd);
+ int (*ATETssiCalibration)(struct _RTMP_ADAPTER *pAd, PSTRING arg);
+ int (*ATETssiCalibrationExtend)(struct _RTMP_ADAPTER *pAd, PSTRING arg);
+ int (*ATEReadExternalTSSI)(struct _RTMP_ADAPTER *pAd, PSTRING arg);
+
+ VOID (*AsicTxAlcGetAutoAgcOffset)(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN PCHAR pDeltaPwr,
+ IN PCHAR pTotalDeltaPwr,
+ IN PCHAR pAgcCompensate,
+ IN PCHAR pDeltaPowerByBbpR1);
+
+
+
+ VOID (*AsicGetTxPowerOffset)(struct _RTMP_ADAPTER *pAd, ULONG *TxPwr);
+ VOID (*AsicExtraPowerOverMAC)(struct _RTMP_ADAPTER *pAd);
+
+ /* Antenna */
+ VOID (*AsicAntennaDefaultReset)(struct _RTMP_ADAPTER *pAd, union _EEPROM_ANTENNA_STRUC *pAntenna);
+ VOID (*SetRxAnt)(struct _RTMP_ADAPTER *pAd, UCHAR Ant);
+
+ /* EEPROM */
+ VOID (*NICInitAsicFromEEPROM)(IN struct _RTMP_ADAPTER *pAd);
+
+ /* Temperature Compensation */
+ VOID (*InitTemperCompensation)(IN struct _RTMP_ADAPTER *pAd);
+ VOID (*TemperCompensation)(IN struct _RTMP_ADAPTER *pAd);
+
+ /* high power tuning */
+ VOID (*HighPowerTuning)(struct _RTMP_ADAPTER *pAd, struct _RSSI_SAMPLE *pRssi);
+
+ /* Others */
+ VOID (*NetDevNickNameInit)(IN struct _RTMP_ADAPTER *pAd);
+
+ /* The chip specific function list */
+ CHIP_SPEC_FUNC ChipSpecFunc[CHIP_SPEC_ID_NUM];
+
+ VOID (*AsicResetBbpAgent)(IN struct _RTMP_ADAPTER *pAd);
+
+#ifdef CARRIER_DETECTION_SUPPORT
+ VOID (*ToneRadarProgram)(struct _RTMP_ADAPTER *pAd, ULONG threshold);
+#endif /* CARRIER_DETECTION_SUPPORT */
+ VOID (*CckMrcStatusCtrl)(struct _RTMP_ADAPTER *pAd);
+ VOID (*RadarGLRTCompensate)(struct _RTMP_ADAPTER *pAd);
+
+ VOID (*Calibration)(struct _RTMP_ADAPTER *pAd, UINT32 CalibrationID, UINT32 Parameter);
+
+ INT (*BurstWrite)(struct _RTMP_ADAPTER *pAd, UINT32 Offset, UINT32 *Data, UINT32 Cnt);
+
+ INT (*BurstRead)(struct _RTMP_ADAPTER *pAd, UINT32 Offset, UINT32 Cnt, UINT32 *Data);
+
+ INT (*RandomRead)(struct _RTMP_ADAPTER *pAd, RTMP_REG_PAIR *RegPair, UINT32 Num);
+
+ INT (*RFRandomRead)(struct _RTMP_ADAPTER *pAd, BANK_RF_REG_PAIR *RegPair, UINT32 Num);
+
+ INT (*ReadModifyWrite)(struct _RTMP_ADAPTER *pAd, R_M_W_REG *RegPair, UINT32 Num);
+
+ INT (*RFReadModifyWrite)(struct _RTMP_ADAPTER *pAd, RF_R_M_W_REG *RegPair, UINT32 Num);
+
+ INT (*RandomWrite)(struct _RTMP_ADAPTER *pAd, RTMP_REG_PAIR *RegPair, UINT32 Num);
+
+ INT (*RFRandomWrite)(struct _RTMP_ADAPTER *pAd, BANK_RF_REG_PAIR *RegPair, UINT32 Num);
+
+ VOID (*DisableTxRx)(struct _RTMP_ADAPTER *pAd, UCHAR Level);
+
+ VOID (*AsicRadioOn)(struct _RTMP_ADAPTER *pAd, UCHAR Stage);
+
+ VOID (*AsicRadioOff)(struct _RTMP_ADAPTER *pAd, UCHAR Stage);
+
+ INT (*PwrSavingOP)(struct _RTMP_ADAPTER *pAd, UINT32 PwrOP, UINT32 PwrLevel,
+ UINT32 ListenInterval, UINT32 PreTBTTLeadTime,
+ UINT8 TIMByteOffset, UINT8 TIMBytePattern);
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+ VOID (*AsicMeasureFalseCCA)(IN struct _RTMP_ADAPTER *pAd);
+
+ VOID (*AsicMitigateMicrowave)(IN struct _RTMP_ADAPTER *pAd);
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+#if (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT)
+ VOID (*AsicWOWEnable)(
+ IN struct _RTMP_ADAPTER *pAd);
+ VOID (*AsicWOWDisable)(
+ IN struct _RTMP_ADAPTER *pAd);
+#endif /* (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT) */
+
+};
+
+#define RTMP_CHIP_ENABLE_AP_MIMOPS(__pAd, __ReduceCorePower) \
+ if (__pAd->chipOps.EnableAPMIMOPS != NULL) \
+ __pAd->chipOps.EnableAPMIMOPS(__pAd, __ReduceCorePower)
+
+#define RTMP_CHIP_DISABLE_AP_MIMOPS(__pAd) \
+ if (__pAd->chipOps.DisableAPMIMOPS != NULL) \
+ __pAd->chipOps.DisableAPMIMOPS(__pAd)
+
+#define PWR_SAVING_OP(__pAd, __PwrOP, __PwrLevel, __ListenInterval, \
+ __PreTBTTLeadTime, __TIMByteOffset, __TIMBytePattern) \
+do { \
+ if (__pAd->chipOps.PwrSavingOP != NULL) \
+ __pAd->chipOps.PwrSavingOP(__pAd, __PwrOP, __PwrLevel, \
+ __ListenInterval,__PreTBTTLeadTime, \
+ __TIMByteOffset, __TIMBytePattern); \
+} while (0)
+
+#define RTMP_CHIP_RX_SENSITIVITY_TUNING(__pAd) \
+ if (__pAd->chipOps.RxSensitivityTuning != NULL) \
+ __pAd->chipOps.RxSensitivityTuning(__pAd)
+
+#define RTMP_CHIP_ASIC_AGC_ADJUST(__pAd, __Rssi, __R66) \
+ if (__pAd->chipOps.ChipAGCAdjust != NULL) \
+ __R66 = __pAd->chipOps.ChipAGCAdjust(__pAd, __Rssi, __R66)
+
+#define RTMP_CHIP_ASIC_TSSI_TABLE_INIT(__pAd) \
+ if (__pAd->chipOps.InitDesiredTSSITable != NULL) \
+ __pAd->chipOps.InitDesiredTSSITable(__pAd)
+
+#define RTMP_CHIP_ATE_TSSI_CALIBRATION(__pAd, __pData) \
+ if (__pAd->chipOps.ATETssiCalibration != NULL) \
+ __pAd->chipOps.ATETssiCalibration(__pAd, __pData)
+
+#define RTMP_CHIP_ATE_TSSI_CALIBRATION_EXTEND(__pAd, __pData) \
+ if (__pAd->chipOps.ATETssiCalibrationExtend != NULL) \
+ __pAd->chipOps.ATETssiCalibrationExtend(__pAd, __pData)
+
+#define RTMP_CHIP_ATE_READ_EXTERNAL_TSSI(__pAd, __pData) \
+ if (__pAd->chipOps.ATEReadExternalTSSI != NULL) \
+ __pAd->chipOps.ATEReadExternalTSSI(__pAd, __pData)
+
+#define RTMP_CHIP_ASIC_TX_POWER_OFFSET_GET(__pAd, __pCfgOfTxPwrCtrlOverMAC) \
+ if (__pAd->chipOps.AsicGetTxPowerOffset != NULL) \
+ __pAd->chipOps.AsicGetTxPowerOffset(__pAd, __pCfgOfTxPwrCtrlOverMAC)
+
+#define RTMP_CHIP_ASIC_AUTO_AGC_OFFSET_GET( \
+ __pAd, __pDeltaPwr, __pTotalDeltaPwr, __pAgcCompensate, __pDeltaPowerByBbpR1) \
+ if (__pAd->chipOps.AsicTxAlcGetAutoAgcOffset != NULL) \
+ __pAd->chipOps.AsicTxAlcGetAutoAgcOffset( \
+ __pAd, __pDeltaPwr, __pTotalDeltaPwr, __pAgcCompensate, __pDeltaPowerByBbpR1)
+
+#define RTMP_CHIP_ASIC_EXTRA_POWER_OVER_MAC(__pAd) \
+ if (__pAd->chipOps.AsicExtraPowerOverMAC != NULL) \
+ __pAd->chipOps.AsicExtraPowerOverMAC(__pAd)
+
+#define RTMP_CHIP_ASIC_GET_TSSI_RATIO(__pAd, __DeltaPwr) \
+ __pAd->chipOps.TSSIRatio(__DeltaPwr)
+
+#define RTMP_CHIP_ASIC_FREQ_CAL_STOP(__pAd) \
+ if (__pAd->chipOps.AsicFreqCalStop != NULL) \
+ __pAd->chipOps.AsicFreqCalStop(__pAd)
+
+#define RTMP_CHIP_IQ_CAL(__pAd, __pChannel) \
+ if (__pAd->chipOps.ChipIQCalibration != NULL) \
+ __pAd->chipOps.ChipIQCalibration(__pAd, __pChannel)
+
+#define RTMP_CHIP_HIGH_POWER_TUNING(__pAd, __pRssi) \
+ if (__pAd->chipOps.HighPowerTuning != NULL) \
+ __pAd->chipOps.HighPowerTuning(__pAd, __pRssi)
+
+#define RTMP_CHIP_ANTENNA_INFO_DEFAULT_RESET(__pAd, __pAntenna) \
+ if (__pAd->chipOps.AsicAntennaDefaultReset != NULL) \
+ __pAd->chipOps.AsicAntennaDefaultReset(__pAd, __pAntenna)
+
+#define RTMP_NET_DEV_NICKNAME_INIT(__pAd) \
+ if (__pAd->chipOps.NetDevNickNameInit != NULL) \
+ __pAd->chipOps.NetDevNickNameInit(__pAd)
+
+#define RTMP_EEPROM_ASIC_INIT(__pAd) \
+ if (__pAd->chipOps.NICInitAsicFromEEPROM != NULL) \
+ __pAd->chipOps.NICInitAsicFromEEPROM(__pAd)
+
+#define RTMP_CHIP_ASIC_INIT_TEMPERATURE_COMPENSATION(__pAd) \
+ if (__pAd->chipOps.InitTemperCompensation != NULL) \
+ __pAd->chipOps.InitTemperCompensation(__pAd)
+
+#define RTMP_CHIP_ASIC_TEMPERATURE_COMPENSATION(__pAd) \
+ if (__pAd->chipOps.TemperCompensation != NULL) \
+ __pAd->chipOps.TemperCompensation(__pAd)
+
+#define RTMP_CHIP_SPECIFIC(__pAd, __FuncId, __pData, __Data) \
+ if ((__FuncId >= 0) && (__FuncId < CHIP_SPEC_RESV_FUNC)) \
+ { \
+ if (__pAd->chipOps.ChipSpecFunc[__FuncId] != NULL) \
+ __pAd->chipOps.ChipSpecFunc[__FuncId](__pAd, __pData, __Data); \
+ }
+
+#define RTMP_CHIP_ASIC_RESET_BBP_AGENT(__pAd) \
+ if (__pAd->chipOps.AsicResetBbpAgent != NULL) \
+ __pAd->chipOps.AsicResetBbpAgent(__pAd)
+
+#define RTMP_CHIP_UPDATE_BEACON(__pAd, Offset, Value, Unit) \
+ if (__pAd->chipOps.BeaconUpdate != NULL) \
+ __pAd->chipOps.BeaconUpdate(__pAd, Offset, Value, Unit)
+
+#ifdef CARRIER_DETECTION_SUPPORT
+#define RTMP_CHIP_CARRIER_PROGRAM(__pAd, threshold) \
+ if(__pAd->chipOps.ToneRadarProgram != NULL) \
+ __pAd->chipOps.ToneRadarProgram(__pAd, threshold)
+#endif /* CARRIER_DETECTION_SUPPORT */
+
+#define RTMP_CHIP_CCK_MRC_STATUS_CTRL(__pAd) \
+ if(__pAd->chipOps.CckMrcStatusCtrl != NULL) \
+ __pAd->chipOps.CckMrcStatusCtrl(__pAd)
+
+#define RTMP_CHIP_RADAR_GLRT_COMPENSATE(__pAd) \
+ if(__pAd->chipOps.RadarGLRTCompensate != NULL) \
+ __pAd->chipOps.RadarGLRTCompensate(__pAd)
+
+
+#define RTMP_CHIP_CALIBRATION(__pAd, __CalibrationID, __parameter) \
+do { \
+ if(__pAd->chipOps.Calibration != NULL) \
+ __pAd->chipOps.Calibration(__pAd, __CalibrationID, __parameter); \
+} while (0)
+
+#define BURST_WRITE(_pAd, _Offset, _pData, _Cnt) \
+do { \
+ if (_pAd->chipOps.BurstWrite != NULL) \
+ _pAd->chipOps.BurstWrite(_pAd, _Offset, _pData, _Cnt);\
+} while (0)
+
+#define BURST_READ(_pAd, _Offset, _Cnt, _pData) \
+do { \
+ if (_pAd->chipOps.BurstRead != NULL) \
+ _pAd->chipOps.BurstRead(_pAd, _Offset, _Cnt, _pData); \
+} while (0)
+
+#define RANDOM_READ(_pAd, _RegPair, _Num) \
+do { \
+ if (_pAd->chipOps.RandomRead != NULL) \
+ _pAd->chipOps.RandomRead(_pAd, _RegPair, _Num); \
+} while (0)
+
+#define RF_RANDOM_READ(_pAd, _RegPair, _Num) \
+do { \
+ if (_pAd->chipOps.RFRandomRead != NULL) \
+ _pAd->chipOps.RFRandomRead(_pAd, _RegPair, _Num); \
+} while (0)
+
+#define READ_MODIFY_WRITE(_pAd, _RegPair, _Num) \
+do { \
+ if (_pAd->chipOps.ReadModifyWrite != NULL) \
+ _pAd->chipOps.ReadModifyWrite(_pAd, _RegPair, _Num); \
+} while (0)
+
+#define RF_READ_MODIFY_WRITE(_pAd, _RegPair, _Num) \
+do { \
+ if (_pAd->chipOps.RFReadModifyWrite != NULL) \
+ _pAd->chipOps.RFReadModifyWrite(_pAd, _RegPair, _Num); \
+} while (0)
+
+#define RANDOM_WRITE(_pAd, _RegPair, _Num) \
+do { \
+ if (_pAd->chipOps.RandomWrite != NULL) \
+ _pAd->chipOps.RandomWrite(_pAd, _RegPair, _Num); \
+} while (0)
+
+#define RF_RANDOM_WRITE(_pAd, _RegPair, _Num) \
+do { \
+ if (_pAd->chipOps.RFRandomWrite != NULL) \
+ _pAd->chipOps.RFRandomWrite(_pAd, _RegPair, _Num); \
+} while (0)
+
+#define DISABLE_TX_RX(_pAd, _Level) \
+do { \
+ if (_pAd->chipOps.DisableTxRx != NULL) \
+ _pAd->chipOps.DisableTxRx(_pAd, _Level); \
+} while (0)
+
+#define ASIC_RADIO_ON(_pAd, _Stage) \
+do { \
+ if (_pAd->chipOps.AsicRadioOn != NULL) \
+ _pAd->chipOps.AsicRadioOn(_pAd, _Stage); \
+} while (0)
+
+#define ASIC_RADIO_OFF(_pAd, _Stage) \
+do { \
+ if (_pAd->chipOps.AsicRadioOff != NULL) \
+ _pAd->chipOps.AsicRadioOff(_pAd, _Stage); \
+} while (0)
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+#define ASIC_MEASURE_FALSE_CCA(_pAd) \
+do { \
+ if (_pAd->chipOps.AsicMeasureFalseCCA != NULL) \
+ _pAd->chipOps.AsicMeasureFalseCCA(_pAd); \
+} while (0)
+
+#define ASIC_MITIGATE_MICROWAVE(_pAd) \
+do { \
+ if (_pAd->chipOps.AsicMitigateMicrowave != NULL) \
+ _pAd->chipOps.AsicMitigateMicrowave(_pAd); \
+} while (0)
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+#if (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT)
+#define ASIC_WOW_ENABLE(_pAd) \
+do { \
+ if (_pAd->chipOps.AsicWOWEnable != NULL) \
+ _pAd->chipOps.AsicWOWEnable(_pAd); \
+} while (0)
+
+#define ASIC_WOW_DISABLE(_pAd) \
+do { \
+ if (_pAd->chipOps.AsicWOWDisable != NULL) \
+ _pAd->chipOps.AsicWOWDisable(_pAd); \
+} while(0)
+#endif /* (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT) */
+
+/* function prototype */
+VOID RtmpChipOpsHook(VOID *pCB);
+
+VOID RtmpChipBcnInit(struct _RTMP_ADAPTER *pAd);
+VOID RtmpChipBcnSpecInit(struct _RTMP_ADAPTER *pAd);
+#ifdef RLT_MAC
+VOID rlt_bcn_buf_init(struct _RTMP_ADAPTER *pAd);
+#endif /* RLT_MAC */
+
+VOID RtmpChipWriteHighMemory(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN USHORT Offset,
+ IN UINT32 Value,
+ IN UINT8 Unit);
+
+VOID RtmpChipWriteMemory(
+ IN struct _RTMP_ADAPTER *pAd,
+ IN USHORT Offset,
+ IN UINT32 Value,
+ IN UINT8 Unit);
+
+VOID RTMPReadChannelPwr(struct _RTMP_ADAPTER *pAd);
+VOID RTMPReadTxPwrPerRate(struct _RTMP_ADAPTER *pAd);
+
+
+VOID NetDevNickNameInit(IN struct _RTMP_ADAPTER *pAd);
+
+
+
+#ifdef GREENAP_SUPPORT
+VOID EnableAPMIMOPSv2(struct _RTMP_ADAPTER *pAd, BOOLEAN ReduceCorePower);
+VOID DisableAPMIMOPSv2(struct _RTMP_ADAPTER *pAd);
+VOID EnableAPMIMOPSv1(struct _RTMP_ADAPTER *pAd, BOOLEAN ReduceCorePower);
+VOID DisableAPMIMOPSv1(struct _RTMP_ADAPTER *pAd);
+#endif /* GREENAP_SUPPORT */
+
+
+/* global variable */
+extern FREQUENCY_ITEM RtmpFreqItems3020[];
+extern FREQUENCY_ITEM FreqItems3020_Xtal20M[];
+extern UCHAR NUM_OF_3020_CHNL;
+extern FREQUENCY_ITEM *FreqItems3020;
+extern RTMP_RF_REGS RF2850RegTable[];
+extern UCHAR NUM_OF_2850_CHNL;
+
+BOOLEAN AsicWaitPDMAIdle(struct _RTMP_ADAPTER *pAd, INT round, INT wait_us);
+INT AsicSetPreTbttInt(struct _RTMP_ADAPTER *pAd, BOOLEAN enable);
+INT AsicReadAggCnt(struct _RTMP_ADAPTER *pAd, ULONG *aggCnt, int cnt_len);
+
+#endif /* __RTMP_CHIP_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_cmd.h b/cleopatre/devkit/mt7601udrv/include/rtmp_cmd.h
new file mode 100644
index 0000000000..98839563c2
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_cmd.h
@@ -0,0 +1,683 @@
+#ifndef __RTMP_CMD_H__
+#define __RTMP_CMD_H__
+
+#include "rtmp_type.h"
+
+typedef struct _CmdQElmt {
+ UINT command;
+ PVOID buffer;
+ ULONG bufferlength;
+ BOOLEAN CmdFromNdis;
+ BOOLEAN SetOperation;
+ struct _CmdQElmt *next;
+} CmdQElmt, *PCmdQElmt;
+
+typedef struct _CmdQ {
+ UINT size;
+ CmdQElmt *head;
+ CmdQElmt *tail;
+ UINT32 CmdQState;
+} CmdQ, *PCmdQ;
+
+#define EnqueueCmd(cmdq, cmdqelmt) \
+{ \
+ if (cmdq->size == 0) \
+ cmdq->head = cmdqelmt; \
+ else \
+ cmdq->tail->next = cmdqelmt; \
+ cmdq->tail = cmdqelmt; \
+ cmdqelmt->next = NULL; \
+ cmdq->size++; \
+}
+
+#define NDIS_OID UINT
+
+/* OS_RTCMDUp is only used in UTIL/NETIF module */
+#define OS_RTCMDUp RtmpOsCmdUp
+
+
+
+/* RALINK command status code */
+#define RTMP_IO_EINVAL 30000
+#define RTMP_IO_EOPNOTSUPP 30001
+#define RTMP_IO_EFAULT 30002
+#define RTMP_IO_ENETDOWN 30003
+#define RTMP_IO_E2BIG 30004
+#define RTMP_IO_ENOMEM 30005
+#define RTMP_IO_EAGAIN 30006
+#define RTMP_IO_ENOTCONN 30007
+
+enum {
+#ifdef MAT_SUPPORT
+ SHOW_IPV4_MAT_INFO = 1,
+ SHOW_IPV6_MAT_INFO = 2,
+ SHOW_ETH_CLONE_MAC = 3,
+#endif /* MAT_SUPPORT */
+ SHOW_CONN_STATUS = 4,
+ SHOW_DRVIER_VERION = 5,
+ SHOW_BA_INFO = 6,
+ SHOW_DESC_INFO = 7,
+#ifdef RTMP_MAC_USB
+ SHOW_RXBULK_INFO = 8,
+ SHOW_TXBULK_INFO = 9,
+#endif /* RTMP_MAC_USB */
+ RAIO_OFF = 10,
+ RAIO_ON = 11,
+#ifdef QOS_DLS_SUPPORT
+ SHOW_DLS_ENTRY_INFO = 20,
+#endif /* QOS_DLS_SUPPORT */
+ SHOW_CFG_VALUE = 21,
+ SHOW_ADHOC_ENTRY_INFO = 22,
+ SHOW_DEV_INFO = 26,
+ SHOW_STA_INFO = 27,
+};
+
+
+/* RALINK command handle ID */
+/* ap commands */
+typedef enum _CMD_RTPRIV_IOCTL_AP {
+
+ /* general */
+ CMD_RTPRIV_IOCTL_SET_WSCOOB = 0x0001,
+ CMD_RTPRIV_IOCTL_GET_MAC_TABLE,
+ CMD_RTPRIV_IOCTL_GSITESURVEY,
+ CMD_RTPRIV_IOCTL_STATISTICS,
+ CMD_RTPRIV_IOCTL_QUERY_BATABLE,
+ CMD_RTPRIV_IOCTL_E2P,
+ CMD_RTPRIV_IOCTL_BBP,
+ CMD_RTPRIV_IOCTL_MAC,
+ CMD_RTPRIV_IOCTL_RF,
+ CMD_RT_PRIV_IOCTL,
+ CMD_RTPRIV_IOCTL_SET,
+ CMD_RTPRIV_IOCTL_SHOW,
+ CMD_RTPRIV_IOCTL_GET_AR9_SHOW,
+ CMD_RTPRIV_IOCTL_ATE,
+ CMD_RTPRIV_IOCTL_CHID_2_FREQ,
+ CMD_RTPRIV_IOCTL_FREQ_2_CHID,
+ CMD_RTPRIV_IOCTL_GET_MAC_TABLE_STRUCT,
+
+ /* mbss */
+ CMD_RTPRIV_IOCTL_MBSS_BEACON_UPDATE,
+ CMD_RTPRIV_IOCTL_MBSS_OPEN,
+ CMD_RTPRIV_IOCTL_MBSS_CLOSE,
+ CMD_RTPRIV_IOCTL_MBSS_INIT,
+ CMD_RTPRIV_IOCTL_MBSS_REMOVE,
+
+ /* wsc */
+ CMD_RTPRIV_IOCTL_WSC_PROFILE,
+ CMD_RTPRIV_IOCTL_WSC_INIT,
+
+ /* apc */
+ CMD_RTPRIV_IOCTL_APC_UP,
+ CMD_RTPRIV_IOCTL_APC_DISCONNECT,
+ CMD_RTPRIV_IOCTL_APC_INIT,
+ CMD_RTPRIV_IOCTL_APC_OPEN,
+ CMD_RTPRIV_IOCTL_APC_CLOSE,
+ CMD_RTPRIV_IOCTL_APC_REMOVE,
+
+ /* interface */
+ CMD_RTPRIV_IOCTL_MAIN_OPEN,
+
+ /* ioctl */
+ CMD_RTPRIV_IOCTL_PREPARE,
+ CMD_RTPRIV_IOCTL_AP_SIOCGIWAP,
+ CMD_RTPRIV_IOCTL_AP_SIOCGIFHWADDR,
+ CMD_RTPRIV_IOCTL_AP_SIOCGIWESSID,
+ CMD_RTPRIV_IOCTL_AP_SIOCGIWRATEQ,
+ CMD_RTPRIV_IOCTL_AP_SIOCSIWGENIE,
+
+ /* can not exceed 0x5000 */
+} CMD_RTPRIV_IOCTL_AP;
+
+/* common commands */
+typedef enum _CMD_RTPRIV_IOCTL_COMMON {
+
+ /* general */
+ CMD_RTPRIV_IOCTL_NETDEV_GET = 0x5000,
+ CMD_RTPRIV_IOCTL_NETDEV_SET,
+ CMD_RTPRIV_IOCTL_OPMODE_GET,
+ CMD_RTPRIV_IOCTL_TASK_LIST_GET,
+ CMD_RTPRIV_IOCTL_IRQ_INIT,
+ CMD_RTPRIV_IOCTL_IRQ_RELEASE,
+ CMD_RTPRIV_IOCTL_MSI_ENABLE,
+ CMD_RTPRIV_IOCTL_NIC_NOT_EXIST,
+ CMD_RTPRIV_IOCTL_MCU_SLEEP_CLEAR,
+#ifdef CONFIG_APSTA_MIXED_SUPPORT
+ CMD_RTPRIV_IOCTL_MAX_IN_BIT,
+#endif /* CONFIG_APSTA_MIXED_SUPPORT */
+ CMD_RTPRIV_IOCTL_ADAPTER_SUSPEND_SET,
+ CMD_RTPRIV_IOCTL_ADAPTER_SUSPEND_CLEAR,
+ CMD_RTPRIV_IOCTL_ADAPTER_RT28XX_USB_ASICRADIO_OFF,
+ CMD_RTPRIV_IOCTL_ADAPTER_RT28XX_USB_ASICRADIO_ON,
+ CMD_RTPRIV_IOCTL_SANITY_CHECK,
+ CMD_RTPRIV_IOCTL_SANITY_CHECK_ON_SET_CMD,
+#ifdef EXT_BUILD_CHANNEL_LIST
+ CMD_RTPRIV_SET_PRECONFIG_VALUE,
+#endif /* EXT_BUILD_CHANNEL_LIST */
+
+
+ /* mesh */
+ CMD_RTPRIV_IOCTL_MESH_INIT,
+ CMD_RTPRIV_IOCTL_MESH_REMOVE,
+ CMD_RTPRIV_IOCTL_MESH_OPEN_PRE,
+ CMD_RTPRIV_IOCTL_MESH_OPEN_POST,
+ CMD_RTPRIV_IOCTL_MESH_IS_VALID,
+ CMD_RTPRIV_IOCTL_MESH_CLOSE,
+
+ /* p2p */
+ CMD_RTPRIV_IOCTL_P2P_INIT,
+ CMD_RTPRIV_IOCTL_P2P_REMOVE,
+ CMD_RTPRIV_IOCTL_P2P_OPEN_PRE,
+ CMD_RTPRIV_IOCTL_P2P_OPEN_POST,
+ CMD_RTPRIV_IOCTL_P2P_IS_VALID,
+ CMD_RTPRIV_IOCTL_P2P_CLOSE,
+
+ /* usb */
+ CMD_RTPRIV_IOCTL_USB_MORE_FLAG_SET,
+ CMD_RTPRIV_IOCTL_USB_CONFIG_INIT,
+ CMD_RTPRIV_IOCTL_USB_SUSPEND,
+ CMD_RTPRIV_IOCTL_USB_RESUME,
+
+ /* pci */
+ CMD_RTPRIV_IOCTL_PCI_SUSPEND,
+ CMD_RTPRIV_IOCTL_PCI_RESUME,
+ CMD_RTPRIV_IOCTL_PCI_CSR_SET,
+ CMD_RTPRIV_IOCTL_PCIE_INIT,
+
+ /* cfg80211 */
+ CMD_RTPRIV_IOCTL_CFG80211_CFG_START,
+
+ /* inf ppa */
+ CMD_RTPRIV_IOCTL_INF_PPA_INIT,
+ CMD_RTPRIV_IOCTL_INF_PPA_EXIT,
+
+ /* wireless */
+ CMD_RTPRIV_IOCTL_BEACON_UPDATE,
+ CMD_RTPRIV_IOCTL_RXPATH_GET,
+ CMD_RTPRIV_IOCTL_CHAN_LIST_NUM_GET,
+ CMD_RTPRIV_IOCTL_CHAN_LIST_GET,
+ CMD_RTPRIV_IOCTL_FREQ_LIST_GET,
+
+ /* interface */
+ CMD_RTPRIV_IOCTL_VIRTUAL_INF_UP,
+ CMD_RTPRIV_IOCTL_VIRTUAL_INF_DOWN,
+ CMD_RTPRIV_IOCTL_VIRTUAL_INF_GET,
+ CMD_RTPRIV_IOCTL_INF_TYPE_GET,
+ CMD_RTPRIV_IOCTL_INF_STATS_GET,
+ CMD_RTPRIV_IOCTL_INF_IW_STATUS_GET,
+ CMD_RTPRIV_IOCTL_INF_MAIN_CREATE,
+ CMD_RTPRIV_IOCTL_INF_MAIN_ID_GET,
+ CMD_RTPRIV_IOCTL_INF_MAIN_CHECK,
+ CMD_RTPRIV_IOCTL_INF_P2P_CHECK,
+
+ /* ioctl */
+ CMD_RTPRIV_IOCTL_SIOCGIWFREQ,
+ CMD_RTPRIV_IOCTL_SIOCGIWNAME,
+
+ /* wds */
+ CMD_RTPRIV_IOCTL_WDS_INIT,
+ CMD_RTPRIV_IOCTL_WDS_REMOVE,
+ CMD_RTPRIV_IOCTL_WDS_STATS_GET,
+
+ CMD_RTPRIV_IOCTL_MAC_ADDR_GET,
+
+#ifdef RT_CFG80211_SUPPORT
+ /* cfg802.11 */
+ /* Note: All cfg commands must be continue. */
+ CMD_RTPRIV_IOCTL_80211_START,
+ CMD_RTPRIV_IOCTL_80211_CB_GET,
+ CMD_RTPRIV_IOCTL_80211_CB_SET,
+ CMD_RTPRIV_IOCTL_80211_CHAN_SET,
+ CMD_RTPRIV_IOCTL_80211_VIF_CHG,
+ CMD_RTPRIV_IOCTL_80211_SCAN,
+ CMD_RTPRIV_IOCTL_80211_IBSS_JOIN,
+ CMD_RTPRIV_IOCTL_80211_STA_LEAVE,
+ CMD_RTPRIV_IOCTL_80211_STA_GET,
+ CMD_RTPRIV_IOCTL_80211_KEY_ADD,
+ CMD_RTPRIV_IOCTL_80211_KEY_DEFAULT_SET,
+ CMD_RTPRIV_IOCTL_80211_CONNECT_TO,
+ CMD_RTPRIV_IOCTL_80211_RFKILL,
+ CMD_RTPRIV_IOCTL_80211_REG_NOTIFY_TO,
+ CMD_RTPRIV_IOCTL_80211_UNREGISTER,
+ CMD_RTPRIV_IOCTL_80211_BANDINFO_GET,
+ CMD_RTPRIV_IOCTL_80211_SURVEY_GET,
+ CMD_RTPRIV_IOCTL_80211_EXTRA_IES_SET,
+ CMD_RTPRIV_IOCTL_80211_REMAIN_ON_CHAN_SET,
+ CMD_RTPRIV_IOCTL_80211_MGMT_FRAME_REG,
+ CMD_RTPRIV_IOCTL_80211_CHANNEL_LOCK,
+ CMD_RTPRIV_IOCTL_80211_MGMT_FRAME_SEND,
+ CMD_RTPRIV_IOCTL_80211_REMAIN_ON_CHAN_DUR_TIMER_INIT,
+ CMD_RTPRIV_IOCTL_80211_CHANNEL_LIST_SET,
+ CMD_RTPRIV_IOCTL_80211_ACTION_FRAME_REG,
+ CMD_RTPRIV_IOCTL_80211_BEACON_ADD,
+ CMD_RTPRIV_IOCTL_80211_BEACON_SET,
+ CMD_RTPRIV_IOCTL_80211_BEACON_DEL,
+ CMD_RTPRIV_IOCTL_80211_AP_KEY_ADD,
+ CMD_RTPRIV_IOCTL_80211_CHANGE_BSS_PARM,
+ CMD_RTPRIV_IOCTL_80211_AP_KEY_DEL,
+ CMD_RTPRIV_IOCTL_80211_AP_PROBE_RSP,
+ CMD_RTPRIV_IOCTL_80211_PORT_SECURED,
+ CMD_RTPRIV_IOCTL_80211_AP_STA_DEL,
+ CMD_RTPRIV_IOCTL_80211_CANCEL_REMAIN_ON_CHAN_SET,
+ CMD_RTPRIV_IOCTL_80211_BITRATE_SET,
+#ifdef RT_P2P_SPECIFIC_WIRELESS_EVENT
+ CMD_RTPRIV_IOCTL_80211_SEND_WIRELESS_EVENT,
+#endif /* RT_P2P_SPECIFIC_WIRELESS_EVENT */
+ CMD_RTPRIV_IOCTL_80211_END,
+#endif /* RT_CFG80211_SUPPORT */
+
+ CMD_RTPRIV_IOCTL_ADAPTER_CSO_SUPPORT_TEST,
+ CMD_RTPRIV_IOCTL_ADAPTER_TSO_SUPPORT_TEST,
+
+ /* can not exceed 0xa000 */
+ CMD_RTPRIV_IOCTL_80211_COM_LATEST_ONE,
+} CMD_RTPRIV_IOCTL_COMMON;
+
+#ifdef RT_CFG80211_SUPPORT
+typedef struct __CMD_RTPRIV_IOCTL_80211_CHAN {
+
+ UINT8 ChanId;
+
+#define RT_CMD_80211_IFTYPE_STATION 0x00
+#define RT_CMD_80211_IFTYPE_ADHOC 0x01
+#define RT_CMD_80211_IFTYPE_MONITOR 0x02
+ UINT8 IfType;
+
+#define RT_CMD_80211_CHANTYPE_NOHT 0x00
+#define RT_CMD_80211_CHANTYPE_HT20 0x01
+#define RT_CMD_80211_CHANTYPE_HT40MINUS 0X02
+#define RT_CMD_80211_CHANTYPE_HT40PLUS 0X03
+ UINT8 ChanType;
+
+ UINT32 MonFilterFlag;
+} CMD_RTPRIV_IOCTL_80211_CHAN;
+
+#define RT_CMD_80211_FILTER_FCSFAIL 0x01
+#define RT_CMD_80211_FILTER_PLCPFAIL 0x02
+#define RT_CMD_80211_FILTER_CONTROL 0x04
+#define RT_CMD_80211_FILTER_OTHER_BSS 0x08
+
+typedef struct __CMD_RTPRIV_IOCTL_80211_IBSS {
+
+ UINT32 BeaconInterval;
+ UCHAR *pSsid;
+} CMD_RTPRIV_IOCTL_80211_IBSS;
+
+typedef struct __CMD_RTPRIV_IOCTL_80211_STA {
+
+ UINT8 MAC[6];
+ ULONG DataRate;
+
+#define RT_CMD_80211_TXRATE_LEGACY 0x01
+#define RT_CMD_80211_TXRATE_BW_40 0x02
+#define RT_CMD_80211_TXRATE_SHORT_GI 0x04
+ UINT32 TxRateFlags;
+
+ UINT32 TxRateMCS;
+ INT32 Signal;
+ UINT32 TxPacketCnt;
+ UINT32 InactiveTime;
+} CMD_RTPRIV_IOCTL_80211_STA;
+
+typedef struct __CMD_RTPRIV_IOCTL_80211_KEY {
+
+#define RT_CMD_80211_KEY_WEP 0x00
+#define RT_CMD_80211_KEY_WPA 0x01
+ UINT8 KeyType;
+ UINT8 KeyBuf[50];
+ UINT8 KeyId;
+} CMD_RTPRIV_IOCTL_80211_KEY;
+
+typedef struct __CMD_RTPRIV_IOCTL_80211_CONNECT {
+
+ UINT8 WpaVer;
+ BOOLEAN FlgIs8021x;
+ BOOLEAN FlgIsAuthOpen;
+
+#define RT_CMD_80211_CONN_ENCRYPT_NONE 0x01
+#define RT_CMD_80211_CONN_ENCRYPT_WEP 0x02
+#define RT_CMD_80211_CONN_ENCRYPT_TKIP 0x04
+#define RT_CMD_80211_CONN_ENCRYPT_CCMP 0x08
+ UINT8 PairwiseEncrypType;
+ UINT8 GroupwiseEncrypType;
+
+ UINT8 *pKey;
+ UINT32 KeyLen;
+ UINT8 KeyIdx;
+
+ UINT8 *pSsid;
+ UINT32 SsidLen;
+} CMD_RTPRIV_IOCTL_80211_CONNECT;
+
+typedef struct __CMD_RTPRIV_IOCTL_80211_REG_NOTIFY {
+
+ UCHAR Alpha2[2];
+ VOID *pWiphy;
+} CMD_RTPRIV_IOCTL_80211_REG_NOTIFY;
+
+typedef struct __CMD_RTPRIV_IOCTL_80211_SURVEY {
+
+ VOID *pCfg80211;
+/* UINT64 ChannelTime; */ /* idle + busy, not support */
+ UINT64 ChannelTimeBusy;
+ UINT64 ChannelTimeExtBusy;
+} CMD_RTPRIV_IOCTL_80211_SURVEY;
+
+#endif /* RT_CFG80211_SUPPORT */
+
+/* station commands */
+
+/* when adding any new type, please also add codes in LINUX_WEVENT_TRANSLATE */
+#define RT_WLAN_EVENT_CUSTOM 0x01
+#define RT_WLAN_EVENT_CGIWAP 0x02
+#define RT_WLAN_EVENT_ASSOC_REQ_IE 0x03
+#define RT_WLAN_EVENT_SCAN 0x04
+#define RT_WLAN_EVENT_EXPIRED 0x05
+#define RT_WLAN_EVENT_SHOWPIN 0x06
+#define RT_WLAN_EVENT_PIN 0x07
+
+typedef struct __RT_CMD_RATE_SET {
+ IN UINT32 Rate;
+ IN UINT32 Fixed;
+} RT_CMD_RATE_SET;
+
+typedef struct __RT_CMD_PARAM_SET {
+ IN PSTRING pThisChar;
+ IN PSTRING pValue;
+} RT_CMD_PARAM_SET;
+
+typedef struct __RT_CMD_SHARED_KEY_ADD {
+ IN UCHAR KeyIdx;
+ IN BOOLEAN FlgHaveGTK;
+} RT_CMD_SHARED_KEY_ADD;
+
+typedef struct __RT_CMD_MBSS_KICKOUT {
+ IN INT BssId;
+ IN USHORT Reason;
+} RT_CMD_MBSS_KICKOUT;
+
+typedef struct __RT_CMD_USB_MORE_FLAG_CONFIG {
+ IN UINT32 VendorID;
+ IN UINT32 ProductID;
+} RT_CMD_USB_MORE_FLAG_CONFIG;
+
+typedef struct __RT_CMD_USB_DEV_CONFIG {
+ IN UINT NumberOfPipes;
+ IN UINT8 BulkInEpAddr[2];
+ IN USHORT BulkInMaxPacketSize;
+ IN UINT8 BulkOutEpAddr[6];
+ IN USHORT BulkOutMaxPacketSize;
+ IN VOID *pConfig;
+} RT_CMD_USB_DEV_CONFIG;
+
+typedef struct __RT_CMD_CFG80211_CONFIG {
+ IN VOID *pCfgDev;
+ IN VOID(
+ *CFG80211_Register) (
+ IN VOID * pAd,
+ IN VOID * pDev,
+ IN VOID * pNetDev);
+} RT_CMD_CFG80211_CONFIG;
+
+typedef struct __RT_CMD_WAIT_QUEUE_LIST {
+ OUT RTMP_OS_TASK *pMlmeTask;
+ OUT RTMP_OS_TASK *pTimerTask;
+ OUT RTMP_OS_TASK *pCmdQTask;
+ OUT RTMP_OS_TASK *pWscTask;
+} RT_CMD_WAIT_QUEUE_LIST;
+
+typedef struct __RT_CMD_INF_UP_DOWN {
+
+ IN int (*rt28xx_open)(VOID *net_dev);
+ IN int (*rt28xx_close)(VOID *net_dev);
+} RT_CMD_INF_UP_DOWN;
+
+typedef struct __RT_CMD_STATS {
+ IN VOID *pNetDev;
+ OUT VOID *pStats; /* point to pAd->stats */
+
+ OUT unsigned long rx_packets; /* total packets received */
+ OUT unsigned long tx_packets; /* total packets transmitted */
+ OUT unsigned long rx_bytes; /* total bytes received */
+ OUT unsigned long tx_bytes; /* total bytes transmitted */
+ OUT unsigned long rx_errors; /* bad packets received */
+ OUT unsigned long tx_errors; /* packet transmit problems */
+ OUT unsigned long multicast; /* multicast packets received */
+ OUT unsigned long collisions;
+
+ OUT unsigned long rx_over_errors; /* receiver ring buff overflow */
+ OUT unsigned long rx_crc_errors; /* recved pkt with crc error */
+ OUT unsigned long rx_frame_errors; /* recv'd frame alignment error */
+ OUT unsigned long rx_fifo_errors; /* recv'r fifo overrun */
+} RT_CMD_STATS;
+
+typedef struct __RT_CMD_IW_STATS {
+
+ ULONG priv_flags;
+ UCHAR *dev_addr;
+
+ VOID *pStats; /* point to pAd->iw_stats */
+
+ UINT8 qual;
+ UINT8 level;
+ UINT8 noise;
+ UINT8 updated;
+} RT_CMD_IW_STATS;
+
+typedef struct __RT_CMD_PCIE_INIT {
+
+ IN VOID *pPciDev;
+ IN UINT32 ConfigDeviceID;
+ IN UINT32 ConfigSubsystemVendorID;
+ IN UINT32 ConfigSubsystemID;
+} RT_CMD_PCIE_INIT;
+
+typedef struct __RT_CMD_AP_IOCTL_CONFIG {
+ IN VOID *net_dev;
+ IN ULONG priv_flags;
+ IN char *pCmdData;
+ IN INT32 CmdId_RTPRIV_IOCTL_SET;
+ IN char *name;
+ IN INT apidx;
+
+ OUT INT32 Status;
+} RT_CMD_AP_IOCTL_CONFIG;
+
+typedef struct __RT_CMD_AP_IOCTL_SSID {
+ IN ULONG priv_flags;
+ IN INT apidx;
+
+ OUT char *pSsidStr;
+ OUT INT32 length;
+} RT_CMD_AP_IOCTL_SSID;
+
+typedef struct __RT_CMD_IOCTL_RATE {
+ IN ULONG priv_flags;
+ OUT UINT32 BitRate;
+} RT_CMD_IOCTL_RATE;
+
+#define RTMP_CMD_STA_MODE_AUTO 0x00
+#define RTMP_CMD_STA_MODE_ADHOC 0x01
+#define RTMP_CMD_STA_MODE_INFRA 0x02
+#define RTMP_CMD_STA_MODE_MONITOR 0x03
+
+typedef struct __RT_CMD_STA_IOCTL_FREQ {
+ IN INT32 m; /* Mantissa */
+ IN INT16 e; /* Exponent */
+} RT_CMD_STA_IOCTL_FREQ;
+
+typedef struct __RT_CMD_STA_IOCTL_BSS {
+ OUT UCHAR Bssid[6];
+ OUT UCHAR ChannelQuality;
+ OUT CHAR Rssi;
+ OUT CHAR Noise;
+} RT_CMD_STA_IOCTL_BSS;
+
+typedef struct __RT_CMD_STA_IOCTL_BSS_LIST {
+ IN UINT32 MaxNum;
+ OUT UINT32 BssNum;
+ OUT RT_CMD_STA_IOCTL_BSS *pList;
+} RT_CMD_STA_IOCTL_BSS_LIST;
+
+typedef struct __RT_CMD_STA_IOCTL_SCAN {
+ IN UCHAR FlgScanThisSsid;
+ IN UINT32 SsidLen;
+ IN CHAR *pSsid;
+ OUT INT32 Status;
+} RT_CMD_STA_IOCTL_SCAN;
+
+typedef struct __RT_CMD_STA_IOCTL_BSS_TABLE {
+ OUT UCHAR Bssid[6];
+ OUT UCHAR Channel;
+ OUT UCHAR BssType;
+ OUT UCHAR HtCapabilityLen;
+
+ OUT UCHAR SupRate[12];
+ OUT UCHAR SupRateLen;
+ OUT UCHAR ExtRate[12];
+ OUT UCHAR ExtRateLen;
+
+ OUT UCHAR SsidLen;
+ OUT CHAR Ssid[32];
+
+ OUT USHORT CapabilityInfo;
+ OUT UCHAR ChannelWidth, ShortGIfor40, ShortGIfor20, MCSSet;
+
+ OUT USHORT WpaIeLen;
+ OUT UCHAR *pWpaIe;
+
+ OUT USHORT RsnIeLen;
+ OUT UCHAR *pRsnIe;
+
+ OUT USHORT WpsIeLen;
+ OUT UCHAR *pWpsIe;
+
+ OUT UCHAR FlgIsPrivacyOn;
+
+ OUT RT_CMD_STA_IOCTL_BSS Signal;
+} RT_CMD_STA_IOCTL_BSS_TABLE;
+
+typedef struct __RT_CMD_STA_IOCTL_SCAN_TABLE {
+ IN ULONG priv_flags;
+ OUT UINT32 BssNr;
+ OUT RT_CMD_STA_IOCTL_BSS_TABLE *pBssTable; /* must be freed by caller */
+ OUT UCHAR MainSharedKey[4][16];
+} RT_CMD_STA_IOCTL_SCAN_TABLE;
+
+typedef struct __RT_CMD_STA_IOCTL_SSID {
+ IN UCHAR FlgAnySsid;
+ INOUT UINT32 SsidLen;
+ INOUT CHAR *pSsid;
+ OUT INT32 Status;
+} RT_CMD_STA_IOCTL_SSID;
+
+typedef struct __RT_CMD_STA_IOCTL_NICK_NAME {
+ OUT UINT NameLen;
+ OUT CHAR *pName;
+} RT_CMD_STA_IOCTL_NICK_NAME;
+
+typedef struct __RT_CMD_STA_IOCTL_SECURITY {
+ INOUT CHAR *pData;
+ INOUT UINT16 length;
+ IN INT32 KeyIdx;
+ IN INT32 MaxKeyLen;
+
+#define RT_CMD_STA_IOCTL_SECURITY_ALG_NONE 0x01
+#define RT_CMD_STA_IOCTL_SECURITY_ALG_WEP 0x02
+#define RT_CMD_STA_IOCTL_SECURITY_ALG_TKIP 0x03
+#define RT_CMD_STA_IOCTL_SECURITY_ALG_CCMP 0x04
+ IN UINT32 Alg;
+
+#define RT_CMD_STA_IOCTL_SECURTIY_EXT_SET_TX_KEY 0x01
+#define RT_CMD_STA_IOCTL_SECURTIY_EXT_GROUP_KEY 0x02
+ IN UINT16 ext_flags;
+
+#define RT_CMD_STA_IOCTL_SECURITY_DISABLED 0x01
+#define RT_CMD_STA_IOCTL_SECURITY_ENABLED 0x02
+#define RT_CMD_STA_IOCTL_SECURITY_RESTRICTED 0x04
+#define RT_CMD_STA_IOCTL_SECURITY_OPEN 0x08
+#define RT_CMD_STA_IOCTL_SECURITY_NOKEY 0x10
+#define RT_CMD_STA_IOCTL_SECURITY_MODE 0x20
+ INOUT UINT16 flags;
+
+ OUT INT32 Status;
+} RT_CMD_STA_IOCTL_SECURITY;
+
+typedef struct __RT_CMD_STA_IOCTL_WSC_U32_ITEM {
+ IN UINT32 *pUWrq;
+ OUT INT32 Status;
+} RT_CMD_STA_IOCTL_WSC_U32_ITEM;
+
+typedef struct __RT_CMD_STA_IOCTL_WSC_STR_ITEM {
+ IN UINT32 Subcmd;
+ IN CHAR *pData;
+ IN UINT32 length;
+
+ OUT INT32 Status;
+} RT_CMD_STA_IOCTL_WSC_STR_ITEM;
+
+typedef struct __RT_CMD_STA_IOCTL_SHOW {
+ IN CHAR *pData;
+ IN UINT32 MaxSize;
+ IN UINT32 InfType;
+} RT_CMD_STA_IOCTL_SHOW;
+
+#define RT_CMD_STA_IOCTL_IW_MLME_DEAUTH 0x01
+#define RT_CMD_STA_IOCTL_IW_MLME_DISASSOC 0x02
+
+typedef struct __RT_CMD_STA_IOCTL_SECURITY_ADV {
+
+#define RT_CMD_STA_IOCTL_WPA_VERSION 0x10
+#define RT_CMD_STA_IOCTL_WPA_VERSION1 0x11
+#define RT_CMD_STA_IOCTL_WPA_VERSION2 0x12
+
+#define RT_CMD_STA_IOCTL_WPA_PAIRWISE 0x20
+#define RT_CMD_STA_IOCTL_WPA_PAIRWISE_NONE 0x21
+#define RT_CMD_STA_IOCTL_WPA_PAIRWISE_WEP40 0x22
+#define RT_CMD_STA_IOCTL_WPA_PAIRWISE_WEP104 0x23
+#define RT_CMD_STA_IOCTL_WPA_PAIRWISE_TKIP 0x24
+#define RT_CMD_STA_IOCTL_WPA_PAIRWISE_CCMP 0x25
+
+#define RT_CMD_STA_IOCTL_WPA_GROUP 0x30
+#define RT_CMD_STA_IOCTL_WPA_GROUP_NONE 0x31
+#define RT_CMD_STA_IOCTL_WPA_GROUP_WEP40 0x32
+#define RT_CMD_STA_IOCTL_WPA_GROUP_WEP104 0x33
+#define RT_CMD_STA_IOCTL_WPA_GROUP_TKIP 0x34
+#define RT_CMD_STA_IOCTL_WPA_GROUP_CCMP 0x35
+
+#define RT_CMD_STA_IOCTL_WPA_KEY_MGMT 0x40
+#define RT_CMD_STA_IOCTL_WPA_KEY_MGMT_1X 0x41
+#define RT_CMD_STA_IOCTL_WPA_KEY_MGMT_WPS 0x42
+
+#define RT_CMD_STA_IOCTL_WPA_AUTH_RX_UNENCRYPTED_EAPOL 0x50
+#define RT_CMD_STA_IOCTL_WPA_AUTH_PRIVACY_INVOKED 0x60
+#define RT_CMD_STA_IOCTL_WPA_AUTH_DROP_UNENCRYPTED 0x70
+
+#define RT_CMD_STA_IOCTL_WPA_AUTH_80211_AUTH_ALG 0x80
+#define RT_CMD_STA_IOCTL_WPA_AUTH_80211_AUTH_ALG_SHARED 0x81
+#define RT_CMD_STA_IOCTL_WPA_AUTH_80211_AUTH_ALG_OPEN 0x82
+#define RT_CMD_STA_IOCTL_WPA_AUTH_80211_AUTH_ALG_LEAP 0x83
+
+#define RT_CMD_STA_IOCTL_WPA_AUTH_WPA_ENABLED 0x90
+
+#define RT_CMD_STA_IOCTL_WPA_AUTH_COUNTERMEASURES 0xA0
+
+ IN UINT32 flags;
+ IN UINT32 value;
+} RT_CMD_STA_IOCTL_SECURITY_ADV;
+
+typedef struct __RT_CMD_STA_IOCTL_RSN_IE {
+ INOUT UINT32 length;
+ INOUT UCHAR *pRsnIe;
+} RT_CMD_STA_IOCTL_RSN_IE;
+
+typedef struct __RT_CMD_STA_IOCTL_PMA_SA {
+#define RT_CMD_STA_IOCTL_PMA_SA_FLUSH 0x01
+#define RT_CMD_STA_IOCTL_PMA_SA_REMOVE 0x02
+#define RT_CMD_STA_IOCTL_PMA_SA_ADD 0x03
+ IN UINT32 Cmd;
+ IN UCHAR *pBssid;
+ IN UCHAR *pPmkid;
+} RT_CMD_STA_IOCTL_PMA_SA;
+
+#endif /* __RTMP_CMD_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_comm.h b/cleopatre/devkit/mt7601udrv/include/rtmp_comm.h
new file mode 100644
index 0000000000..79fb12f241
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_comm.h
@@ -0,0 +1,502 @@
+/****************************************************************************
+
+ Module Name:
+ rtmp_comm.h
+
+ Abstract:
+ All common definitions and macros for UTIL/DRIVER/NETIF.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+
+***************************************************************************/
+
+#ifndef __RT_COMM_H__
+#define __RT_COMM_H__
+
+#define VENDOR_FEATURE1_SUPPORT
+/*#define VENDOR_FEATURE3_SUPPORT */
+
+
+/*#define MONITOR_FLAG_11N_SNIFFER_SUPPORT */
+
+
+#ifdef VENDOR_FEATURE3_SUPPORT
+#ifdef DOT1X_SUPPORT
+#undef DOT1X_SUPPORT
+#endif /* DOT1X_SUPPORT */
+#ifdef SYSTEM_LOG_SUPPORT
+#undef SYSTEM_LOG_SUPPORT
+#endif /* SYSTEM_LOG_SUPPORT */
+#ifdef LED_CONTROL_SUPPORT
+#undef LED_CONTROL_SUPPORT
+#endif /* LED_CONTROL_SUPPORT */
+#ifdef WSC_LED_SUPPORT
+#undef WSC_LED_SUPPORT
+#endif /* WSC_LED_SUPPORT */
+#endif /* VENDOR_FEATURE3_SUPPORT */
+
+
+#ifdef CONFIG_AP_SUPPORT
+
+#ifndef VENDOR_FEATURE3_SUPPORT
+#define AP_QLOAD_SUPPORT
+#endif /* VENDOR_FEATURE3_SUPPORT */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+
+/* ======================== Before include files ============================ */
+/*
+ 14 channels @2.4G + 12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination
+ Refer to CH_HZ_ID_MAP[] in rt_channel.c
+
+*/
+#ifdef DOT11_VHT_AC
+#define MAX_NUM_OF_CHS (54 + 5) /* 5 channels for central channel of VHT 80MHz */
+#else
+#define MAX_NUM_OF_CHS 54
+#endif /* DOT11_VHT_AC*/
+/* 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL termination */
+#define MAX_NUM_OF_CHANNELS MAX_NUM_OF_CHS
+
+
+#include "rtmp_type.h"
+#include "rtmp_os.h"
+#include "link_list.h"
+#include "rtmp_cmd.h"
+#include "iface/iface_util.h"
+
+
+
+
+/* ======================== Debug =========================================== */
+/* */
+/* Debug information verbosity: lower values indicate higher urgency */
+/* */
+#define RT_DEBUG_OFF 0
+#define RT_DEBUG_ERROR 1
+#define RT_DEBUG_WARN 2
+#define RT_DEBUG_TRACE 3
+#define RT_DEBUG_INFO 4
+#define RT_DEBUG_LOUD 5
+
+typedef enum{
+ DBG_FUNC_RA = 0x100, /* debug flag for rate adaptation */
+ DBG_FUNC_SA = 0x200, /* debug flag for smart antenna */
+}RT_DEBUG_FUNC;
+
+
+/* ======================== Definition ====================================== */
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+/* definition of pAd->OpMode */
+#define OPMODE_STA 0
+#define OPMODE_AP 1
+#define OPMODE_APSTA 2 /* as AP and STA at the same time */
+
+#define MAIN_MBSSID 0
+#define FIRST_MBSSID 1
+
+/* Endian byte swapping codes */
+#define SWAP16(x) \
+ ((UINT16) (\
+ (((UINT16) (x) & (UINT16) 0x00ffU) << 8) | \
+ (((UINT16) (x) & (UINT16) 0xff00U) >> 8)))
+
+#define SWAP32(x) \
+ ((UINT32) (\
+ (((UINT32) (x) & (UINT32) 0x000000ffUL) << 24) | \
+ (((UINT32) (x) & (UINT32) 0x0000ff00UL) << 8) | \
+ (((UINT32) (x) & (UINT32) 0x00ff0000UL) >> 8) | \
+ (((UINT32) (x) & (UINT32) 0xff000000UL) >> 24)))
+
+#define SWAP64(x) \
+ ((UINT64)( \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x00000000000000ffULL) << 56) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x000000000000ff00ULL) << 40) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x0000000000ff0000ULL) << 24) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x00000000ff000000ULL) << 8) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x000000ff00000000ULL) >> 8) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x0000ff0000000000ULL) >> 24) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0x00ff000000000000ULL) >> 40) | \
+ (UINT64)(((UINT64)(x) & (UINT64) 0xff00000000000000ULL) >> 56) ))
+
+#ifdef RT_BIG_ENDIAN
+
+#define cpu2le64(x) SWAP64((x))
+#define le2cpu64(x) SWAP64((x))
+#define cpu2le32(x) SWAP32((x))
+#define le2cpu32(x) SWAP32((x))
+#define cpu2le16(x) SWAP16((x))
+#define le2cpu16(x) SWAP16((x))
+#define cpu2be64(x) ((UINT64)(x))
+#define be2cpu64(x) ((UINT64)(x))
+#define cpu2be32(x) ((UINT32)(x))
+#define be2cpu32(x) ((UINT32)(x))
+#define cpu2be16(x) ((UINT16)(x))
+#define be2cpu16(x) ((UINT16)(x))
+
+#else /* Little_Endian */
+
+#define cpu2le64(x) ((UINT64)(x))
+#define le2cpu64(x) ((UINT64)(x))
+#define cpu2le32(x) ((UINT32)(x))
+#define le2cpu32(x) ((UINT32)(x))
+#define cpu2le16(x) ((UINT16)(x))
+#define le2cpu16(x) ((UINT16)(x))
+#define cpu2be64(x) SWAP64((x))
+#define be2cpu64(x) SWAP64((x))
+#define cpu2be32(x) SWAP32((x))
+#define be2cpu32(x) SWAP32((x))
+#define cpu2be16(x) SWAP16((x))
+#define be2cpu16(x) SWAP16((x))
+
+#endif /* RT_BIG_ENDIAN */
+
+
+#define MAX_CUSTOM_LEN 128
+
+/* */
+/* IEEE 802.11 Structures and definitions */
+/* */
+#define MAX_TX_POWER_LEVEL 100 /* mW */
+#define MAX_RSSI_TRIGGER -10 /* dBm */
+#define MIN_RSSI_TRIGGER -200 /* dBm */
+#define MAX_FRAG_THRESHOLD 2346 /* byte count */
+#define MIN_FRAG_THRESHOLD 256 /* byte count */
+#define MAX_RTS_THRESHOLD 2347 /* byte count */
+
+typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
+ {
+Ndis802_11IBSS,
+Ndis802_11Infrastructure,
+Ndis802_11AutoUnknown,
+Ndis802_11Monitor,
+Ndis802_11InfrastructureMax /* Not a real value, defined as upper bound */
+} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
+
+
+
+
+/* ======================== Memory ========================================== */
+#ifdef VENDOR_FEATURE2_SUPPORT
+
+extern ULONG OS_NumOfPktAlloc, OS_NumOfPktFree;
+
+#define MEM_DBG_PKT_ALLOC_INC(__pPacket) OS_NumOfPktAlloc ++;
+#define MEM_DBG_PKT_FREE_INC(__pPacket) OS_NumOfPktFree ++;
+#else
+#define MEM_DBG_PKT_ALLOC_INC(__pPacket)
+#define MEM_DBG_PKT_FREE_INC(__pPacket)
+#endif /* VENDOR_FEATURE2_SUPPORT */
+
+/* value domain of 802.11 header FC.Tyte, which is b3..b2 of the 1st-byte of MAC header */
+#define BTYPE_MGMT 0
+#define BTYPE_CNTL 1
+#define BTYPE_DATA 2
+
+/* All PHY rate summary in TXD */
+/* Preamble MODE in TxD */
+#define MODE_CCK 0
+#define MODE_OFDM 1
+#ifdef DOT11_N_SUPPORT
+#define MODE_HTMIX 2
+#define MODE_HTGREENFIELD 3
+#endif /* DOT11_N_SUPPORT */
+#define MODE_VHT 4
+
+#ifdef NO_CONSISTENT_MEM_SUPPORT
+/* current support RXD_SIZE = 16B and cache line = 16 or 32B */
+#define RTMP_DCACHE_FLUSH(__AddrStart, __Size) \
+ RtmpOsDCacheFlush((ULONG)(__AddrStart), (ULONG)(__Size))
+#else
+#define RTMP_DCACHE_FLUSH(__AddrStart, __Size)
+#endif /* NO_CONSISTENT_MEM_SUPPORT */
+
+
+/* ======================== Interface ======================================= */
+typedef enum _RTMP_INF_TYPE_
+{
+ RTMP_DEV_INF_UNKNOWN = 0,
+ RTMP_DEV_INF_PCI = 1,
+ RTMP_DEV_INF_USB = 2,
+ RTMP_DEV_INF_RBUS = 4,
+ RTMP_DEV_INF_PCIE = 5,
+}RTMP_INF_TYPE;
+
+#if defined(CONFIG_AP_SUPPORT) && defined(CONFIG_STA_SUPPORT)
+#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd) if(_pAd->OpMode == OPMODE_AP)
+#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd) if(_pAd->OpMode == OPMODE_STA)
+#define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode) if (__OpMode == OPMODE_AP)
+#define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode) if (__OpMode == OPMODE_STA)
+#else
+#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd)
+#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd)
+#define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode)
+#define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode)
+#endif
+
+/* associated with device interface */
+typedef struct _DEV_PRIV_INFO {
+ VOID *pPriv; /* pAd */
+ UINT32 priv_flags;
+} DEV_PRIV_INFO;
+
+
+
+
+/***********************************************************************************
+ * IOCTL related definitions and data structures.
+ **********************************************************************************/
+typedef struct __RTMP_IOCTL_INPUT_STRUCT
+{
+ union
+ {
+ CHAR *name;
+ struct
+ {
+ CHAR *pointer;
+ UINT16 length;
+ UINT16 flags;
+ } data;
+ } u;
+} RTMP_IOCTL_INPUT_STRUCT;
+
+
+#define RT_CMD_STATUS_TRANSLATE(__Status) \
+ { \
+ if (__Status == RTMP_IO_EINVAL) \
+ __Status = -EINVAL; \
+ else if (__Status == RTMP_IO_EOPNOTSUPP) \
+ __Status = -EOPNOTSUPP; \
+ else if (__Status == RTMP_IO_EFAULT) \
+ __Status = -EFAULT; \
+ else if (__Status == RTMP_IO_E2BIG) \
+ __Status = -E2BIG; \
+ else if (__Status == RTMP_IO_ENOMEM) \
+ __Status = -ENOMEM; \
+ else if (__Status == RTMP_IO_EAGAIN) \
+ __Status = -EAGAIN; \
+ else if (__Status == RTMP_IO_ENOTCONN) \
+ __Status = -ENOTCONN; \
+ }
+
+
+
+
+/* ======================== Timer =========================================== */
+typedef struct _LIST_RESOURCE_OBJ_ENTRY
+{
+ struct _LIST_RESOURCE_OBJ_ENTRY *pNext;
+ VOID *pRscObj;
+} LIST_RESOURCE_OBJ_ENTRY, *PLIST_RESOURCE_OBJ_ENTRY;
+
+
+
+
+/* ======================== IC =========================================== */
+#define RFIC_24GHZ 0x01
+#define RFIC_5GHZ 0x02
+
+
+
+
+/* ======================== CFG80211 ======================================== */
+#define RT_CFG80211_DEBUG /* debug use */
+
+#ifdef RT_CFG80211_DEBUG
+#define CFG80211DBG(__Flg, __pMsg) DBGPRINT(__Flg, __pMsg)
+#else
+#define CFG80211DBG(__Flg, __pMsg)
+#endif /* RT_CFG80211_DEBUG */
+
+/* 1 ~ 14 */
+#define CFG80211_NUM_OF_CHAN_2GHZ 14
+
+/* 36 ~ 64, 100 ~ 136, 140 ~ 161 */
+#define CFG80211_NUM_OF_CHAN_5GHZ \
+ (sizeof(Cfg80211_Chan)-CFG80211_NUM_OF_CHAN_2GHZ)
+
+
+
+
+/* ======================== Packet ========================================== */
+#define LENGTH_802_11 24
+#define LENGTH_802_11_AND_H 30
+#define LENGTH_802_11_CRC_H 34
+#define LENGTH_802_11_CRC 28
+#define LENGTH_802_11_WITH_ADDR4 30
+#define LENGTH_802_3 14
+#define LENGTH_802_3_TYPE 2
+#define LENGTH_802_1_H 8
+#define LENGTH_EAPOL_H 4
+#define LENGTH_WMMQOS_H 2
+#define LENGTH_CRC 4
+#define MAX_SEQ_NUMBER 0x0fff
+#define LENGTH_802_3_NO_TYPE 12
+#define LENGTH_802_1Q 4 /* VLAN related */
+
+
+#ifdef TX_PKT_SG
+#ifndef MAX_SKB_FRAGS
+#define MAX_SKB_FRAGS (65536/(1UL << 12) + 2)
+#endif
+typedef struct _PTK_SG_T{
+ VOID *data;
+ INT len;
+}PKT_SG_T;
+#endif /* TX_PKT_SG */
+/*
+ Packet information for NdisQueryPacket
+*/
+typedef struct _PACKET_INFO {
+ UINT PhysicalBufferCount; /* Physical breaks of buffer descripor chained */
+ UINT BufferCount; /* Number of Buffer descriptor chained */
+ UINT TotalPacketLength ; /* Self explained */
+ PNDIS_BUFFER pFirstBuffer; /* Pointer to first buffer descriptor */
+#ifdef TX_PKT_SG
+ PKT_SG_T sg_list[MAX_SKB_FRAGS];
+#endif /* TX_PKT_SG */
+} PACKET_INFO, *PPACKET_INFO;
+
+
+#define MAC_ADDR_LEN 6
+
+/* 2-byte Frame control field */
+ typedef struct GNU_PACKED {
+
+#ifdef RT_BIG_ENDIAN
+ USHORT Order:1; /* Strict order expected */
+ USHORT Wep:1; /* Wep data */
+ USHORT MoreData:1; /* More data bit */
+ USHORT PwrMgmt:1; /* Power management bit */
+ USHORT Retry:1; /* Retry status bit */
+ USHORT MoreFrag:1; /* More fragment bit */
+ USHORT FrDs:1; /* From DS indication */
+ USHORT ToDs:1; /* To DS indication */
+ USHORT SubType:4; /* MSDU subtype */
+ USHORT Type:2; /* MSDU type */
+ USHORT Ver:2; /* Protocol version */
+#else
+ USHORT Ver:2; /* Protocol version */
+ USHORT Type:2; /* MSDU type */
+ USHORT SubType:4; /* MSDU subtype */
+ USHORT ToDs:1; /* To DS indication */
+ USHORT FrDs:1; /* From DS indication */
+ USHORT MoreFrag:1; /* More fragment bit */
+ USHORT Retry:1; /* Retry status bit */
+ USHORT PwrMgmt:1; /* Power management bit */
+ USHORT MoreData:1; /* More data bit */
+ USHORT Wep:1; /* Wep data */
+ USHORT Order:1; /* Strict order expected */
+#endif /* !RT_BIG_ENDIAN */
+} FRAME_CONTROL, *PFRAME_CONTROL;
+
+
+typedef struct GNU_PACKED _HEADER_802_11 {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+ UCHAR Addr3[MAC_ADDR_LEN];
+#ifdef RT_BIG_ENDIAN
+ USHORT Sequence:12;
+ USHORT Frag:4;
+#else
+ USHORT Frag:4;
+ USHORT Sequence:12;
+#endif /* !RT_BIG_ENDIAN */
+ UCHAR Octet[0];
+} HEADER_802_11, *PHEADER_802_11;
+
+enum {
+ DIDmsg_lnxind_wlansniffrm = 0x00000044,
+ DIDmsg_lnxind_wlansniffrm_hosttime = 0x00010044,
+ DIDmsg_lnxind_wlansniffrm_mactime = 0x00020044,
+ DIDmsg_lnxind_wlansniffrm_channel = 0x00030044,
+ DIDmsg_lnxind_wlansniffrm_rssi = 0x00040044,
+ DIDmsg_lnxind_wlansniffrm_sq = 0x00050044,
+ DIDmsg_lnxind_wlansniffrm_signal = 0x00060044,
+ DIDmsg_lnxind_wlansniffrm_noise = 0x00070044,
+ DIDmsg_lnxind_wlansniffrm_rate = 0x00080044,
+ DIDmsg_lnxind_wlansniffrm_istx = 0x00090044,
+ DIDmsg_lnxind_wlansniffrm_frmlen = 0x000A0044
+};
+enum {
+P80211ENUM_msgitem_status_no_value = 0x00
+};
+
+enum {
+P80211ENUM_truth_false = 0x00,
+P80211ENUM_truth_true = 0x01
+};
+
+
+/* Definition from madwifi */
+typedef struct {
+ UINT32 did;
+ UINT16 status;
+ UINT16 len;
+ UINT32 data;
+} p80211item_uint32_t;
+
+typedef struct {
+ UINT32 msgcode;
+ UINT32 msglen;
+#define WLAN_DEVNAMELEN_MAX 16
+ UINT8 devname[WLAN_DEVNAMELEN_MAX];
+ p80211item_uint32_t hosttime;
+ p80211item_uint32_t mactime;
+ p80211item_uint32_t channel;
+ p80211item_uint32_t rssi;
+ p80211item_uint32_t sq;
+ p80211item_uint32_t signal;
+ p80211item_uint32_t noise;
+ p80211item_uint32_t rate;
+ p80211item_uint32_t istx;
+ p80211item_uint32_t frmlen;
+} wlan_ng_prism2_header;
+
+#ifdef MONITOR_FLAG_11N_SNIFFER_SUPPORT
+/*
+ Note: 2009/11/10
+ Used in WiFi Sigma Test Engine RT3593 (replace RT2883).
+*/
+
+#ifdef RT_BIG_ENDIAN
+typedef struct _ETHEREAL_RADIO {
+ UCHAR Flag_80211n;
+ UCHAR signal_level; /* dBm */
+ UCHAR data_rate; /* rate index */
+ UCHAR channel; /* Channel number */
+} ETHEREAL_RADIO, *PETHEREAL_RADIO;
+#else
+typedef struct _ETHEREAL_RADIO {
+ UCHAR channel; /* Channel number */
+ UCHAR data_rate; /* rate index */
+ UCHAR signal_level; /* dBm */
+ UCHAR Flag_80211n;
+} ETHEREAL_RADIO, *PETHEREAL_RADIO;
+#endif
+
+#define WIRESHARK_11N_FLAG_3x3 0x01
+#define WIRESHARK_11N_FLAG_GF 0x02
+#define WIRESHARK_11N_FLAG_AMPDU 0x04
+#define WIRESHARK_11N_FLAG_STBC 0x08
+#define WIRESHARK_11N_FLAG_SGI 0x10
+#define WIRESHARK_11N_FLAG_BW20U 0x20
+#define WIRESHARK_11N_FLAG_BW20D 0x40
+#define WIRESHARK_11N_FLAG_BW40 0x80
+#endif /* MONITOR_FLAG_11N_SNIFFER_SUPPORT */
+
+
+
+#endif /* __RT_COMM_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_def.h b/cleopatre/devkit/mt7601udrv/include/rtmp_def.h
new file mode 100644
index 0000000000..0b254f09fa
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_def.h
@@ -0,0 +1,1948 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_def.h
+
+ Abstract:
+ Miniport related definition header
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Paul Lin 08-01-2002 created
+ John Chang 08-05-2003 add definition for 11g & other drafts
+*/
+#ifndef __RTMP_DEF_H__
+#define __RTMP_DEF_H__
+
+#include "oid.h"
+
+#undef AP_WSC_INCLUDED
+#undef STA_WSC_INCLUDED
+#undef WSC_INCLUDED
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef WSC_AP_SUPPORT
+#define AP_WSC_INCLUDED
+#endif /* WSC_AP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#if defined(AP_WSC_INCLUDED) || defined(STA_WSC_INCLUDED)
+#define WSC_INCLUDED
+#endif
+
+
+#define BAND_5G 1
+#define BAND_24G 2
+#define BAND_BOTH (BAND_5G | BAND_24G)
+
+
+#ifdef SNMP_SUPPORT
+/* for snmp, to get manufacturer OUI, 2008_0220 */
+#define ManufacturerOUI_LEN 3
+#define ManufacturerNAME ("Ralink Technology Company.")
+#define ResourceTypeIdName ("Ralink_ID")
+#endif
+
+#define RALINK_2883_VERSION ((UINT32)0x28830300)
+#define RALINK_2880E_VERSION ((UINT32)0x28720200)
+#define RALINK_3883_VERSION ((UINT32)0x38830400)
+#define RALINK_3070_VERSION ((UINT32)0x30700200)
+
+#define MAX_RX_PKT_LEN 1520
+
+
+#define PCI_VIRT_TO_PHYS(__Addr) (((UINT32)(__Addr)) & 0x0FFFFFFF)
+
+#ifdef RTMP_MAC_USB
+#define TX_RING_SIZE 8 /* 1 */
+#define PRIO_RING_SIZE 8
+#define MGMT_RING_SIZE 32 /* PRIO_RING_SIZE */
+#ifdef INF_AMAZON_SE
+#define RX_RING_SIZE 1
+#else
+#define RX_RING_SIZE 8
+#endif /* INF_AMAZON_SE */
+#define MAX_TX_PROCESS 4
+#define LOCAL_TXBUF_SIZE 2048
+#endif /* RTMP_MAC_USB */
+
+#ifdef MULTIPLE_CARD_SUPPORT
+/* MC: Multple Cards */
+#define MAX_NUM_OF_MULTIPLE_CARD 32
+#endif /* MULTIPLE_CARD_SUPPORT */
+
+#ifdef MEMORY_OPTIMIZATION
+#define MAX_RX_PROCESS 32
+#else
+#define MAX_RX_PROCESS 128 /*64 //32 */
+#endif
+#define NUM_OF_LOCAL_TXBUF 2
+#define TXD_SIZE 16 /* TXD_SIZE = TxD + TxInfo */
+#define RXD_SIZE 16
+
+#define RXINFO_OFFSET 12
+
+/* TXINFO_SIZE + TXWI_SIZE + 802.11 Header Size + AMSDU sub frame header */
+#define TX_DMA_1ST_BUFFER_SIZE 96 /* only the 1st physical buffer is pre-allocated */
+
+/*#define MGMT_DMA_BUFFER_SIZE 1536 //2048 */
+/*
+ Note 20100212 by SampleLin: do not set MGMT_DMA_BUFFER_SIZE smaller than
+ 1600; Or kernel will crash in deaggregate_AMSDU_announce() for EAPOL packet
+ in enterprise WPA mode.
+*/
+#define MGMT_DMA_BUFFER_SIZE 1600 /*2048 */
+
+#define RX_BUFFER_AGGRESIZE 3840 /*3904 //3968 //4096 //2048 //4096 */
+#define RX_BUFFER_NORMSIZE 3840 /*3904 //3968 //4096 //2048 //4096 */
+#define TX_BUFFER_NORMSIZE RX_BUFFER_NORMSIZE
+#define MAX_FRAME_SIZE 2346 /* Maximum 802.11 frame size */
+#define MAX_AGGREGATION_SIZE 3840 /*3904 //3968 //4096 */
+#define MAX_NUM_OF_TUPLE_CACHE 2
+#define MAX_MCAST_LIST_SIZE 32
+#define MAX_LEN_OF_VENDOR_DESC 64
+/*#define MAX_SIZE_OF_MCAST_PSQ (NUM_OF_LOCAL_TXBUF >> 2) // AP won't spend more than 1/4 of total buffers on M/BCAST PSQ */
+#define MAX_SIZE_OF_MCAST_PSQ 32
+
+#define MAX_RX_PROCESS_CNT (RX_RING_SIZE)
+
+#ifdef WLAN_SKB_RECYCLE
+#define NUM_RX_DESC 128
+#endif /* WLAN_SKB_RECYCLE */
+
+/*
+ WMM Note: If memory of your system is not much, please reduce the definition;
+ or when you do WMM test, the queue for low priority AC will be full, i.e.
+ TX_RING_SIZE + MAX_PACKETS_IN_QUEUE packets for the AC will be buffered in
+ WLAN, maybe no any packet buffer can be got in Ethernet driver.
+
+ Sometimes no packet buffer can be got in Ethernet driver, the system will
+ send flow control packet to the sender to slow down its sending rate.
+ So no WMM can be saw in the air.
+*/
+
+/*
+ Need to use 64 in vxworks for test case WMM A5-T07
+ Two dnlink (10Mbps) from a WMM station to a non-WMM station.
+ If use 256, queue is not enough.
+ And in rt_main_end.c, clConfig.clNum = RX_RING_SIZE * 3; is changed to
+ clConfig.clNum = RX_RING_SIZE * 4;
+*/
+
+#define MAX_PACKETS_IN_MCAST_PS_QUEUE 32
+#define MAX_PACKETS_IN_PS_QUEUE 128 /*32 */
+#define WMM_NUM_OF_AC 4 /* AC0, AC1, AC2, and AC3 */
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef IGMP_SNOOP_SUPPORT
+#ifdef MEMORY_OPTIMIZATION
+#define MAX_LEN_OF_MULTICAST_FILTER_TABLE 16
+#else
+#define MAX_LEN_OF_MULTICAST_FILTER_TABLE 64
+#endif
+/* Size of hash tab must be power of 2. */
+#define MAX_LEN_OF_MULTICAST_FILTER_HASH_TABLE ((MAX_LEN_OF_MULTICAST_FILTER_TABLE) * 2)
+#define FREE_MEMBER_POOL_SIZE 64
+#endif /* IGMP_SNOOP_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+#define MAX_AGG_3SS_BALIMIT 31
+
+/* RxFilter */
+#define STANORMAL 0x17f97
+#define APNORMAL 0x15f97
+
+#ifdef EXT_BUILD_CHANNEL_LIST
+#define MAX_PRECONFIG_DESP_ENTRY_SIZE 11
+#endif /* EXT_BUILD_CHANNEL_LIST */
+
+
+/*
+ RTMP_ADAPTER flags
+*/
+#ifdef CONFIG_MULTI_CHANNEL
+#define fRTMP_ADAPTER_DISABLE_DEQUEUEPACKET 0x00000001
+#else
+#define fRTMP_ADAPTER_MAP_REGISTER 0x00000001
+#endif /*CONFIG_MULTI_CHANNEL*/
+#define fRTMP_ADAPTER_INTERRUPT_IN_USE 0x00000002
+#define fRTMP_HW_ERR 0x00000004
+#define fRTMP_SG 0x00000008 /* Scatter and Gather */
+#define fRTMP_PKT_TX_ERR 0x00000010
+#define fRTMP_ADAPTER_MLME_RESET_IN_PROGRESS 0x00000020
+#define fRTMP_ADAPTER_HALT_IN_PROGRESS 0x00000040
+#define fRTMP_ADAPTER_RESET_IN_PROGRESS 0x00000080
+#define fRTMP_ADAPTER_NIC_NOT_EXIST 0x00000100
+#define fRTMP_ADAPTER_TX_RING_ALLOCATED 0x00000200
+#define fRTMP_ADAPTER_REMOVE_IN_PROGRESS 0x00000400
+#define fRTMP_ADAPTER_MIMORATE_INUSED 0x00000800
+#define fRTMP_ADAPTER_RX_RING_ALLOCATED 0x00001000
+#define fRTMP_ADAPTER_INTERRUPT_ACTIVE 0x00002000
+#define fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS 0x00004000
+#define fRTMP_ADAPTER_REASSOC_IN_PROGRESS 0x00008000
+#define fRTMP_ADAPTER_MEDIA_STATE_PENDING 0x00010000
+#define fRTMP_ADAPTER_RADIO_OFF 0x00020000
+#define fRTMP_ADAPTER_BULKOUT_RESET 0x00040000
+#define fRTMP_ADAPTER_BULKIN_RESET 0x00080000
+#define fRTMP_ADAPTER_RDG_ACTIVE 0x00100000
+#define fRTMP_ADAPTER_DYNAMIC_BE_TXOP_ACTIVE 0x00200000
+#define fRTMP_ADAPTER_RALINK_BURST_MODE 0x00400000
+#define fRTMP_ADAPTER_SUSPEND 0x00800000
+#define fRTMP_ADAPTER_MCU_SEND_IN_BAND_CMD 0x01000000
+#define fRTMP_ADAPTER_CMD_RADIO_OFF 0x02000000
+#define fRTMP_ADAPTER_SCAN_2040 0x04000000
+#define fRTMP_ADAPTER_RADIO_MEASUREMENT 0x08000000
+
+#define fRTMP_ADAPTER_START_UP 0x10000000 /*Devive already initialized and enabled Tx/Rx. */
+#define fRTMP_ADAPTER_MEDIA_STATE_CHANGE 0x20000000
+#define fRTMP_ADAPTER_IDLE_RADIO_OFF 0x40000000
+#define fRTMP_ADAPTER_POLL_IDLE 0x80000000
+
+enum ASIC_CAP{
+ fASIC_CAP_CSO = 0x1,
+ fASIC_CAP_TSO = 0x2,
+
+ fASIC_CAP_PMF_ENC = 0x10,
+};
+#define fRTMP_ADAPTER_WSC_PBC_PIN0 0x00000004
+#define fRTMP_ADAPTER_DISABLE_DOT_11N 0x00000008
+
+enum PHY_CAP{
+ fPHY_CAP_24G = 0x1,
+ fPHY_CAP_5G = 0x2,
+
+ fPHY_CAP_HT = 0x10,
+ fPHY_CAP_VHT = 0x20,
+
+ fPHY_CAP_TXBF = 0x100,
+};
+
+#define PHY_CAP_2G(_x) (((_x) & fPHY_CAP_24G) == fPHY_CAP_24G)
+#define PHY_CAP_5G(_x) (((_x) & fPHY_CAP_5G) == fPHY_CAP_5G)
+
+enum WIFI_MODE{
+ WMODE_INVALID = 0,
+ WMODE_A = 1 << 0,
+ WMODE_B = 1 << 1,
+ WMODE_G = 1 << 2,
+ WMODE_GN = 1 << 3,
+ WMODE_AN = 1 << 4,
+ WMODE_AC = 1 << 5,
+ WMODE_COMP = 6, /* total types of supported wireless mode, add this value once yow add new type */
+};
+
+#define WMODE_CAP_5G(_x) (((_x) & (WMODE_A | WMODE_AN | WMODE_AC)) != 0)
+#define WMODE_CAP_2G(_x) (((_x) & (WMODE_B | WMODE_G | WMODE_GN)) != 0)
+#define WMODE_CAP_N(_x) (((_x) & (WMODE_GN | WMODE_AN)) != 0)
+#define WMODE_CAP_AC(_x) (((_x) & (WMODE_AC)) != 0)
+#define WMODE_CAP(_x, _mode) (((_x) & (_mode)) != 0)
+
+#define WMODE_EQUAL(_x, _mode) ((_x) == (_mode))
+
+#define WMODE_5G_ONLY(_x) (((_x) & (WMODE_B | WMODE_G | WMODE_GN)) == 0)
+#define WMODE_2G_ONLY(_x) (((_x) & (WMODE_A | WMODE_AN | WMODE_AC)) == 0)
+#define WMODE_HT_ONLY(_x) (((_x) & (~(WMODE_GN | WMODE_AN | WMODE_AC))) == 0)
+#define WMODE_VHT_ONLY(_x) (((_x) & (~(WMODE_AC))) == 0)
+
+
+/*
+ STA operation status flags
+*/
+#define fOP_STATUS_INFRA_ON 0x00000001
+#define fOP_STATUS_ADHOC_ON 0x00000002
+#define fOP_STATUS_BG_PROTECTION_INUSED 0x00000004
+#define fOP_STATUS_SHORT_SLOT_INUSED 0x00000008
+#define fOP_STATUS_SHORT_PREAMBLE_INUSED 0x00000010
+#define fOP_STATUS_RECEIVE_DTIM 0x00000020
+/*#define fOP_STATUS_TX_RATE_SWITCH_ENABLED 0x00000040 */
+#define fOP_STATUS_MEDIA_STATE_CONNECTED 0x00000080
+#define fOP_STATUS_WMM_INUSED 0x00000100
+#define fOP_STATUS_AGGREGATION_INUSED 0x00000200
+#define fOP_STATUS_DOZE 0x00000400 /* debug purpose */
+#define fOP_STATUS_PIGGYBACK_INUSED 0x00000800 /* piggy-back, and aggregation */
+#define fOP_STATUS_APSD_INUSED 0x00001000
+#define fOP_STATUS_TX_AMSDU_INUSED 0x00002000
+#define fOP_STATUS_MAX_RETRY_ENABLED 0x00004000
+#define fOP_STATUS_WAKEUP_NOW 0x00008000
+#define fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE 0x00020000
+
+#define fOP_AP_STATUS_MEDIA_STATE_CONNECTED 0x00200000
+
+
+/*
+ RTMP_ADAPTER PSFlags : related to advanced power save
+*/
+/* Indicate whether driver can go to sleep mode from now. This flag is useful AFTER link up */
+#define fRTMP_PS_CAN_GO_SLEEP 0x00000001
+/* Indicate whether driver has issue a LinkControl command to PCIe L1 */
+#define fRTMP_PS_SET_PCI_CLK_OFF_COMMAND 0x00000002
+/* Indicate driver should disable kick off hardware to send packets from now. */
+#define fRTMP_PS_DISABLE_TX 0x00000004
+/* Indicate driver should IMMEDIATELY fo to sleep after receiving AP's beacon in which doesn't indicate unicate nor multicast packets for me */
+/* This flag is used ONLY in RTMPHandleRxDoneInterrupt routine. */
+#define fRTMP_PS_GO_TO_SLEEP_NOW 0x00000008
+#define fRTMP_PS_TOGGLE_L1 0x00000010 /* Use Toggle L1 mechanism for rt28xx PCIe */
+#define fRTMP_PS_MCU_SLEEP 0x00800000
+
+
+#define WAKE_MCU_CMD 0x31
+#define SLEEP_MCU_CMD 0x30
+#define RFOFF_MCU_CMD 0x35
+
+#ifdef DOT11N_DRAFT3
+#define fOP_STATUS_SCAN_2040 0x00040000
+#endif /* DOT11N_DRAFT3 */
+
+#define CCKSETPROTECT 0x1
+#define OFDMSETPROTECT 0x2
+#define MM20SETPROTECT 0x4
+#define MM40SETPROTECT 0x8
+#define GF20SETPROTECT 0x10
+#define GR40SETPROTECT 0x20
+#define ALLN_SETPROTECT (GR40SETPROTECT | GF20SETPROTECT | MM40SETPROTECT | MM20SETPROTECT)
+
+/*
+ AP's client table operation status flags
+*/
+#define fCLIENT_STATUS_WMM_CAPABLE 0x00000001 /* CLIENT can parse QOS DATA frame */
+#define fCLIENT_STATUS_AGGREGATION_CAPABLE 0x00000002 /* CLIENT can receive Ralink's proprietary TX aggregation frame */
+#define fCLIENT_STATUS_PIGGYBACK_CAPABLE 0x00000004 /* CLIENT support piggy-back */
+#define fCLIENT_STATUS_AMSDU_INUSED 0x00000008
+#define fCLIENT_STATUS_SGI20_CAPABLE 0x00000010
+#define fCLIENT_STATUS_SGI40_CAPABLE 0x00000020
+#define fCLIENT_STATUS_TxSTBC_CAPABLE 0x00000040
+#define fCLIENT_STATUS_RxSTBC_CAPABLE 0x00000080
+#define fCLIENT_STATUS_HTC_CAPABLE 0x00000100
+#define fCLIENT_STATUS_RDG_CAPABLE 0x00000200
+#define fCLIENT_STATUS_MCSFEEDBACK_CAPABLE 0x00000400
+#define fCLIENT_STATUS_APSD_CAPABLE 0x00000800 /* UAPSD STATION */
+
+#ifdef DOT11N_DRAFT3
+#define fCLIENT_STATUS_BSSCOEXIST_CAPABLE 0x00001000
+#endif /* DOT11N_DRAFT3 */
+#define fCLIENT_STATUS_SOFTWARE_ENCRYPT 0x00002000 /* Indicate the client encrypt/decrypt by software */
+
+#ifdef DOT11_VHT_AC
+#define fCLIENT_STATUS_SGI80_CAPABLE 0x00010000
+#define fCLIENT_STATUS_SGI160_CAPABLE 0x00020000
+#define fCLIENT_STATUS_VHT_TXSTBC_CAPABLE 0x00040000
+#define fCLIENT_STATUS_VHT_RXSTBC_CAPABLE 0x00080000
+#endif /* DOT11_VHT_AC */
+
+#define fCLIENT_STATUS_RALINK_CHIPSET 0x00100000
+
+#ifdef CLIENT_WDS
+#define fCLIENT_STATUS_CLI_WDS 0x00200000
+#endif /* CLIENT_WDS */
+
+
+/*
+ STA configuration flags
+*/
+/*#define fSTA_CFG_ENABLE_TX_BURST 0x00000001 */
+
+/* 802.11n Operating Mode Definition. 0-3 also used in ASICUPdateProtect switch case */
+#define HT_NO_PROTECT 0
+#define HT_LEGACY_PROTECT 1
+#define HT_40_PROTECT 2
+#define HT_2040_PROTECT 3
+#define HT_RTSCTS_6M 7
+/*following is our own definition in order to turn on our ASIC protection register in INFRASTRUCTURE. */
+#define HT_ATHEROS 8 /* rt2860c has problem with atheros chip. we need to turn on RTS/CTS . */
+#define HT_FORCERTSCTS 9 /* Force turn on RTS/CTS first. then go to evaluate if this force RTS is necessary. */
+
+/*
+ RX Packet Filter control flags. Apply on pAd->PacketFilter
+*/
+#define fRX_FILTER_ACCEPT_DIRECT NDIS_PACKET_TYPE_DIRECTED
+#define fRX_FILTER_ACCEPT_MULTICAST NDIS_PACKET_TYPE_MULTICAST
+#define fRX_FILTER_ACCEPT_BROADCAST NDIS_PACKET_TYPE_BROADCAST
+#define fRX_FILTER_ACCEPT_ALL_MULTICAST NDIS_PACKET_TYPE_ALL_MULTICAST
+#define fRX_FILTER_ACCEPT_PROMISCUOUS NDIS_PACKET_TYPE_PROMISCUOUS
+
+/*
+ Error code section
+*/
+/* NDIS_ERROR_CODE_ADAPTER_NOT_FOUND */
+#define ERRLOG_READ_PCI_SLOT_FAILED 0x00000101L
+#define ERRLOG_WRITE_PCI_SLOT_FAILED 0x00000102L
+#define ERRLOG_VENDOR_DEVICE_NOMATCH 0x00000103L
+
+/* NDIS_ERROR_CODE_ADAPTER_DISABLED */
+#define ERRLOG_BUS_MASTER_DISABLED 0x00000201L
+
+/* NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION */
+#define ERRLOG_INVALID_SPEED_DUPLEX 0x00000301L
+#define ERRLOG_SET_SECONDARY_FAILED 0x00000302L
+
+/* NDIS_ERROR_CODE_OUT_OF_RESOURCES */
+#define ERRLOG_OUT_OF_MEMORY 0x00000401L
+#define ERRLOG_OUT_OF_SHARED_MEMORY 0x00000402L
+#define ERRLOG_OUT_OF_MAP_REGISTERS 0x00000403L
+#define ERRLOG_OUT_OF_BUFFER_POOL 0x00000404L
+#define ERRLOG_OUT_OF_NDIS_BUFFER 0x00000405L
+#define ERRLOG_OUT_OF_PACKET_POOL 0x00000406L
+#define ERRLOG_OUT_OF_NDIS_PACKET 0x00000407L
+#define ERRLOG_OUT_OF_LOOKASIDE_MEMORY 0x00000408L
+
+/* NDIS_ERROR_CODE_HARDWARE_FAILURE */
+#define ERRLOG_SELFTEST_FAILED 0x00000501L
+#define ERRLOG_INITIALIZE_ADAPTER 0x00000502L
+#define ERRLOG_REMOVE_MINIPORT 0x00000503L
+
+/* NDIS_ERROR_CODE_RESOURCE_CONFLICT */
+#define ERRLOG_MAP_IO_SPACE 0x00000601L
+#define ERRLOG_QUERY_ADAPTER_RESOURCES 0x00000602L
+#define ERRLOG_NO_IO_RESOURCE 0x00000603L
+#define ERRLOG_NO_INTERRUPT_RESOURCE 0x00000604L
+#define ERRLOG_NO_MEMORY_RESOURCE 0x00000605L
+
+/* WDS definition */
+#define MAX_WDS_ENTRY 4
+#define WDS_PAIRWISE_KEY_OFFSET 60 /* WDS links uses pairwise key#60 ~ 63 in ASIC pairwise key table */
+
+#define WDS_DISABLE_MODE 0
+#define WDS_RESTRICT_MODE 1
+#define WDS_BRIDGE_MODE 2
+#define WDS_REPEATER_MODE 3
+#define WDS_LAZY_MODE 4
+
+#define MAX_MESH_NUM 0
+
+#define MAX_APCLI_NUM 0
+#ifdef APCLI_SUPPORT
+#undef MAX_APCLI_NUM
+#define MAX_APCLI_NUM 1
+#endif /* APCLI_SUPPORT */
+
+#define MAX_P2P_NUM 0
+
+#define MAX_MBSSID_NUM(__pAd) 1
+
+
+#ifdef MBSS_SUPPORT
+#undef MAX_MBSSID_NUM
+
+#define HW_BEACON_MAX_COUNT(__pAd) ((__pAd)->chipCap.BcnMaxHwNum)
+#define MAX_MBSSID_NUM(__pAd) ((__pAd)->chipCap.BcnMaxNum)
+
+#else
+#define HW_BEACON_MAX_COUNT(__pAd) 8
+#endif /* MBSS_SUPPORT */
+
+#define HW_BEACON_MAX_NUM 16
+
+/* sanity check for apidx */
+#define MBSS_MR_APIDX_SANITY_CHECK(__pAd, apidx) \
+ { if ((apidx >= MAX_MBSSID_NUM(__pAd)) || \
+ (apidx >= HW_BEACON_MAX_NUM)) { \
+ DBGPRINT(RT_DEBUG_ERROR, ("%s> Error! apidx = %d > MAX_MBSSID_NUM!\n", __FUNCTION__, apidx)); \
+ apidx = MAIN_MBSSID; } }
+
+#define VALID_WCID(_wcid) ((_wcid) > 0 && (_wcid) < MAX_LEN_OF_MAC_TABLE )
+
+#define VALID_MBSS(_pAd, _apidx) ((_apidx < MAX_MBSSID_NUM(_pAd)) && (_apidx < HW_BEACON_MAX_NUM))
+
+#define MAX_BEACON_SIZE 512
+
+
+#define HW_RESERVED_WCID(__pAd) ((__pAd)->chipCap.WcidHwRsvNum)
+
+/* Then dedicate wcid of DFS and Carrier-Sense. */
+#define DFS_CTS_WCID(__pAd) (HW_RESERVED_WCID(__pAd) - 1)
+#define CS_CTS_WCID(__pAd) (HW_RESERVED_WCID(__pAd) - 2)
+#define LAST_SPECIFIC_WCID(__pAd) (HW_RESERVED_WCID(__pAd) - 2)
+
+/* If MAX_MBSSID_NUM is 8, the maximum available wcid for the associated STA is 211. */
+/* If MAX_MBSSID_NUM is 7, the maximum available wcid for the associated STA is 228. */
+#define MAX_AVAILABLE_CLIENT_WCID(__pAd) (LAST_SPECIFIC_WCID(__pAd) - MAX_MBSSID_NUM(__pAd) - 1)
+
+/* TX need WCID to find Cipher Key */
+/* these wcid 212 ~ 219 are reserved for bc/mc packets if MAX_MBSSID_NUM is 8. */
+#define GET_GroupKey_WCID(__pAd, __wcid, __bssidx) \
+ { \
+ __wcid = LAST_SPECIFIC_WCID(__pAd) - (MAX_MBSSID_NUM(__pAd)) + __bssidx; \
+ }
+
+/*#define IsGroupKeyWCID(__pAd, __wcid) (((__wcid) < LAST_SPECIFIC_WCID) && ((__wcid) >= (LAST_SPECIFIC_WCID - (MAX_MBSSID_NUM(__pAd))))) */
+
+/* definition to support multiple BSSID */
+#define BSS0 0
+#define BSS1 1
+#define BSS2 2
+#define BSS3 3
+#define BSS4 4
+#define BSS5 5
+#define BSS6 6
+#define BSS7 7
+
+/*============================================================ */
+/* Length definitions */
+#define PEER_KEY_NO 2
+#define TIMESTAMP_LEN 8
+#define MAX_LEN_OF_SUPPORTED_RATES MAX_LENGTH_OF_SUPPORT_RATES /* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */
+#define MAX_NUM_OF_REGULATORY_CLASS 16
+#define MAX_LEN_OF_KEY 32 /* 32 octets == 256 bits, Redefine for WPA */
+/* #define MAX_NUM_OF_CHANNELS MAX_NUM_OF_CHS */ /* 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL termination */
+#define MAX_NUM_OF_11JCHANNELS 20 /* 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL termination */
+#define MAX_LEN_OF_SSID 32
+#define CIPHER_TEXT_LEN 128
+#define HASH_TABLE_SIZE 256 /* Size of hash tab must be power of 2. */
+#define MAX_VIE_LEN 1024 /* New for WPA cipher suite variable IE sizes. */
+#define MAX_SUPPORT_MCS 32
+#define MAX_NUM_OF_BBP_LATCH 256
+#undef MAX_NUM_OF_BBP_LATCH
+#define MAX_NUM_OF_BBP_LATCH 255
+
+#define MAX_LEN_OF_CCK_RATES 4
+#define MAX_LEN_OF_OFDM_RATES 8
+#define MAX_LEN_OF_HT_RATES 24
+#ifdef DOT11_VHT_AC
+#define MAX_LEN_OF_VHT_RATES 16
+#endif /* DOT11_VHT_AC */
+#define SUPPORT_CCK_MODE 1
+#define SUPPORT_OFDM_MODE 2
+#define SUPPORT_HT_MODE 4
+#define SUPPORT_VHT_MODE 8
+
+/*============================================================ */
+/* ASIC WCID Table definition. */
+/*============================================================ */
+#define BSSID_WCID 1 /* in infra mode, always put bssid with this WCID */
+#define MCAST_WCID 0x0
+#define BSS0Mcast_WCID 0x0
+#define BSS1Mcast_WCID 0xf8
+#define BSS2Mcast_WCID 0xf9
+#define BSS3Mcast_WCID 0xfa
+#define BSS4Mcast_WCID 0xfb
+#define BSS5Mcast_WCID 0xfc
+#define BSS6Mcast_WCID 0xfd
+#define BSS7Mcast_WCID 0xfe
+#define RESERVED_WCID 0xff
+
+#define MAX_NUM_OF_ACL_LIST MAX_NUMBER_OF_ACL
+
+#define MAX_LEN_OF_MAC_TABLE MAX_NUMBER_OF_MAC /* if MAX_MBSSID_NUM is 8, this value can't be larger than 211 */
+
+/*#if MAX_LEN_OF_MAC_TABLE>MAX_AVAILABLE_CLIENT_WCID */
+/*#error MAX_LEN_OF_MAC_TABLE can not be larger than MAX_AVAILABLE_CLIENT_WCID!!!! */
+/*#endif */
+
+#define MAX_NUM_OF_WDS_LINK_PERBSSID 3
+/*#define MAX_NUM_OF_WDS_LINK (MAX_NUM_OF_WDS_LINK_PERBSSID*MAX_MBSSID_NUM) // no use */
+#define MAX_NUM_OF_EVENT MAX_NUMBER_OF_EVENT
+#define WDS_LINK_START_WCID (MAX_LEN_OF_MAC_TABLE-1)
+
+#define NUM_OF_TID 8
+#define MAX_AID_BA 4
+#define MAX_LEN_OF_BA_REC_TABLE ((NUM_OF_TID * MAX_LEN_OF_MAC_TABLE)/2) /* (NUM_OF_TID*MAX_AID_BA + 32) //Block ACK recipient */
+#define MAX_LEN_OF_BA_ORI_TABLE ((NUM_OF_TID * MAX_LEN_OF_MAC_TABLE)/2) /* (NUM_OF_TID*MAX_AID_BA + 32) // Block ACK originator */
+#ifdef MEMORY_OPTIMIZATION
+#define MAX_LEN_OF_BSS_TABLE 1
+#define MAX_REORDERING_MPDU_NUM 256
+#else
+#define MAX_LEN_OF_BSS_TABLE 128 /* 64 */
+#define MAX_REORDERING_MPDU_NUM 512
+#endif
+
+/* key related definitions */
+#define SHARE_KEY_NUM 4
+#define MAX_LEN_OF_SHARE_KEY 16 /* byte count */
+#define MAX_LEN_OF_PEER_KEY 16 /* byte count */
+#define PAIRWISE_KEY_NUM 64 /* in MAC ASIC pairwise key table */
+#define GROUP_KEY_NUM 4
+#define PMK_LEN 32
+#define WDS_PAIRWISE_KEY_OFFSET 60 /* WDS links uses pairwise key#60 ~ 63 in ASIC pairwise key table */
+#define PMKID_NO 4 /* Number of PMKID saved supported */
+#define MAX_LEN_OF_MLME_BUFFER 2048
+
+/* power status related definitions */
+#define PWR_ACTIVE 0
+#define PWR_SAVE 1
+#define PWR_MMPS 2 /*MIMO power save */
+/*#define PWR_UNKNOWN 2 */
+
+#define PS_LEVEL_NONE 0
+#define PS_LEVEL_NORMAL 1
+#define PS_LEVEL_MAX 2
+
+/* Auth and Assoc mode related definitions */
+#define AUTH_MODE_OPEN 0x00
+#define AUTH_MODE_KEY 0x01
+/*#define AUTH_MODE_AUTO_SWITCH 0x03 */
+/*#define AUTH_MODE_DEAUTH 0x04 */
+/*#define AUTH_MODE_UPLAYER 0x05 // reserved for 802.11i use */
+
+/* BSS Type definitions */
+#define BSS_ADHOC 0 /* = Ndis802_11IBSS */
+#define BSS_INFRA 1 /* = Ndis802_11Infrastructure */
+#define BSS_ANY 2 /* = Ndis802_11AutoUnknown */
+#define BSS_MONITOR 3 /* = Ndis802_11Monitor */
+
+/* Reason code definitions */
+#define REASON_RESERVED 0
+#define REASON_UNSPECIFY 1
+#define REASON_NO_LONGER_VALID 2
+#define REASON_DEAUTH_STA_LEAVING 3
+#define REASON_DISASSOC_INACTIVE 4
+#define REASON_DISASSPC_AP_UNABLE 5
+#define REASON_CLS2ERR 6
+#define REASON_CLS3ERR 7
+#define REASON_DISASSOC_STA_LEAVING 8
+#define REASON_STA_REQ_ASSOC_NOT_AUTH 9
+#define REASON_INVALID_IE 13
+#define REASON_MIC_FAILURE 14
+#define REASON_4_WAY_TIMEOUT 15
+#define REASON_GROUP_KEY_HS_TIMEOUT 16
+#define REASON_IE_DIFFERENT 17
+#define REASON_MCIPHER_NOT_VALID 18
+#define REASON_UCIPHER_NOT_VALID 19
+#define REASON_AKMP_NOT_VALID 20
+#define REASON_UNSUPPORT_RSNE_VER 21
+#define REASON_INVALID_RSNE_CAP 22
+#define REASON_8021X_AUTH_FAIL 23
+#define REASON_CIPHER_SUITE_REJECTED 24
+#define REASON_DECLINED 37
+
+#define REASON_QOS_UNSPECIFY 32
+#define REASON_QOS_LACK_BANDWIDTH 33
+#define REASON_POOR_CHANNEL_CONDITION 34
+#define REASON_QOS_OUTSIDE_TXOP_LIMITION 35
+#define REASON_QOS_QSTA_LEAVING_QBSS 36
+#define REASON_QOS_UNWANTED_MECHANISM 37
+#define REASON_QOS_MECH_SETUP_REQUIRED 38
+#define REASON_QOS_REQUEST_TIMEOUT 39
+#define REASON_QOS_CIPHER_NOT_SUPPORT 45
+
+
+#define REASON_FT_INVALID_FTIE 55
+
+/* Status code definitions */
+#define MLME_SUCCESS 0
+#define MLME_UNSPECIFY_FAIL 1
+#define MLME_CANNOT_SUPPORT_CAP 10
+#define MLME_REASSOC_DENY_ASSOC_EXIST 11
+#define MLME_ASSOC_DENY_OUT_SCOPE 12
+#define MLME_ALG_NOT_SUPPORT 13
+#define MLME_SEQ_NR_OUT_OF_SEQUENCE 14
+#define MLME_REJ_CHALLENGE_FAILURE 15
+#define MLME_REJ_TIMEOUT 16
+#define MLME_ASSOC_REJ_UNABLE_HANDLE_STA 17
+#define MLME_ASSOC_REJ_DATA_RATE 18
+
+#define MLME_ASSOC_REJ_NO_EXT_RATE 22
+#define MLME_ASSOC_REJ_NO_EXT_RATE_PBCC 23
+#define MLME_ASSOC_REJ_NO_CCK_OFDM 24
+
+
+#define MLME_QOS_UNSPECIFY 32
+#define MLME_REQUEST_DECLINED 37
+#define MLME_REQUEST_WITH_INVALID_PARAM 38
+#define MLME_INVALID_INFORMATION_ELEMENT 40
+#define MLME_INVALID_GROUP_CIPHER 41
+#define MLME_INVALID_PAIRWISE_CIPHER 42
+#define MLME_INVALID_AKMP 43
+#define MLME_NOT_SUPPORT_RSN_VERSION 44
+#define MLME_INVALID_RSN_CAPABILITIES 45
+#define MLME_INVALID_SECURITY_POLICY 46 /* Cipher suite rejected because of security policy */
+#define MLME_DLS_NOT_ALLOW_IN_QBSS 48
+#define MLME_DEST_STA_NOT_IN_QBSS 49
+#define MLME_DEST_STA_IS_NOT_A_QSTA 50
+
+#define MLME_INVALID_FORMAT 0x51
+#define MLME_FAIL_NO_RESOURCE 0x52
+#define MLME_STATE_MACHINE_REJECT 0x53
+#define MLME_MAC_TABLE_FAIL 0x54
+
+/* IE code */
+#define IE_SSID 0
+#define IE_SUPP_RATES 1
+#define IE_FH_PARM 2
+#define IE_DS_PARM 3
+#define IE_CF_PARM 4
+#define IE_TIM 5
+#define IE_IBSS_PARM 6
+#define IE_COUNTRY 7 /* 802.11d */
+#define IE_802_11D_REQUEST 10 /* 802.11d */
+#define IE_QBSS_LOAD 11 /* 802.11e d9 */
+#define IE_EDCA_PARAMETER 12 /* 802.11e d9 */
+#define IE_TSPEC 13 /* 802.11e d9 */
+#define IE_TCLAS 14 /* 802.11e d9 */
+#define IE_SCHEDULE 15 /* 802.11e d9 */
+#define IE_CHALLENGE_TEXT 16
+#define IE_POWER_CONSTRAINT 32 /* 802.11h d3.3 */
+#define IE_POWER_CAPABILITY 33 /* 802.11h d3.3 */
+#define IE_TPC_REQUEST 34 /* 802.11h d3.3 */
+#define IE_TPC_REPORT 35 /* 802.11h d3.3 */
+#define IE_SUPP_CHANNELS 36 /* 802.11h d3.3 */
+#define IE_CHANNEL_SWITCH_ANNOUNCEMENT 37 /* 802.11h d3.3 */
+#define IE_MEASUREMENT_REQUEST 38 /* 802.11h d3.3 */
+#define IE_MEASUREMENT_REPORT 39 /* 802.11h d3.3 */
+#define IE_QUIET 40 /* 802.11h d3.3 */
+#define IE_IBSS_DFS 41 /* 802.11h d3.3 */
+#define IE_ERP 42 /* 802.11g */
+#define IE_TS_DELAY 43 /* 802.11e d9 */
+#define IE_TCLAS_PROCESSING 44 /* 802.11e d9 */
+#define IE_QOS_CAPABILITY 46 /* 802.11e d6 */
+#define IE_HT_CAP 45 /* 802.11n d1. HT CAPABILITY. ELEMENT ID TBD */
+#define IE_AP_CHANNEL_REPORT 51 /* 802.11k d6 */
+#define IE_HT_CAP2 52 /* 802.11n d1. HT CAPABILITY. ELEMENT ID TBD */
+#define IE_RSN 48 /* 802.11i d3.0 */
+#define IE_WPA2 48 /* WPA2 */
+#define IE_EXT_SUPP_RATES 50 /* 802.11g */
+#define IE_TIMEOUT_INTERVAL 56 /* 802.11w */
+#define IE_SUPP_REG_CLASS 59 /* 802.11y. Supported regulatory classes. */
+#define IE_EXT_CHANNEL_SWITCH_ANNOUNCEMENT 60 /* 802.11n */
+#define IE_ADD_HT 61 /* 802.11n d1. ADDITIONAL HT CAPABILITY. ELEMENT ID TBD */
+#define IE_ADD_HT2 53 /* 802.11n d1. ADDITIONAL HT CAPABILITY. ELEMENT ID TBD */
+
+/* For 802.11n D3.03 */
+/*#define IE_NEW_EXT_CHA_OFFSET 62 // 802.11n d1. New extension channel offset elemet */
+#define IE_SECONDARY_CH_OFFSET 62 /* 802.11n D3.03 Secondary Channel Offset element */
+#define IE_WAPI 68 /* WAPI information element. Same as Bss Ac Access Dealy Element. */
+#define IE_2040_BSS_COEXIST 72 /* 802.11n D3.0.3 */
+#define IE_2040_BSS_INTOLERANT_REPORT 73 /* 802.11n D3.03 */
+#define IE_OVERLAPBSS_SCAN_PARM 74 /* 802.11n D3.03 */
+#define IE_CHANNEL_USAGE 97 /* Cisco advertises suggested channel using this IE. */
+#define IE_TIME_ZONE 98 /* 802.11V */
+#define IE_INTERWORKING 107 /* 802.11u */
+#define IE_ADVERTISEMENT_PROTO 108 /* 802.11u */
+#define IE_QOS_MAP_SET 110 /* 802.11u */
+#define IE_ROAMING_CONSORTIUM 111 /* 802.11u */
+#define IE_EXT_CAPABILITY 127 /* 802.11n D3.03 */
+
+#define IE_WPA 221 /* WPA */
+#define IE_VENDOR_SPECIFIC 221 /* Wifi WMM (WME) */
+#define IE_WFA_WSC 221
+
+#define OUI_BROADCOM_HT 51 /* */
+#define OUI_BROADCOM_HTADD 52 /* */
+#define OUI_PREN_HT_CAP 51 /* */
+#define OUI_PREN_ADD_HT 52 /* */
+
+/* CCX information */
+#define IE_AIRONET_CKIP 133 /* CCX1.0 ID 85H for CKIP */
+#define IE_AP_TX_POWER 150 /* CCX 2.0 for AP transmit power */
+#define IE_MEASUREMENT_CAPABILITY 221 /* CCX 2.0 */
+#define IE_CCX_V2 221
+#define IE_AIRONET_IPADDRESS 149 /* CCX ID 95H for IP Address */
+#define IE_AIRONET_CCKMREASSOC 156 /* CCX ID 9CH for CCKM Reassociation Request element */
+#define CKIP_NEGOTIATION_LENGTH 30
+#define AIRONET_IPADDRESS_LENGTH 10
+#define AIRONET_CCKMREASSOC_LENGTH 24
+
+/* ======================================================== */
+/* MLME state machine definition */
+/* ======================================================== */
+
+/* STA MLME state mahcines */
+#define ASSOC_STATE_MACHINE 1
+#define AUTH_STATE_MACHINE 2
+#define AUTH_RSP_STATE_MACHINE 3
+#define SYNC_STATE_MACHINE 4
+#define MLME_CNTL_STATE_MACHINE 5
+#define WPA_PSK_STATE_MACHINE 6
+/*#define LEAP_STATE_MACHINE 7 */
+#define AIRONET_STATE_MACHINE 8
+#define ACTION_STATE_MACHINE 9
+
+/* AP MLME state machines */
+#define AP_ASSOC_STATE_MACHINE 11
+#define AP_AUTH_STATE_MACHINE 12
+#define AP_SYNC_STATE_MACHINE 14
+#define AP_CNTL_STATE_MACHINE 15
+#define WSC_STATE_MACHINE 17
+#define WSC_UPNP_STATE_MACHINE 18
+
+#ifdef CONFIG_AP_SUPPORT
+#ifdef APCLI_SUPPORT
+#define APCLI_AUTH_STATE_MACHINE 19
+#define APCLI_ASSOC_STATE_MACHINE 20
+#define APCLI_SYNC_STATE_MACHINE 21
+#define APCLI_CTRL_STATE_MACHINE 22
+#endif /* APCLI_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+
+#define WPA_STATE_MACHINE 23
+
+
+#ifdef QOS_DLS_SUPPORT
+#define DLS_STATE_MACHINE 26
+#endif /* QOS_DLS_SUPPORT */
+
+
+
+
+
+
+
+/*
+ STA's CONTROL/CONNECT state machine: states, events, total function #
+*/
+#define CNTL_IDLE 0
+#define CNTL_WAIT_DISASSOC 1
+#define CNTL_WAIT_JOIN 2
+#define CNTL_WAIT_REASSOC 3
+#define CNTL_WAIT_START 4
+#define CNTL_WAIT_AUTH 5
+#define CNTL_WAIT_ASSOC 6
+#define CNTL_WAIT_AUTH2 7
+#define CNTL_WAIT_OID_LIST_SCAN 8
+#define CNTL_WAIT_OID_DISASSOC 9
+#define CNTL_WAIT_SCAN_FOR_CONNECT 10
+
+
+#define MT2_ASSOC_CONF 34
+#define MT2_AUTH_CONF 35
+#define MT2_DEAUTH_CONF 36
+#define MT2_DISASSOC_CONF 37
+#define MT2_REASSOC_CONF 38
+#define MT2_PWR_MGMT_CONF 39
+#define MT2_JOIN_CONF 40
+#define MT2_SCAN_CONF 41
+#define MT2_START_CONF 42
+#define MT2_GET_CONF 43
+#define MT2_SET_CONF 44
+#define MT2_RESET_CONF 45
+#define MT2_FT_OTD_CONF 46
+#define MT2_MLME_ROAMING_REQ 52
+
+#define CNTL_FUNC_SIZE 1
+
+/*
+ STA's ASSOC state machine: states, events, total function #
+*/
+#define ASSOC_IDLE 0
+#define ASSOC_WAIT_RSP 1
+#define REASSOC_WAIT_RSP 2
+#define DISASSOC_WAIT_RSP 3
+#define MAX_ASSOC_STATE 4
+
+#define ASSOC_MACHINE_BASE 0
+#define MT2_MLME_ASSOC_REQ 0
+#define MT2_MLME_REASSOC_REQ 1
+#define MT2_MLME_DISASSOC_REQ 2
+#define MT2_PEER_DISASSOC_REQ 3
+#define MT2_PEER_ASSOC_REQ 4
+#define MT2_PEER_ASSOC_RSP 5
+#define MT2_PEER_REASSOC_REQ 6
+#define MT2_PEER_REASSOC_RSP 7
+#define MT2_DISASSOC_TIMEOUT 8
+#define MT2_ASSOC_TIMEOUT 9
+#define MT2_REASSOC_TIMEOUT 10
+#define MAX_ASSOC_MSG 11
+
+#define ASSOC_FUNC_SIZE (MAX_ASSOC_STATE * MAX_ASSOC_MSG)
+
+/*
+ ACT state machine: states, events, total function #
+*/
+#define ACT_IDLE 0
+#define MAX_ACT_STATE 1
+
+#define ACT_MACHINE_BASE 0
+
+/*
+ Those PEER_xx_CATE number is based on real Categary value in IEEE spec.
+ Please doesn't modify it by yourself.
+ */
+/*Category */
+#define MT2_PEER_SPECTRUM_CATE 0
+#define MT2_PEER_QOS_CATE 1
+#define MT2_PEER_DLS_CATE 2
+#define MT2_PEER_BA_CATE 3
+#define MT2_PEER_PUBLIC_CATE 4
+#define MT2_PEER_RM_CATE 5
+/* "FT_CATEGORY_BSS_TRANSITION equal to 6" is defined file of "dot11r_ft.h" */
+#define MT2_PEER_HT_CATE 7 /* 7.4.7 */
+#define MT2_PEER_PMF_CATE 8 /* defined in IEEE 802.11w-D8.0 7.3.1.11 */
+#define MT2_PEER_RESV_9 9
+#define MT2_PEER_RESV_10 10
+#define MT2_PEER_RESV_11 11
+#define MT2_PEER_RESV_12 12
+#define MT2_PEER_RESV_13 13
+#define MT2_PEER_RESV_14 14
+#define MT2_PEER_RESV_15 15
+#define MT2_PEER_RESV_16 16
+/*
+ In WMM spec v1.1. the category must be 17
+ (see Table 7 Management Action Frame Fields)
+*/
+#define MT2_PEER_WMM 17
+#define MAX_IEEE_STD_CATE 17 /* Indicate the maximum category code defined in IEEE-802.11-Std */
+#define MAX_PEER_CATE_MSG MAX_IEEE_STD_CATE
+
+#define MT2_MLME_ADD_BA_CATE (MAX_IEEE_STD_CATE + 1)
+#define MT2_MLME_ORI_DELBA_CATE (MAX_IEEE_STD_CATE + 2)
+#define MT2_MLME_REC_DELBA_CATE (MAX_IEEE_STD_CATE + 3)
+#define MT2_MLME_QOS_CATE (MAX_IEEE_STD_CATE + 4)
+#define MT2_MLME_DLS_CATE (MAX_IEEE_STD_CATE + 5)
+#define MT2_ACT_INVALID (MAX_IEEE_STD_CATE + 6)
+
+#define MAX_ACT_MSG (MAX_IEEE_STD_CATE + 7)
+
+
+#define MT2_ACT_VENDOR 0x7F
+
+/* Category field */
+#define CATEGORY_SPECTRUM 0
+#define CATEGORY_QOS 1
+#define CATEGORY_DLS 2
+#define CATEGORY_BA 3
+#define CATEGORY_PUBLIC 4
+#define CATEGORY_RM 5
+#define CATEGORY_FT 6
+#define CATEGORY_HT 7
+
+
+/* DLS Action frame definition */
+#define ACTION_DLS_REQUEST 0
+#define ACTION_DLS_RESPONSE 1
+#define ACTION_DLS_TEARDOWN 2
+
+/* Spectrum Action field value 802.11h 7.4.1 */
+#define SPEC_MRQ 0 /* Request */
+#define SPEC_MRP 1 /*Report */
+#define SPEC_TPCRQ 2
+#define SPEC_TPCRP 3
+#define SPEC_CHANNEL_SWITCH 4
+
+/* BA Action field value */
+#define ADDBA_REQ 0
+#define ADDBA_RESP 1
+#define DELBA 2
+
+/* Public's Action field value in Public Category. Some in 802.11y and some in 11n */
+#define ACTION_BSS_2040_COEXIST 0 /* 11n */
+#define ACTION_DSE_ENABLEMENT 1 /* 11y D9.0 */
+#define ACTION_DSE_DEENABLEMENT 2 /* 11y D9.0 */
+#define ACTION_DSE_REG_LOCATION_ANNOUNCE 3 /* 11y D9.0 */
+#define ACTION_EXT_CH_SWITCH_ANNOUNCE 4 /* 11y D9.0 */
+#define ACTION_DSE_MEASUREMENT_REQ 5 /* 11y D9.0 */
+#define ACTION_DSE_MEASUREMENT_REPORT 6 /* 11y D9.0 */
+#define ACTION_MEASUREMENT_PILOT_ACTION 7 /* 11y D9.0 */
+#define ACTION_DSE_POWER_CONSTRAINT 8 /* 11y D9.0 */
+#define ACTION_WIFI_DIRECT 9 /* 11y */
+#define ACTION_GAS_INITIAL_REQ 10 /* 11U */
+#define ACTION_GAS_INITIAL_RSP 11 /* 11U */
+#define ACTION_GAS_COMEBACK_REQ 12 /* 11U */
+#define ACTION_GAS_COMEBACK_RSP 13 /* 11U */
+#define ACTION_TDLS_DISCOVERY_RSP 14 /* 11z D13.0 */
+#define ACTION_VENDOR_USAGE 221
+
+/*HT Action field value */
+#define NOTIFY_BW_ACTION 0
+#define SMPS_ACTION 1
+#define PSMP_ACTION 2
+#define SETPCO_ACTION 3
+#define MIMO_CHA_MEASURE_ACTION 4
+#define MIMO_N_BEACONFORM 5 /* non-compressed beamforming report */
+#define MIMO_BEACONFORM 6 /* compressed beamforming report */
+#define ANTENNA_SELECT 7
+#define HT_INFO_EXCHANGE 8
+
+#define ACT_FUNC_SIZE (MAX_ACT_STATE * MAX_ACT_MSG)
+/*
+ STA's AUTHENTICATION state machine: states, evvents, total function #
+*/
+#define AUTH_REQ_IDLE 0
+#define AUTH_WAIT_SEQ2 1
+#define AUTH_WAIT_SEQ4 2
+#define MAX_AUTH_STATE 3
+
+#define AUTH_MACHINE_BASE 0
+#define MT2_MLME_AUTH_REQ 0
+#define MT2_PEER_AUTH_EVEN 1
+#define MT2_AUTH_TIMEOUT 2
+#define MAX_AUTH_MSG 3
+
+#define AUTH_FUNC_SIZE (MAX_AUTH_STATE * MAX_AUTH_MSG)
+
+/*
+ STA's AUTH_RSP state machine: states, events, total function #
+*/
+#define AUTH_RSP_IDLE 0
+#define AUTH_RSP_WAIT_CHAL 1
+#define MAX_AUTH_RSP_STATE 2
+
+#define AUTH_RSP_MACHINE_BASE 0
+#define MT2_AUTH_CHALLENGE_TIMEOUT 0
+#define MT2_PEER_AUTH_ODD 1
+#define MT2_PEER_DEAUTH 2
+#define MAX_AUTH_RSP_MSG 3
+
+#define AUTH_RSP_FUNC_SIZE (MAX_AUTH_RSP_STATE * MAX_AUTH_RSP_MSG)
+
+/*
+ STA's SYNC state machine: states, events, total function #
+*/
+#define SYNC_IDLE 0 /* merge NO_BSS,IBSS_IDLE,IBSS_ACTIVE and BSS in to 1 state */
+#define JOIN_WAIT_BEACON 1
+#define SCAN_LISTEN 2
+#define SCAN_PENDING 3
+#define MAX_SYNC_STATE 4
+
+#define SYNC_MACHINE_BASE 0
+#define MT2_MLME_SCAN_REQ 0
+#define MT2_MLME_JOIN_REQ 1
+#define MT2_MLME_START_REQ 2
+#define MT2_PEER_BEACON 3
+#define MT2_PEER_PROBE_RSP 4
+#define MT2_PEER_ATIM 5
+#define MT2_SCAN_TIMEOUT 6
+#define MT2_BEACON_TIMEOUT 7
+#define MT2_ATIM_TIMEOUT 8
+#define MT2_PEER_PROBE_REQ 9
+#define MT2_MLME_FORCE_JOIN_REQ 10
+#define MT2_MLME_FORCE_SCAN_REQ 11
+#define MAX_SYNC_MSG 12
+
+#define SYNC_FUNC_SIZE (MAX_SYNC_STATE * MAX_SYNC_MSG)
+
+/*Messages for the DLS state machine */
+#define DLS_IDLE 0
+#define MAX_DLS_STATE 1
+
+#define DLS_MACHINE_BASE 0
+#define MT2_MLME_DLS_REQ 0
+#define MT2_PEER_DLS_REQ 1
+#define MT2_PEER_DLS_RSP 2
+#define MT2_MLME_DLS_TEAR_DOWN 3
+#define MT2_PEER_DLS_TEAR_DOWN 4
+#define MAX_DLS_MSG 5
+
+#define DLS_FUNC_SIZE (MAX_DLS_STATE * MAX_DLS_MSG)
+
+
+/*
+ WSC State machine: states, events, total function #
+*/
+#ifdef WSC_INCLUDED
+/*Messages for the WSC State machine */
+#define WSC_IDLE 0
+#define MAX_WSC_STATE 1
+#define WSC_FUNC_SIZE (MAX_WSC_STATE * MAX_WSC_MSG)
+
+#endif /* WSC_INCLUDED */
+
+/*
+ AP's CONTROL/CONNECT state machine: states, events, total function #
+*/
+#define AP_CNTL_FUNC_SIZE 1
+
+/*
+ AP's ASSOC state machine: states, events, total function #
+*/
+#define AP_ASSOC_IDLE 0
+#define AP_MAX_ASSOC_STATE 1
+
+#define AP_ASSOC_MACHINE_BASE 0
+#define APMT2_MLME_DISASSOC_REQ 0
+#define APMT2_PEER_DISASSOC_REQ 1
+#define APMT2_PEER_ASSOC_REQ 2
+#define APMT2_PEER_REASSOC_REQ 3
+#define APMT2_CLS3ERR 4
+#define AP_MAX_ASSOC_MSG 5
+
+#define AP_ASSOC_FUNC_SIZE (AP_MAX_ASSOC_STATE * AP_MAX_ASSOC_MSG)
+
+/*
+ AP's AUTHENTICATION state machine: states, events, total function #
+*/
+#define AP_AUTH_REQ_IDLE 0
+#define AP_MAX_AUTH_STATE 1
+
+#define AP_AUTH_MACHINE_BASE 0
+#define APMT2_MLME_DEAUTH_REQ 0
+#define APMT2_CLS2ERR 1
+#define APMT2_PEER_DEAUTH 2
+#define APMT2_PEER_AUTH_REQ 3
+#define APMT2_PEER_AUTH_CONFIRM 4
+#define AP_MAX_AUTH_MSG 5
+
+#define AP_AUTH_FUNC_SIZE (AP_MAX_AUTH_STATE * AP_MAX_AUTH_MSG)
+
+/*
+ AP's SYNC state machine: states, events, total function #
+*/
+#ifdef CONFIG_MULTI_CHANNEL
+#define AP_SYNC_IDLE 0
+#ifdef AP_SCAN_SUPPORT
+#define AP_SCAN_LISTEN 1
+#define AP_SCAN_PENDING 2
+#define AP_MAX_SYNC_STATE 3
+#else
+#define AP_SCAN_PENDING 1
+#define AP_MAX_SYNC_STATE 2
+#endif
+#else
+#define AP_SYNC_IDLE 0
+#ifdef AP_SCAN_SUPPORT
+#define AP_SCAN_LISTEN 1
+#define AP_MAX_SYNC_STATE 2
+#else
+#define AP_MAX_SYNC_STATE 1
+#endif
+#endif /*CONFIG_MULTI_CHANNEL*/
+
+#define AP_SYNC_MACHINE_BASE 0
+#define APMT2_PEER_PROBE_REQ 0
+#define APMT2_PEER_BEACON 1
+#define APMT2_PEER_PROBE_RSP 2
+#ifdef AP_SCAN_SUPPORT
+#define APMT2_MLME_SCAN_REQ 3
+#define APMT2_SCAN_TIMEOUT 4
+#define APMT2_MLME_SCAN_CNCL 5
+#define AP_MAX_SYNC_MSG 6
+#else
+#define AP_MAX_SYNC_MSG 3
+#endif
+
+#define AP_SYNC_FUNC_SIZE (AP_MAX_SYNC_STATE * AP_MAX_SYNC_MSG)
+
+#ifdef APCLI_SUPPORT
+/*ApCli authentication state machine */
+#define APCLI_AUTH_REQ_IDLE 0
+#define APCLI_AUTH_WAIT_SEQ2 1
+#define APCLI_AUTH_WAIT_SEQ4 2
+#define APCLI_MAX_AUTH_STATE 3
+
+#define APCLI_AUTH_MACHINE_BASE 0
+#define APCLI_MT2_MLME_AUTH_REQ 0
+#define APCLI_MT2_MLME_DEAUTH_REQ 1
+#define APCLI_MT2_PEER_AUTH_EVEN 2
+#define APCLI_MT2_PEER_DEAUTH 3
+#define APCLI_MT2_AUTH_TIMEOUT 4
+#define APCLI_MAX_AUTH_MSG 5
+
+#define APCLI_AUTH_FUNC_SIZE (APCLI_MAX_AUTH_STATE * APCLI_MAX_AUTH_MSG)
+
+/*ApCli association state machine */
+#define APCLI_ASSOC_IDLE 0
+#define APCLI_ASSOC_WAIT_RSP 1
+#define APCLI_MAX_ASSOC_STATE 2
+
+#define APCLI_ASSOC_MACHINE_BASE 0
+#define APCLI_MT2_MLME_ASSOC_REQ 0
+#define APCLI_MT2_MLME_DISASSOC_REQ 1
+#define APCLI_MT2_PEER_DISASSOC_REQ 2
+#define APCLI_MT2_PEER_ASSOC_RSP 3
+#define APCLI_MT2_ASSOC_TIMEOUT 4
+#define APCLI_MAX_ASSOC_MSG 5
+
+#define APCLI_ASSOC_FUNC_SIZE (APCLI_MAX_ASSOC_STATE * APCLI_MAX_ASSOC_MSG)
+
+/*ApCli sync state machine */
+#define APCLI_SYNC_IDLE 0 /* merge NO_BSS,IBSS_IDLE,IBSS_ACTIVE and BSS in to 1 state */
+#define APCLI_JOIN_WAIT_PROBE_RSP 1
+#define APCLI_MAX_SYNC_STATE 2
+
+#define APCLI_SYNC_MACHINE_BASE 0
+#define APCLI_MT2_MLME_PROBE_REQ 0
+#define APCLI_MT2_PEER_PROBE_RSP 1
+#define APCLI_MT2_PEER_BEACON 2
+#define APCLI_MT2_PROBE_TIMEOUT 3
+#define APCLI_MAX_SYNC_MSG 4
+
+#define APCLI_SYNC_FUNC_SIZE (APCLI_MAX_SYNC_STATE * APCLI_MAX_SYNC_MSG)
+
+/*ApCli ctrl state machine */
+#define APCLI_CTRL_DISCONNECTED 0 /* merge NO_BSS,IBSS_IDLE,IBSS_ACTIVE and BSS in to 1 state */
+#define APCLI_CTRL_PROBE 1
+#define APCLI_CTRL_AUTH 2
+#define APCLI_CTRL_AUTH_2 3
+#define APCLI_CTRL_ASSOC 4
+#define APCLI_CTRL_DEASSOC 5
+#define APCLI_CTRL_CONNECTED 6
+#define APCLI_MAX_CTRL_STATE 7
+
+#define APCLI_CTRL_MACHINE_BASE 0
+#define APCLI_CTRL_JOIN_REQ 0
+#define APCLI_CTRL_PROBE_RSP 1
+#define APCLI_CTRL_AUTH_RSP 2
+#define APCLI_CTRL_DISCONNECT_REQ 3
+#define APCLI_CTRL_PEER_DISCONNECT_REQ 4
+#define APCLI_CTRL_ASSOC_RSP 5
+#define APCLI_CTRL_DEASSOC_RSP 6
+#define APCLI_CTRL_JOIN_REQ_TIMEOUT 7
+#define APCLI_CTRL_AUTH_REQ_TIMEOUT 8
+#define APCLI_CTRL_ASSOC_REQ_TIMEOUT 9
+#define APCLI_MAX_CTRL_MSG 10
+
+#define APCLI_CTRL_FUNC_SIZE (APCLI_MAX_CTRL_STATE * APCLI_MAX_CTRL_MSG)
+
+
+#endif /* APCLI_SUPPORT */
+
+
+/* ============================================================================= */
+
+
+/* value domain of 802.11 MGMT frame's FC.subtype, which is b7..4 of the 1st-byte of MAC header */
+#define SUBTYPE_ASSOC_REQ 0
+#define SUBTYPE_ASSOC_RSP 1
+#define SUBTYPE_REASSOC_REQ 2
+#define SUBTYPE_REASSOC_RSP 3
+#define SUBTYPE_PROBE_REQ 4
+#define SUBTYPE_PROBE_RSP 5
+#define SUBTYPE_BEACON 8
+#define SUBTYPE_ATIM 9
+#define SUBTYPE_DISASSOC 10
+#define SUBTYPE_AUTH 11
+#define SUBTYPE_DEAUTH 12
+#define SUBTYPE_ACTION 13
+#define SUBTYPE_ACTION_NO_ACK 14
+
+/* value domain of 802.11 CNTL frame's FC.subtype, which is b7..4 of the 1st-byte of MAC header */
+#define SUBTYPE_WRAPPER 7
+#define SUBTYPE_BLOCK_ACK_REQ 8
+#define SUBTYPE_BLOCK_ACK 9
+#define SUBTYPE_PS_POLL 10
+#define SUBTYPE_RTS 11
+#define SUBTYPE_CTS 12
+#define SUBTYPE_ACK 13
+#define SUBTYPE_CFEND 14
+#define SUBTYPE_CFEND_CFACK 15
+
+/* value domain of 802.11 DATA frame's FC.subtype, which is b7..4 of the 1st-byte of MAC header */
+#define SUBTYPE_DATA 0
+#define SUBTYPE_DATA_CFACK 1
+#define SUBTYPE_DATA_CFPOLL 2
+#define SUBTYPE_DATA_CFACK_CFPOLL 3
+#define SUBTYPE_NULL_FUNC 4
+#define SUBTYPE_CFACK 5
+#define SUBTYPE_CFPOLL 6
+#define SUBTYPE_CFACK_CFPOLL 7
+#define SUBTYPE_QDATA 8
+#define SUBTYPE_QDATA_CFACK 9
+#define SUBTYPE_QDATA_CFPOLL 10
+#define SUBTYPE_QDATA_CFACK_CFPOLL 11
+#define SUBTYPE_QOS_NULL 12
+#define SUBTYPE_QOS_CFACK 13
+#define SUBTYPE_QOS_CFPOLL 14
+#define SUBTYPE_QOS_CFACK_CFPOLL 15
+
+/* ACK policy of QOS Control field bit 6:5 */
+#define NORMAL_ACK 0x00 /* b6:5 = 00 */
+#define NO_ACK 0x20 /* b6:5 = 01 */
+#define NO_EXPLICIT_ACK 0x40 /* b6:5 = 10 */
+#define BLOCK_ACK 0x60 /* b6:5 = 11 */
+
+#ifdef USB_BULK_BUF_ALIGMENT
+#define BUF_ALIGMENT_RINGSIZE 6 /*BUF_ALIGMENT_RINGSIZE must >= 3 */
+#endif /* USB_BULK_BUF_ALIGMENT */
+
+
+/* STA_CSR4.field.TxResult */
+#define TX_RESULT_SUCCESS 0
+#define TX_RESULT_ZERO_LENGTH 1
+#define TX_RESULT_UNDER_RUN 2
+#define TX_RESULT_OHY_ERROR 4
+#define TX_RESULT_RETRY_FAIL 6
+
+
+/* MCS for CCK. BW.SGI.STBC are reserved */
+#define MCS_LONGP_RATE_1 0 /* long preamble CCK 1Mbps */
+#define MCS_LONGP_RATE_2 1 /* long preamble CCK 1Mbps */
+#define MCS_LONGP_RATE_5_5 2
+#define MCS_LONGP_RATE_11 3
+#define MCS_SHORTP_RATE_1 4 /* long preamble CCK 1Mbps. short is forbidden in 1Mbps */
+#define MCS_SHORTP_RATE_2 5 /* short preamble CCK 2Mbps */
+#define MCS_SHORTP_RATE_5_5 6
+#define MCS_SHORTP_RATE_11 7
+/* To send duplicate legacy OFDM. set BW=BW_40. SGI.STBC are reserved */
+#define MCS_RATE_6 0 /* legacy OFDM */
+#define MCS_RATE_9 1 /* OFDM */
+#define MCS_RATE_12 2 /* OFDM */
+#define MCS_RATE_18 3 /* OFDM */
+#define MCS_RATE_24 4 /* OFDM */
+#define MCS_RATE_36 5 /* OFDM */
+#define MCS_RATE_48 6 /* OFDM */
+#define MCS_RATE_54 7 /* OFDM */
+/* HT */
+#define MCS_0 0 /* 1S */
+#define MCS_1 1
+#define MCS_2 2
+#define MCS_3 3
+#define MCS_4 4
+#define MCS_5 5
+#define MCS_6 6
+#define MCS_7 7
+#define MCS_8 8 /* 2S */
+#define MCS_9 9
+#define MCS_10 10
+#define MCS_11 11
+#define MCS_12 12
+#define MCS_13 13
+#define MCS_14 14
+#define MCS_15 15
+#define MCS_16 16 /* 3*3 */
+#define MCS_17 17
+#define MCS_18 18
+#define MCS_19 19
+#define MCS_20 20
+#define MCS_21 21
+#define MCS_22 22
+#define MCS_23 23
+#define MCS_32 32
+#define MCS_AUTO 33
+
+#ifdef DOT11_N_SUPPORT
+/* OID_HTPHYMODE */
+/* MODE */
+#define HTMODE_MM 0
+#define HTMODE_GF 1
+#endif /* DOT11_N_SUPPORT */
+
+/* Fixed Tx MODE - HT, CCK or OFDM */
+#define FIXED_TXMODE_HT 0
+#define FIXED_TXMODE_CCK 1
+#define FIXED_TXMODE_OFDM 2
+#define FIXED_TXMODE_VHT 3
+
+/* BW */
+#define BW_20 BAND_WIDTH_20
+#define BW_40 BAND_WIDTH_40
+#define BW_80 BAND_WIDTH_80
+#define BW_10 BAND_WIDTH_10 /* 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field. */
+
+
+
+#define RF_BW_20 1
+#define RF_BW_40 2
+#define RF_BW_10 4
+#define RF_BW_80 8
+
+#define RF_MODE_CCK 1
+#define RF_MODE_OFDM 2
+
+#ifdef DOT11_N_SUPPORT
+#define HT_BW_20 0
+#define HT_BW_40 1
+#endif /* DOT11_N_SUPPORT */
+
+#ifdef DOT11_VHT_AC
+#define VHT_BW_2040 0
+#define VHT_BW_80 1
+#define VHT_BW_160 2
+#define VHT_BW_8080 3
+#endif /* DOT11_VHT_AC */
+
+#ifdef DOT11_N_SUPPORT
+/* SHORTGI */
+#define GI_400 GAP_INTERVAL_400 /* only support in HT mode */
+#define GI_BOTH GAP_INTERVAL_BOTH
+#endif /* DOT11_N_SUPPORT */
+#define GI_800 GAP_INTERVAL_800
+
+/* STBC */
+#define STBC_NONE 0
+#ifdef DOT11_N_SUPPORT
+#define STBC_USE 1 /* limited use in rt2860b phy */
+#define RXSTBC_ONE 1 /* rx support of one spatial stream */
+#define RXSTBC_TWO 2 /* rx support of 1 and 2 spatial stream */
+#define RXSTBC_THR 3 /* rx support of 1~3 spatial stream */
+/* MCS FEEDBACK */
+#define MCSFBK_NONE 0 /* not support mcs feedback / */
+#define MCSFBK_RSV 1 /* reserved */
+#define MCSFBK_UNSOLICIT 2 /* only support unsolict mcs feedback */
+#define MCSFBK_MRQ 3 /* response to both MRQ and unsolict mcs feedback */
+
+/* MIMO power safe */
+#define MMPS_STATIC 0
+#define MMPS_DYNAMIC 1
+#define MMPS_RSV 2
+#define MMPS_ENABLE 3
+
+/* A-MSDU size */
+#define AMSDU_0 0
+#define AMSDU_1 1
+
+#endif /* DOT11_N_SUPPORT */
+
+/* MCS use 7 bits */
+#define TXRATEMIMO 0x80
+#define TXRATEMCS 0x7F
+#define TXRATEOFDM 0x7F
+#define RATE_1 0
+#define RATE_2 1
+#define RATE_5_5 2
+#define RATE_11 3
+#define RATE_6 4 /* OFDM */
+#define RATE_9 5 /* OFDM */
+#define RATE_12 6 /* OFDM */
+#define RATE_18 7 /* OFDM */
+#define RATE_24 8 /* OFDM */
+#define RATE_36 9 /* OFDM */
+#define RATE_48 10 /* OFDM */
+#define RATE_54 11 /* OFDM */
+#define RATE_FIRST_OFDM_RATE RATE_6
+#define RATE_LAST_OFDM_RATE RATE_54
+#define RATE_6_5 12 /* HT mix */
+#define RATE_13 13 /* HT mix */
+#define RATE_19_5 14 /* HT mix */
+#define RATE_26 15 /* HT mix */
+#define RATE_39 16 /* HT mix */
+#define RATE_52 17 /* HT mix */
+#define RATE_58_5 18 /* HT mix */
+#define RATE_65 19 /* HT mix */
+#define RATE_78 20 /* HT mix */
+#define RATE_104 21 /* HT mix */
+#define RATE_117 22 /* HT mix */
+#define RATE_130 23 /* HT mix */
+/*#define RATE_AUTO_SWITCH 255 // for StaCfg.FixedTxRate only */
+#define HTRATE_0 12
+#define RATE_FIRST_MM_RATE HTRATE_0
+#define RATE_FIRST_HT_RATE HTRATE_0
+#define RATE_LAST_HT_RATE HTRATE_0
+
+/* pTxWI->txop */
+#define IFS_HTTXOP 0 /* The txop will be handles by ASIC. */
+#define IFS_PIFS 1
+#define IFS_SIFS 2
+#define IFS_BACKOFF 3
+
+/* pTxD->RetryMode */
+#define LONG_RETRY 1
+#define SHORT_RETRY 0
+
+/* Country Region definition */
+#define REGION_MINIMUM_BG_BAND 0
+#define REGION_0_BG_BAND 0 /* 1-11 */
+#define REGION_1_BG_BAND 1 /* 1-13 */
+#define REGION_2_BG_BAND 2 /* 10-11 */
+#define REGION_3_BG_BAND 3 /* 10-13 */
+#define REGION_4_BG_BAND 4 /* 14 */
+#define REGION_5_BG_BAND 5 /* 1-14 */
+#define REGION_6_BG_BAND 6 /* 3-9 */
+#define REGION_7_BG_BAND 7 /* 5-13 */
+#define REGION_31_BG_BAND 31 /* 5-13 */
+#define REGION_32_BG_BAND 32 /* 1 - 13 */
+#define REGION_33_BG_BAND 33 /* 1 - 14 */
+#define REGION_MAXIMUM_BG_BAND 7
+
+#define REGION_MINIMUM_A_BAND 0
+#define REGION_0_A_BAND 0 /* 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165 */
+#define REGION_1_A_BAND 1 /* 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 */
+#define REGION_2_A_BAND 2 /* 36, 40, 44, 48, 52, 56, 60, 64 */
+#define REGION_3_A_BAND 3 /* 52, 56, 60, 64, 149, 153, 157, 161 */
+#define REGION_4_A_BAND 4 /* 149, 153, 157, 161, 165 */
+#define REGION_5_A_BAND 5 /* 149, 153, 157, 161 */
+#define REGION_6_A_BAND 6 /* 36, 40, 44, 48 */
+#define REGION_7_A_BAND 7 /* 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165, 169, 173 */
+#define REGION_8_A_BAND 8 /* 52, 56, 60, 64 */
+#define REGION_9_A_BAND 9 /* 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140, 149, 153, 157, 161, 165 */
+#define REGION_10_A_BAND 10 /* 36, 40, 44, 48, 149, 153, 157, 161, 165 */
+#define REGION_11_A_BAND 11 /* 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 149, 153, 157, 161 */
+#define REGION_12_A_BAND 12 /* 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 */
+#define REGION_13_A_BAND 13 /* 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161 */
+#define REGION_14_A_BAND 14 /* 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165 */
+#define REGION_15_A_BAND 15 /* 149, 153, 157, 161, 165, 169, 173 */
+#define REGION_16_A_BAND 16 /* 52, 56, 60, 64, 149, 153, 157, 161, 165 */
+#define REGION_17_A_BAND 17
+#define REGION_18_A_BAND 18
+#define REGION_19_A_BAND 19
+#define REGION_20_A_BAND 20
+#define REGION_21_A_BAND 21
+#define REGION_MAXIMUM_A_BAND 37
+
+/* The security mode definition in MAC register */
+#define CIPHER_NONE 0
+#define CIPHER_WEP64 1
+#define CIPHER_WEP128 2
+#define CIPHER_TKIP 3
+#define CIPHER_AES 4
+#define CIPHER_CKIP64 5
+#define CIPHER_CKIP128 6
+#define CIPHER_CKIP152 7
+#define CIPHER_SMS4 8
+
+
+
+/* RC4 init value, used fro WEP & TKIP */
+#define PPPINITFCS32 0xffffffff /* Initial FCS value */
+
+/* value domain of pAd->StaCfg.PortSecured. 802.1X controlled port definition */
+#define WPA_802_1X_PORT_SECURED 1
+#define WPA_802_1X_PORT_NOT_SECURED 2
+
+#define PAIRWISE_KEY 1
+#define GROUP_KEY 2
+
+
+
+/* Rate Adaptation timing */
+#define RA_RATE 5 /* RA every fifth 100msec period */
+#define RA_INTERVAL (RA_RATE*100) /* RA Interval in msec */
+
+/* Rate Adaptation simpling interval setting */
+#define DEF_QUICK_RA_TIME_INTERVAL 100
+
+#define DEF_RA_TIME_INTRVAL 500
+
+/*definition of DRS */
+#define MAX_TX_RATE_INDEX 33 /* Maximum Tx Rate Table Index value */
+
+/* pre-allocated free NDIS PACKET/BUFFER poll for internal usage */
+#define MAX_NUM_OF_FREE_NDIS_PACKET 128
+
+/*Block ACK */
+#define MAX_TX_REORDERBUF 64
+#define MAX_RX_REORDERBUF 64
+#define DEFAULT_TX_TIMEOUT 30
+#define DEFAULT_RX_TIMEOUT 30
+#ifdef CONFIG_AP_SUPPORT
+#define MAX_BARECI_SESSION 16
+#endif /* CONFIG_AP_SUPPORT */
+
+/* definition of Recipient or Originator */
+#define I_RECIPIENT TRUE
+#define I_ORIGINATOR FALSE
+
+#define DEFAULT_BBP_TX_POWER 0
+#define DEFAULT_RF_TX_POWER 5
+#define DEFAULT_BBP_TX_FINE_POWER_CTRL 0
+
+#define MAX_INI_BUFFER_SIZE 4096
+#define MAX_PARAM_BUFFER_SIZE (2048) /* enough for ACL (18*64) */
+ /*18 : the length of Mac address acceptable format "01:02:03:04:05:06;") */
+ /*64 : MAX_NUM_OF_ACL_LIST */
+
+#ifdef RT_BIG_ENDIAN
+#define DIR_READ 0
+#define DIR_WRITE 1
+#define TYPE_TXD 0
+#define TYPE_RXD 1
+#define TYPE_TXINFO 0
+#define TYPE_RXINFO 1
+#define TYPE_TXWI 0
+#define TYPE_RXWI 1
+#endif
+
+/* ========================= AP rtmp_def.h =========================== */
+/* value domain for pAd->EventTab.Log[].Event */
+#define EVENT_RESET_ACCESS_POINT 0 /* Log = "hh:mm:ss Restart Access Point" */
+#define EVENT_ASSOCIATED 1 /* Log = "hh:mm:ss STA 00:01:02:03:04:05 associated" */
+#define EVENT_DISASSOCIATED 2 /* Log = "hh:mm:ss STA 00:01:02:03:04:05 left this BSS" */
+#define EVENT_AGED_OUT 3 /* Log = "hh:mm:ss STA 00:01:02:03:04:05 was aged-out and removed from this BSS" */
+#define EVENT_COUNTER_M 4
+#define EVENT_INVALID_PSK 5
+#define EVENT_MAX_EVENT_TYPE 6
+/* ==== end of AP rtmp_def.h ============ */
+
+/* definition RSSI Number */
+#define RSSI_0 0
+#define RSSI_1 1
+#define RSSI_2 2
+
+/* definition of radar detection */
+#define RD_NORMAL_MODE 0 /* Not found radar signal */
+#define RD_SWITCHING_MODE 1 /* Found radar signal, and doing channel switch */
+#define RD_SILENCE_MODE 2 /* After channel switch, need to be silence a while to ensure radar not found */
+
+/*Driver defined cid for mapping status and command. */
+#define SLEEPCID 0x11
+#define WAKECID 0x22
+#define QUERYPOWERCID 0x33
+#define OWNERMCU 0x1
+#define OWNERCPU 0x0
+
+/* MBSSID definition */
+#define ENTRY_NOT_FOUND 0xFF
+
+/* The signal threshold (RSSI) over new rate adaption */
+#define SIGNAL_THRESHOLD_OVER_NEW_RATE_ADAPT -65
+
+/* After Linux 2.6.9,
+ * VLAN module use Private (from user) interface flags (netdevice->priv_flags).
+ * #define IFF_802_1Q_VLAN 0x1 -- 802.1Q VLAN device. in if.h
+ * ref to ip_sabotage_out() [ out->priv_flags & IFF_802_1Q_VLAN ] in br_netfilter.c
+ *
+ * For this reason, we MUST use EVEN value in priv_flags
+ */
+#define INT_MAIN 0x0100
+#define INT_MBSSID 0x0200
+#define INT_WDS 0x0300
+#define INT_APCLI 0x0400
+#define INT_MESH 0x0500
+#define INT_P2P 0x0600
+
+#define ENTRY_NONE 0
+#define ENTRY_CLIENT 1
+#define ENTRY_WDS 2
+#define ENTRY_APCLI 3
+#define ENTRY_MESH 4
+#define ENTRY_DLS 5
+#define ENTRY_TDLS 6
+
+
+#define IS_ENTRY_NONE(_x) ((_x)->EntryType == ENTRY_NONE)
+#define IS_ENTRY_CLIENT(_x) ((_x)->EntryType == ENTRY_CLIENT)
+#define IS_ENTRY_WDS(_x) ((_x)->EntryType == ENTRY_WDS)
+#define IS_ENTRY_APCLI(_x) ((_x)->EntryType == ENTRY_APCLI)
+#define IS_ENTRY_MESH(_x) ((_x)->EntryType == ENTRY_MESH)
+#define IS_ENTRY_DLS(_x) ((_x)->EntryType == ENTRY_DLS)
+#define IS_ENTRY_TDLS(_x) ((_x)->EntryType == ENTRY_TDLS)
+#ifdef CLIENT_WDS
+#define IS_ENTRY_CLIWDS(_x) CLIENT_STATUS_TEST_FLAG((_x), fCLIENT_STATUS_CLI_WDS)
+#endif /* CLIENT_WDS */
+
+#define SET_ENTRY_NONE(_x) ((_x)->EntryType = ENTRY_NONE)
+#define SET_ENTRY_CLIENT(_x) ((_x)->EntryType = ENTRY_CLIENT)
+#define SET_ENTRY_WDS(_x) ((_x)->EntryType = ENTRY_WDS)
+#define SET_ENTRY_APCLI(_x) ((_x)->EntryType = ENTRY_APCLI)
+#define SET_ENTRY_MESH(_x) ((_x)->EntryType = ENTRY_MESH)
+#define SET_ENTRY_DLS(_x) ((_x)->EntryType = ENTRY_DLS)
+#define SET_ENTRY_TDLS(_x) ((_x)->EntryType = ENTRY_TDLS)
+#ifdef CLIENT_WDS
+#define SET_ENTRY_CLIWDS(_x) CLIENT_STATUS_SET_FLAG((_x), fCLIENT_STATUS_CLI_WDS)
+#endif /* CLIENT_WDS */
+#define SET_PKT_OPMODE_AP(_x) ((_x)->OpMode = OPMODE_AP)
+#define SET_PKT_OPMODE_STA(_x) ((_x)->OpMode = OPMODE_STA)
+#define IS_PKT_OPMODE_AP(_x) ((_x)->OpMode == OPMODE_AP)
+#define IS_PKT_OPMODE_STA(_x) ((_x)->OpMode == OPMODE_STA)
+
+
+#define IS_OPMODE_AP(_x) ((_x)->OpMode == OPMODE_AP)
+#define IS_OPMODE_STA(_x) ((_x)->OpMode == OPMODE_STA)
+
+#ifdef ANDROID_SUPPORT
+#define INF_MAIN_DEV_NAME "wlan"
+#define INF_MBSSID_DEV_NAME "wlan"
+#else
+#define INF_MAIN_DEV_NAME "ra"
+#define INF_MBSSID_DEV_NAME "ra"
+#endif /* ANDROID_SUPPORT */
+#define INF_WDS_DEV_NAME "wds"
+#define INF_APCLI_DEV_NAME "apcli"
+#define INF_MESH_DEV_NAME "mesh"
+#define INF_P2P_DEV_NAME "p2p"
+
+/* WEP Key TYPE */
+#define WEP_HEXADECIMAL_TYPE 0
+#define WEP_ASCII_TYPE 1
+
+/* WIRELESS EVENTS definition */
+/* Max number of char in custom event, refer to wireless_tools.28/wireless.20.h */
+#define IW_CUSTOM_MAX_LEN 255 /* In bytes */
+
+/* For system event - start */
+#define IW_SYS_EVENT_FLAG_START 0x0200
+#define IW_ASSOC_EVENT_FLAG 0x0200
+#define IW_DISASSOC_EVENT_FLAG 0x0201
+#define IW_DEAUTH_EVENT_FLAG 0x0202
+#define IW_AGEOUT_EVENT_FLAG 0x0203
+#define IW_COUNTER_MEASURES_EVENT_FLAG 0x0204
+#define IW_REPLAY_COUNTER_DIFF_EVENT_FLAG 0x0205
+#define IW_RSNIE_DIFF_EVENT_FLAG 0x0206
+#define IW_MIC_DIFF_EVENT_FLAG 0x0207
+#define IW_ICV_ERROR_EVENT_FLAG 0x0208
+#define IW_MIC_ERROR_EVENT_FLAG 0x0209
+#define IW_GROUP_HS_TIMEOUT_EVENT_FLAG 0x020A
+#define IW_PAIRWISE_HS_TIMEOUT_EVENT_FLAG 0x020B
+#define IW_RSNIE_SANITY_FAIL_EVENT_FLAG 0x020C
+#define IW_SET_KEY_DONE_WPA1_EVENT_FLAG 0x020D
+#define IW_SET_KEY_DONE_WPA2_EVENT_FLAG 0x020E
+#define IW_STA_LINKUP_EVENT_FLAG 0x020F
+#define IW_STA_LINKDOWN_EVENT_FLAG 0x0210
+#define IW_SCAN_COMPLETED_EVENT_FLAG 0x0211
+#define IW_SCAN_ENQUEUE_FAIL_EVENT_FLAG 0x0212
+#define IW_CHANNEL_CHANGE_EVENT_FLAG 0x0213
+#define IW_STA_MODE_EVENT_FLAG 0x0214
+#define IW_MAC_FILTER_LIST_EVENT_FLAG 0x0215
+#define IW_AUTH_REJECT_CHALLENGE_FAILURE 0x0216
+#define IW_SCANNING_EVENT_FLAG 0x0217
+#define IW_START_IBSS_FLAG 0x0218
+#define IW_JOIN_IBSS_FLAG 0x0219
+#define IW_SHARED_WEP_FAIL 0x021A
+#define IW_WPS_END_EVENT_FLAG 0x021B
+/* if add new system event flag, please upadte the IW_SYS_EVENT_FLAG_END */
+#define IW_SYS_EVENT_FLAG_END 0x021B
+#define IW_SYS_EVENT_TYPE_NUM (IW_SYS_EVENT_FLAG_END - IW_SYS_EVENT_FLAG_START + 1)
+/* For system event - end */
+
+#ifdef IDS_SUPPORT
+/* For spoof attack event - start */
+#define IW_SPOOF_EVENT_FLAG_START 0x0300
+#define IW_CONFLICT_SSID_EVENT_FLAG 0x0300
+#define IW_SPOOF_ASSOC_RESP_EVENT_FLAG 0x0301
+#define IW_SPOOF_REASSOC_RESP_EVENT_FLAG 0x0302
+#define IW_SPOOF_PROBE_RESP_EVENT_FLAG 0x0303
+#define IW_SPOOF_BEACON_EVENT_FLAG 0x0304
+#define IW_SPOOF_DISASSOC_EVENT_FLAG 0x0305
+#define IW_SPOOF_AUTH_EVENT_FLAG 0x0306
+#define IW_SPOOF_DEAUTH_EVENT_FLAG 0x0307
+#define IW_SPOOF_UNKNOWN_MGMT_EVENT_FLAG 0x0308
+#define IW_REPLAY_ATTACK_EVENT_FLAG 0x0309
+/* if add new spoof attack event flag, please upadte the IW_SPOOF_EVENT_FLAG_END */
+#define IW_SPOOF_EVENT_FLAG_END 0x0309
+#define IW_SPOOF_EVENT_TYPE_NUM (IW_SPOOF_EVENT_FLAG_END - IW_SPOOF_EVENT_FLAG_START + 1)
+/* For spoof attack event - end */
+
+/* For flooding attack event - start */
+#define IW_FLOOD_EVENT_FLAG_START 0x0400
+#define IW_FLOOD_AUTH_EVENT_FLAG 0x0400
+#define IW_FLOOD_ASSOC_REQ_EVENT_FLAG 0x0401
+#define IW_FLOOD_REASSOC_REQ_EVENT_FLAG 0x0402
+#define IW_FLOOD_PROBE_REQ_EVENT_FLAG 0x0403
+#define IW_FLOOD_DISASSOC_EVENT_FLAG 0x0404
+#define IW_FLOOD_DEAUTH_EVENT_FLAG 0x0405
+#define IW_FLOOD_EAP_REQ_EVENT_FLAG 0x0406
+/* if add new flooding attack event flag, please upadte the IW_FLOOD_EVENT_FLAG_END */
+#define IW_FLOOD_EVENT_FLAG_END 0x0406
+#define IW_FLOOD_EVENT_TYPE_NUM (IW_FLOOD_EVENT_FLAG_END - IW_FLOOD_EVENT_FLAG_START + 1)
+/* For flooding attack - end */
+#endif /* IDS_SUPPORT */
+
+#ifdef WSC_INCLUDED
+/* For WSC wireless event - start */
+#define IW_WSC_EVENT_FLAG_START 0x0500
+#define IW_WSC_PBC_SESSION_OVERLAP 0x0500
+#define IW_WSC_REGISTRAR_SUPPORT_PBC 0x0501
+#define IW_WSC_REGISTRAR_SUPPORT_PIN 0x0502
+#define IW_WSC_STATUS_SUCCESS 0x0503
+#define IW_WSC_STATUS_FAIL 0x0504
+#define IW_WSC_2MINS_TIMEOUT 0x0505
+#define IW_WSC_SEND_EAPOL_START 0x0506
+#define IW_WSC_SEND_WSC_START 0x0507
+#define IW_WSC_SEND_M1 0x0508
+#define IW_WSC_SEND_M2 0x0509
+#define IW_WSC_SEND_M3 0x050a
+#define IW_WSC_SEND_M4 0x050b
+#define IW_WSC_SEND_M5 0x050c
+#define IW_WSC_SEND_M6 0x050d
+#define IW_WSC_SEND_M7 0x050e
+#define IW_WSC_SEND_M8 0x050f
+#define IW_WSC_SEND_DONE 0x0510
+#define IW_WSC_SEND_ACK 0x0511
+#define IW_WSC_SEND_NACK 0x0512
+#define IW_WSC_RECEIVE_WSC_START 0x0513
+#define IW_WSC_RECEIVE_M1 0x0514
+#define IW_WSC_RECEIVE_M2 0x0515
+#define IW_WSC_RECEIVE_M3 0x0516
+#define IW_WSC_RECEIVE_M4 0x0517
+#define IW_WSC_RECEIVE_M5 0x0518
+#define IW_WSC_RECEIVE_M6 0x0519
+#define IW_WSC_RECEIVE_M7 0x051a
+#define IW_WSC_RECEIVE_M8 0x051b
+#define IW_WSC_RECEIVE_DONE 0x051c
+#define IW_WSC_RECEIVE_ACK 0x051d
+#define IW_WSC_RECEIVE_NACK 0x051e
+#define IW_WSC_MANY_CANDIDATE 0x051f
+#define IW_WSC_NEXT_CANDIDATE 0x0520
+#define IW_WSC_T1_TIMER_TIMEOUT 0x0521
+#define IW_WSC_T2_TIMER_TIMEOUT 0x0522
+#define IW_WSC_EVENT_FLAG_END 0x0522
+#define IW_WSC_EVENT_TYPE_NUM (IW_WSC_EVENT_FLAG_END - IW_WSC_EVENT_FLAG_START + 1)
+/* For WSC wireless event - end */
+#endif /* WSC_INCLUDED */
+/* End - WIRELESS EVENTS definition */
+
+
+#ifdef MCAST_RATE_SPECIFIC
+#define MCAST_DISABLE 0
+#define MCAST_CCK 1
+#define MCAST_OFDM 2
+#define MCAST_HTMIX 3
+#endif /* MCAST_RATE_SPECIFIC */
+
+/* For AsicRadioOff/AsicRadioOn function */
+#define DOT11POWERSAVE 0
+#define GUIRADIO_OFF 1
+#define RTMP_HALT 2
+#define GUI_IDLE_POWER_SAVE 3
+#ifdef RT3290
+#define FROM_TX 4
+#endif /* RT3290 */
+/* -- */
+
+/* definition for WpaSupport flag */
+#define WPA_SUPPLICANT_DISABLE 0x00
+#define WPA_SUPPLICANT_ENABLE 0x01
+#define WPA_SUPPLICANT_ENABLE_WITH_WEB_UI 0x02
+#define WPA_SUPPLICANT_ENABLE_WPS 0x80
+
+#ifdef MICROWAVE_OVEN_SUPPORT
+/* definition for mitigating microwave interference */
+#define MO_FALSE_CCA_TH 50
+#define MO_MEAS_PERIOD 0 /* 0 ~ 100 ms */
+#define MO_IDLE_PERIOD 1 /* 100 ~ 1000 ms */
+#endif /* MICROWAVE_OVEN_SUPPORT */
+
+/* definition for Antenna Diversity flag */
+typedef enum {
+ ANT_DIVERSITY_DISABLE,
+ ANT_DIVERSITY_ENABLE ,
+ ANT_FIX_ANT0,
+ ANT_FIX_ANT1,
+ ANT_SW_DIVERSITY_ENABLE,
+ ANT_HW_DIVERSITY_ENABLE,
+ ANT_DIVERSITY_DEFAULT
+}ANT_DIVERSITY_TYPE;
+
+enum IEEE80211_BAND {
+ IEEE80211_BAND_2G,
+ IEEE80211_BAND_5G,
+ IEEE80211_BAND_NUMS
+};
+
+enum {
+ RESUME_RADIO_ON,
+ SUSPEND_RADIO_OFF,
+ MLME_RADIO_ON,
+ MLME_RADIO_OFF,
+ DOT11_RADIO_ON,
+ DOT11_RADIO_OFF,
+};
+
+#ifdef CONFIG_MULTI_CHANNEL
+
+enum {
+ EDCA_AC0_DEQUEUE_DISABLE = (1 << 0),
+ EDCA_AC1_DEQUEUE_DISABLE = (1 << 1),
+ EDCA_AC2_DEQUEUE_DISABLE = (1 << 2),
+ EDCA_AC3_DEQUEUE_DISBALE = (1 << 3),
+ HCCA_DEQUEUE_DISABLE = (1 << 4)
+};
+
+enum {
+ HCCA_TO_EDCA,
+ EDCA_TO_HCCA = 0x55
+};
+
+#define MUL_CHANNEL_ENABLE 0x77
+#define HCCA_TIMEOUT 100
+#define EDCA_TIMEOUT 100
+#define MCC_ACTION 400
+
+#endif /* CONFIG_MULTI_CHANNEL */
+
+
+/* Advertismenet Protocol ID definitions */
+enum DOT11U_ADVERTISMENT_PROTOCOL_ID {
+ ACCESS_NETWORK_QUERY_PROTOCOL = 0,
+ MIH_INFORMATION_SERVICE = 1,
+ MIH_COMMAND_AND_EVENT_SERVICES_CAPBILITY_DISCOVERY = 2,
+ EMERGENCY_ALERT_SYSTEM = 3,
+ VENDOR_SPECIFIC = 221
+};
+
+#define ABS(_x, _y) ((_x) > (_y)) ? ((_x) -(_y)) : ((_y) -(_x))
+
+#define A2Dec(_X, _p) \
+{ \
+ UCHAR *p; \
+ _X = 0; \
+ p = _p; \
+ while (((*p >= '0') && (*p <= '9'))) \
+ { \
+ if ((*p >= '0') && (*p <= '9')) \
+ _X = _X * 10 + *p - 48; \
+ p++; \
+ } \
+}
+
+#define A2Hex(_X, _p) \
+do{ \
+ char *__p; \
+ (_X) = 0; \
+ __p = (char *)(_p); \
+ while (((*__p >= 'a') && (*__p <= 'f')) || ((*__p >= 'A') && (*__p <= 'F')) || ((*__p >= '0') && (*__p <= '9'))) \
+ { \
+ if ((*__p >= 'a') && (*__p <= 'f')) \
+ (_X) = (_X) * 16 + *__p - 87; \
+ else if ((*__p >= 'A') && (*__p <= 'F')) \
+ (_X) = (_X) * 16 + *__p - 55; \
+ else if ((*__p >= '0') && (*__p <= '9')) \
+ (_X) = (_X) * 16 + *__p - 48; \
+ __p++; \
+ } \
+}while(0)
+
+/* ========================================================================== */
+/*
+ The full range (1-4,095) of VLAN IDs must be supported by the 802.1Q
+ implementation.
+ VLAN ID 0 is reserved.
+*/
+
+#define RT_VLAN_8023_HEADER_COPY(__pAd, __VLAN_VID, __VLAN_Priority, \
+ __pHeader8023, __HdrLen, __pData, \
+ __FromWhichBSSID, __TPID) \
+{ \
+ VLAN_8023_Header_Copy(__VLAN_VID, __VLAN_Priority, \
+ __pHeader8023, __HdrLen, __pData, \
+ __FromWhichBSSID, __TPID); \
+}
+
+
+#define RT_VLAN_PKT_DUPLICATE(__pPacket, __pAd, __VLAN_VID, __VLAN_Priority,\
+ __pHeader8023, __HdrLen, __pData, \
+ __DataSize, __FromWhichBSSID, __TPID) \
+{ \
+ __pPacket = duplicate_pkt_with_VLAN( \
+ get_netdev_from_bssid(__pAd, __FromWhichBSSID), \
+ __VLAN_VID, \
+ __VLAN_Priority, \
+ __pHeader8023, __HdrLen, __pData, __DataSize, \
+ __FromWhichBSSID, __TPID); \
+}
+
+
+#define RT_80211_TO_8023_PACKET(__pAd, __VLAN_VID, __VLAN_Priority, \
+ __pRxBlk, __pHeader802_3, \
+ __FromWhichBSSID, __TPID) \
+{ \
+ wlan_802_11_to_802_3_packet( \
+ get_netdev_from_bssid(__pAd, __FromWhichBSSID), \
+ __pRxBlk->OpMode, \
+ __VLAN_VID, __VLAN_Priority, \
+ __pRxBlk->pRxPacket, __pRxBlk->pData, __pRxBlk->DataSize, \
+ __pHeader802_3, __FromWhichBSSID, __TPID); \
+}
+
+#define RTMP_L2_FRAME_TX_ACTION(__pAd, __ApIdx, __FrameBuf, __FrameLen) \
+ RTMPL2FrameTxAction(__pAd, get_netdev_from_bssid(__pAd, __ApIdx), \
+ announce_802_3_packet, __ApIdx, __FrameBuf, __FrameLen, __pAd->OpMode)
+
+#define RTMP_DUPLICATE_PACKET(__pAd, __pPacket, __FromWhichBSSID) \
+ DuplicatePacket(get_netdev_from_bssid(__pAd, __FromWhichBSSID), \
+ __pPacket, __FromWhichBSSID)
+
+#define RTMP_UPDATE_OS_PACKET_INFO(__pAd, __pRxBlk, __FromWhichBSSID) \
+ RtmpOsPktInit(__pRxBlk->pRxPacket, \
+ get_netdev_from_bssid(__pAd, __FromWhichBSSID), \
+ __pRxBlk->pData, __pRxBlk->DataSize);
+
+#ifdef SYSTEM_LOG_SUPPORT
+/*
+ RTMPSendWirelessEvent --> RtmpOsSendWirelessEvent --> RtmpDrvSendWirelessEvent
+*/
+#define RTMPSendWirelessEvent(__pAd, __Event_flag, __pAddr, __BssIdx, __Rssi) \
+ RtmpOsSendWirelessEvent(__pAd, __Event_flag, __pAddr, __BssIdx, __Rssi, \
+ RtmpDrvSendWirelessEvent);
+#else
+#define RTMPSendWirelessEvent(__pAd, __Event_flag, __pAddr, __BssIdx, __Rssi)
+#endif /* SYSTEM_LOG_SUPPORT */
+
+#define RTMP_OS_TASK_INIT(__pTask, __pTaskName, __pAd) \
+ RtmpOSTaskInit(__pTask, __pTaskName, __pAd, &(__pAd)->RscTaskMemList, &(__pAd)->RscSemMemList);
+
+#endif /* __RTMP_DEF_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_dot11.h b/cleopatre/devkit/mt7601udrv/include/rtmp_dot11.h
new file mode 100644
index 0000000000..a71a2ebd18
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_dot11.h
@@ -0,0 +1,98 @@
+/*
+
+*/
+
+#ifndef __DOT11_BASE_H__
+#define __DOT11_BASE_H__
+
+#include "rtmp_type.h"
+
+#ifdef DOT11_VHT_AC
+#include "dot11ac_vht.h"
+#endif /* DOT11_VHT_AC */
+
+#ifdef TXBF_SUPPORT
+/* CSI/Steering values */
+#define DOT11N_BF_FB_NONE 0
+#define DOT11N_BF_FB_CSI 1
+#define DOT11N_BF_FB_NOCOMP 2
+#define DOT11N_BF_FB_COMP 3
+#endif /* TXBF_SUPPORT */
+
+/* 4-byte HTC field. maybe included in any frame except non-QOS data frame. The Order bit must set 1. */
+typedef struct GNU_PACKED _HT_CONTROL{
+#ifdef RT_BIG_ENDIAN
+ UINT32 RDG:1;
+ UINT32 ACConstraint:1;
+ UINT32 rsv2:5;
+ UINT32 NDPAnnounce:1;
+ UINT32 CSISTEERING:2;
+ UINT32 rsv1:2;
+ UINT32 CalSeq:2;
+ UINT32 CalPos:2;
+ UINT32 MFBorASC:7;
+ UINT32 MFSI:3;
+ UINT32 MSI:3;
+ UINT32 MRQ:1;
+ UINT32 TRQ:1;
+ UINT32 vht:1;
+#else
+ UINT32 vht:1; /* indicate for VHT variant or HT variant */
+ UINT32 TRQ:1; /*sounding request */
+ UINT32 MRQ:1; /*MCS feedback. Request for a MCS feedback */
+ UINT32 MSI:3; /*MCS Request, MRQ Sequence identifier */
+ UINT32 MFSI:3; /*SET to the received value of MRS. 0x111 for unsolicited MFB. */
+ UINT32 MFBorASC:7; /*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */
+ UINT32 CalPos:2; /* calibration position */
+ UINT32 CalSeq:2; /*calibration sequence */
+ UINT32 rsv1:2; /* Reserved */
+ UINT32 CSISTEERING:2; /*CSI/ STEERING */
+ UINT32 NDPAnnounce:1; /* ZLF announcement */
+ UINT32 rsv2:5; /*calibration sequence */
+ UINT32 ACConstraint:1; /*feedback request */
+ UINT32 RDG:1; /*RDG / More PPDU */
+#endif /* !RT_BIG_ENDIAN */
+} HT_CONTROL, *PHT_CONTROL;
+
+/* 2-byte QOS CONTROL field */
+typedef struct GNU_PACKED _QOS_CONTROL{
+#ifdef RT_BIG_ENDIAN
+ USHORT Txop_QueueSize:8;
+ USHORT AMsduPresent:1;
+ USHORT AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */
+ USHORT EOSP:1;
+ USHORT TID:4;
+#else
+ USHORT TID:4;
+ USHORT EOSP:1;
+ USHORT AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */
+ USHORT AMsduPresent:1;
+ USHORT Txop_QueueSize:8;
+#endif /* !RT_BIG_ENDIAN */
+} QOS_CONTROL, *PQOS_CONTROL;
+
+
+typedef struct GNU_PACKED _AC_PARAM_RECORD{
+ UINT8 aci_aifsn;
+ UINT8 ecw_max:4;
+ UINT8 ecw_min: 4;
+ UINT16 txop_limit;
+}AC_PARAM_RECORD;
+
+
+typedef struct GNU_PACKED _PSPOLL_FRAME {
+ FRAME_CONTROL FC;
+ USHORT Aid;
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR Ta[MAC_ADDR_LEN];
+} PSPOLL_FRAME, *PPSPOLL_FRAME;
+
+
+typedef struct GNU_PACKED _RTS_FRAME {
+ FRAME_CONTROL FC;
+ USHORT Duration;
+ UCHAR Addr1[MAC_ADDR_LEN];
+ UCHAR Addr2[MAC_ADDR_LEN];
+} RTS_FRAME, *PRTS_FRAME;
+
+#endif /* __DOT11_BASE_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_iface.h b/cleopatre/devkit/mt7601udrv/include/rtmp_iface.h
new file mode 100644
index 0000000000..adf8456ade
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_iface.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rt_iface.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RTMP_IFACE_H__
+#define __RTMP_IFACE_H__
+
+
+
+#ifdef RTMP_USB_SUPPORT
+#include "iface/rtmp_usb.h"
+#endif /* RTMP_USB_SUPPORT */
+
+typedef struct _INF_PCI_CONFIG_ {
+ unsigned long CSRBaseAddress; /* PCI MMIO Base Address, all access will use */
+ unsigned int irq_num;
+} INF_PCI_CONFIG;
+
+typedef struct _INF_USB_CONFIG_ {
+ unsigned char BulkInEpAddr; /* bulk-in endpoint address */
+ unsigned char BulkOutEpAddr[6]; /* bulk-out endpoint address */
+} INF_USB_CONFIG;
+
+typedef struct _INF_RBUS_CONFIG_ {
+ unsigned long csr_addr;
+ unsigned int irq;
+} INF_RBUS_CONFIG;
+
+
+typedef union _RTMP_INF_CONFIG_ {
+ struct _INF_PCI_CONFIG_ pciConfig;
+ struct _INF_USB_CONFIG_ usbConfig;
+ struct _INF_RBUS_CONFIG_ rbusConfig;
+} RTMP_INF_CONFIG;
+
+#endif /* __RTMP_IFACE_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_mcu.h b/cleopatre/devkit/mt7601udrv/include/rtmp_mcu.h
new file mode 100644
index 0000000000..f3510762f3
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_mcu.h
@@ -0,0 +1,90 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_mcu.h
+
+ Abstract:
+ Miniport header file for mcu related information
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __RTMP_MCU_H__
+#define __RTMP_MCU_H__
+
+enum MCU_TYPE {
+ SWMCU,
+ M8051,
+ ANDES,
+};
+
+
+struct _RTMP_ADAPTER;
+
+typedef void (*CMD_RSP_HANDLER)(struct _RTMP_ADAPTER *pAd, UCHAR *Data);
+
+/*
+ * CMD Unit (8051, Andes, ...,and etc)
+ */
+struct CMD_UNIT {
+ union {
+ struct {
+ UCHAR Command;
+ UCHAR Token;
+ UCHAR Arg0;
+ UCHAR Arg1;
+ } MCU51;
+ struct {
+ UINT8 Type;
+ USHORT CmdPayloadLen;
+ PUCHAR CmdPayload;
+ USHORT RspPayloadLen;
+ PUCHAR RspPayload;
+ ULONG Timeout;
+ BOOLEAN NeedRsp;
+ BOOLEAN NeedWait;
+ CMD_RSP_HANDLER CmdRspHdler;
+ } ANDES;
+ } u;
+};
+
+
+struct MCU_CTRL {
+ UCHAR CmdSeq;
+ NDIS_SPIN_LOCK CmdRspEventListLock;
+ DL_LIST CmdRspEventList;
+};
+
+
+struct CMD_RSP_EVENT {
+ DL_LIST List;
+ UCHAR CmdSeq;
+ UINT32 Timeout;
+ BOOLEAN NeedWait;
+ PVOID AckDone;
+ UCHAR **RspPayload;
+ USHORT *RspPayloadLen;
+};
+
+VOID ChipOpsMCUHook(struct _RTMP_ADAPTER *pAd, enum MCU_TYPE MCUType);
+VOID MCUCtrlInit(struct _RTMP_ADAPTER *pAd);
+VOID MCUCtrlExit(struct _RTMP_ADAPTER *pAd);
+
+#endif
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_os.h b/cleopatre/devkit/mt7601udrv/include/rtmp_os.h
new file mode 100644
index 0000000000..335d3b957e
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_os.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ rtmp_os.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ */
+
+#ifndef __RTMP_OS_H__
+#define __RTMP_OS_H__
+
+/* Driver Operators */
+typedef int (*RTMP_PRINTK)(const char *ftm, ...);
+typedef int (*RTMP_SNPRINTF)(char *, ULONG, const char *ftm, ...);
+
+typedef struct _RTMP_OS_ABL_OPS {
+ int (*ra_printk)(const char *ftm, ...);
+ int (*ra_snprintf)(char *, ULONG, const char *ftm, ...);
+} RTMP_OS_ABL_OPS;
+
+extern RTMP_OS_ABL_OPS *pRaOsOps;
+
+#ifdef LINUX
+#ifndef OS_ABL_FUNC_SUPPORT
+#include "os/rt_linux.h"
+
+#else
+
+#ifdef RTMP_MODULE_OS
+/* for util/netif */
+#include "os/rt_linux.h"
+#else
+/* for core */
+#include "os/rt_drv.h"
+#endif /* RTMP_MODULE_OS */
+#endif /* OS_ABL_FUNC_SUPPORT */
+#endif /* LINUX */
+
+
+
+
+
+/*
+ This data structure mainly strip some callback function defined in
+ "struct net_device" in kernel source "include/linux/netdevice.h".
+
+ The definition of this data structure may various depends on different
+ OS. Use it carefully.
+*/
+typedef struct _RTMP_OS_NETDEV_OP_HOOK_ {
+ void *open;
+ void *stop;
+ void *xmit;
+ void *ioctl;
+ void *get_stats;
+ void *priv;
+ void *get_wstats;
+ void *iw_handler;
+ int priv_flags;
+ unsigned char devAddr[6];
+ unsigned char devName[16];
+ unsigned char needProtcted;
+} RTMP_OS_NETDEV_OP_HOOK, *PRTMP_OS_NETDEV_OP_HOOK;
+
+
+typedef enum _RTMP_TASK_STATUS_ {
+ RTMP_TASK_STAT_UNKNOWN = 0,
+ RTMP_TASK_STAT_INITED = 1,
+ RTMP_TASK_STAT_RUNNING = 2,
+ RTMP_TASK_STAT_STOPED = 4,
+} RTMP_TASK_STATUS;
+#define RTMP_TASK_CAN_DO_INSERT (RTMP_TASK_STAT_INITED |RTMP_TASK_STAT_RUNNING)
+
+#define RTMP_OS_TASK_NAME_LEN 16
+
+#if defined(RTMP_MODULE_OS) || !defined(OS_ABL_FUNC_SUPPORT)
+/* used in UTIL/NETIF module */
+typedef struct _RTMP_OS_TASK_ {
+ char taskName[RTMP_OS_TASK_NAME_LEN];
+ void *priv;
+ /*unsigned long taskFlags; */
+ RTMP_TASK_STATUS taskStatus;
+#ifndef KTHREAD_SUPPORT
+ RTMP_OS_SEM taskSema;
+ RTMP_OS_PID taskPID;
+ struct completion taskComplete;
+#endif
+ unsigned char task_killed;
+#ifdef KTHREAD_SUPPORT
+ struct task_struct *kthread_task;
+ wait_queue_head_t kthread_q;
+ BOOLEAN kthread_running;
+#endif
+} OS_TASK;
+#endif /* RTMP_MODULE_OS || ! OS_ABL_FUNC_SUPPORT */
+
+int RtmpOSIRQRequest(
+ IN PNET_DEV pNetDev);
+/*int RtmpOSIRQRelease(IN PNET_DEV pNetDev); */
+
+#ifndef OS_ABL_SUPPORT
+#define RTMP_MATOpsInit(__pAd)
+#define RTMP_MATPktRxNeedConvert(__pAd, __pDev) \
+ MATPktRxNeedConvert(__pAd, __pDev)
+#define RTMP_MATEngineRxHandle(__pAd, __pPkt, __InfIdx) \
+ MATEngineRxHandle(__pAd, __pPkt, __InfIdx)
+#else
+
+#define RTMP_MATOpsInit(__pAd) \
+ (__pAd)->MATPktRxNeedConvert = MATPktRxNeedConvert; \
+ (__pAd)->MATEngineRxHandle = MATEngineRxHandle;
+#define RTMP_MATPktRxNeedConvert(__pAd, __pDev) \
+ ((__pAd)->MATPktRxNeedConvert(__pAd, __pDev))
+#define RTMP_MATEngineRxHandle(__pAd, __pPkt, __InfIdx) \
+ ((__pAd)->MATEngineRxHandle(__pAd, __pPkt, __InfIdx))
+#endif /* OS_ABL_SUPPORT */
+
+#endif /* __RMTP_OS_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_osabl.h b/cleopatre/devkit/mt7601udrv/include/rtmp_osabl.h
new file mode 100644
index 0000000000..cf96daeefe
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_osabl.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+
+ Module Name:
+ OS/rtmp_osabl.h
+
+ Abstract:
+ Some structure/definitions for OS ABL function.
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+
+***************************************************************************/
+
+#ifndef __RTMP_OS_ABL_H__
+#define __RTMP_OS_ABL_H__
+
+#ifdef OS_ABL_FUNC_SUPPORT
+
+#ifdef OS_ABL_OS_PCI_SUPPORT
+#define RTMP_MAC_PCI
+#define RTMP_PCI_SUPPORT
+#endif /* OS_ABL_OS_PCI_SUPPORT */
+
+#ifdef OS_ABL_OS_USB_SUPPORT
+#include <linux/usb.h>
+
+#ifndef RTMP_MAC_USB
+#define RTMP_MAC_USB
+#endif /* RTMP_MAC_USB */
+#ifndef RTMP_USB_SUPPORT
+#define RTMP_USB_SUPPORT
+#endif /* RTMP_USB_SUPPORT */
+#endif /* OS_ABL_OS_USB_SUPPORT */
+
+#ifdef OS_ABL_OS_RBUS_SUPPORT
+#define RTMP_RBUS_SUPPORT
+#endif /* OS_ABL_OS_RBUS_SUPPORT */
+
+#ifdef OS_ABL_OS_AP_SUPPORT
+#ifndef CONFIG_AP_SUPPORT
+#define CONFIG_AP_SUPPORT
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* OS_ABL_OS_AP_SUPPORT */
+
+#ifdef OS_ABL_OS_STA_SUPPORT
+#define CONFIG_STA_SUPPORT
+#endif /* OS_ABL_OS_STA_SUPPORT */
+
+/* AP & STA con-current */
+#undef RT_CONFIG_IF_OPMODE_ON_AP
+#undef RT_CONFIG_IF_OPMODE_ON_STA
+
+#if defined(CONFIG_AP_SUPPORT) && defined(CONFIG_STA_SUPPORT)
+#define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode) if (__OpMode == OPMODE_AP)
+#define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode) if (__OpMode == OPMODE_STA)
+#else
+#define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode)
+#define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode)
+#endif
+
+#endif /* OS_ABL_FUNC_SUPPORT */
+
+#endif /* __RTMP_OS_ABL_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_timer.h b/cleopatre/devkit/mt7601udrv/include/rtmp_timer.h
new file mode 100644
index 0000000000..547a867eb5
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_timer.h
@@ -0,0 +1,182 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2008, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_timer.h
+
+ Abstract:
+ Ralink Wireless Driver timer related data structures and delcarations
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+ Shiang Tu Aug-28-2008 init version
+
+*/
+
+#ifndef __RTMP_TIMER_H__
+#define __RTMP_TIMER_H__
+
+#include "rtmp_os.h"
+
+#define DECLARE_TIMER_FUNCTION(_func) \
+ void rtmp_timer_##_func(unsigned long data)
+
+#define GET_TIMER_FUNCTION(_func) \
+ (PVOID)rtmp_timer_##_func
+
+/* ----------------- Timer Related MARCO ---------------*/
+/* In some os or chipset, we have a lot of timer functions and will read/write register, */
+/* it's not allowed in Linux USB sub-system to do it ( because of sleep issue when */
+/* submit to ctrl pipe). So we need a wrapper function to take care it. */
+
+#ifdef RTMP_TIMER_TASK_SUPPORT
+typedef VOID(
+ *RTMP_TIMER_TASK_HANDLE) (
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+#endif /* RTMP_TIMER_TASK_SUPPORT */
+
+typedef struct _RALINK_TIMER_STRUCT {
+ RTMP_OS_TIMER TimerObj; /* Ndis Timer object */
+ BOOLEAN Valid; /* Set to True when call RTMPInitTimer */
+ BOOLEAN State; /* True if timer cancelled */
+ BOOLEAN PeriodicType; /* True if timer is periodic timer */
+ BOOLEAN Repeat; /* True if periodic timer */
+ ULONG TimerValue; /* Timer value in milliseconds */
+ ULONG cookie; /* os specific object */
+ void *pAd;
+#ifdef RTMP_TIMER_TASK_SUPPORT
+ RTMP_TIMER_TASK_HANDLE handle;
+#endif /* RTMP_TIMER_TASK_SUPPORT */
+} RALINK_TIMER_STRUCT, *PRALINK_TIMER_STRUCT;
+
+
+#ifdef RTMP_TIMER_TASK_SUPPORT
+typedef struct _RTMP_TIMER_TASK_ENTRY_ {
+ RALINK_TIMER_STRUCT *pRaTimer;
+ struct _RTMP_TIMER_TASK_ENTRY_ *pNext;
+} RTMP_TIMER_TASK_ENTRY;
+
+#define TIMER_QUEUE_SIZE_MAX 128
+typedef struct _RTMP_TIMER_TASK_QUEUE_ {
+ unsigned int status;
+ unsigned char *pTimerQPoll;
+ RTMP_TIMER_TASK_ENTRY *pQPollFreeList;
+ RTMP_TIMER_TASK_ENTRY *pQHead;
+ RTMP_TIMER_TASK_ENTRY *pQTail;
+} RTMP_TIMER_TASK_QUEUE;
+
+#define BUILD_TIMER_FUNCTION(_func) \
+void rtmp_timer_##_func(unsigned long data) \
+{ \
+ PRALINK_TIMER_STRUCT _pTimer = (PRALINK_TIMER_STRUCT)data; \
+ RTMP_TIMER_TASK_ENTRY *_pQNode; \
+ RTMP_ADAPTER *_pAd; \
+ \
+ _pTimer->handle = _func; \
+ _pAd = (RTMP_ADAPTER *)_pTimer->pAd; \
+ _pQNode = RtmpTimerQInsert(_pAd, _pTimer); \
+ if ((_pQNode == NULL) && (_pAd->TimerQ.status & RTMP_TASK_CAN_DO_INSERT)) \
+ RTMP_OS_Add_Timer(&_pTimer->TimerObj, OS_HZ); \
+}
+#else /* !RTMP_TIMER_TASK_SUPPORT */
+#define BUILD_TIMER_FUNCTION(_func) \
+void rtmp_timer_##_func(unsigned long data) \
+{ \
+ PRALINK_TIMER_STRUCT pTimer = (PRALINK_TIMER_STRUCT) data; \
+ \
+ _func(NULL, (PVOID) pTimer->cookie, NULL, pTimer); \
+ if (pTimer->Repeat) \
+ RTMP_OS_Add_Timer(&pTimer->TimerObj, pTimer->TimerValue); \
+}
+#endif /* RTMP_TIMER_TASK_SUPPORT */
+
+DECLARE_TIMER_FUNCTION(MlmePeriodicExec);
+DECLARE_TIMER_FUNCTION(MlmeRssiReportExec);
+DECLARE_TIMER_FUNCTION(AsicRxAntEvalTimeout);
+DECLARE_TIMER_FUNCTION(APSDPeriodicExec);
+DECLARE_TIMER_FUNCTION(EnqueueStartForPSKExec);
+
+
+#ifdef RTMP_MAC_USB
+DECLARE_TIMER_FUNCTION(BeaconUpdateExec);
+#endif /* RTMP_MAC_USB */
+
+#ifdef CONFIG_MULTI_CHANNEL
+DECLARE_TIMER_FUNCTION(MCC_ChangeAction);
+
+DECLARE_TIMER_FUNCTION(ConcurrentP2PConnectTimeout);
+#endif /* CONFIG_MULTI_CHANNEL */
+
+#ifdef CONFIG_AP_SUPPORT
+DECLARE_TIMER_FUNCTION(APDetectOverlappingExec);
+
+#ifdef DOT11N_DRAFT3
+DECLARE_TIMER_FUNCTION(Bss2040CoexistTimeOut);
+#endif /* DOT11N_DRAFT3 */
+
+DECLARE_TIMER_FUNCTION(GREKEYPeriodicExec);
+DECLARE_TIMER_FUNCTION(CMTimerExec);
+DECLARE_TIMER_FUNCTION(WPARetryExec);
+#ifdef AP_SCAN_SUPPORT
+DECLARE_TIMER_FUNCTION(APScanTimeout);
+#endif /* AP_SCAN_SUPPORT */
+DECLARE_TIMER_FUNCTION(APQuickResponeForRateUpExec);
+
+#ifdef IDS_SUPPORT
+DECLARE_TIMER_FUNCTION(RTMPIdsPeriodicExec);
+#endif /* IDS_SUPPORT */
+
+#endif /* CONFIG_AP_SUPPORT */
+
+
+#ifdef TXBF_SUPPORT
+DECLARE_TIMER_FUNCTION(eTxBfProbeTimerExec);
+#endif // TXBF_SUPPORT //
+
+#ifdef WSC_INCLUDED
+DECLARE_TIMER_FUNCTION(WscEAPOLTimeOutAction);
+DECLARE_TIMER_FUNCTION(Wsc2MinsTimeOutAction);
+DECLARE_TIMER_FUNCTION(WscUPnPMsgTimeOutAction);
+DECLARE_TIMER_FUNCTION(WscM2DTimeOutAction);
+DECLARE_TIMER_FUNCTION(WscPBCTimeOutAction);
+DECLARE_TIMER_FUNCTION(WscScanTimeOutAction);
+DECLARE_TIMER_FUNCTION(WscProfileRetryTimeout);
+#ifdef WSC_LED_SUPPORT
+DECLARE_TIMER_FUNCTION(WscLEDTimer);
+DECLARE_TIMER_FUNCTION(WscSkipTurnOffLEDTimer);
+#endif /* WSC_LED_SUPPORT */
+#ifdef CONFIG_AP_SUPPORT
+DECLARE_TIMER_FUNCTION(WscUpdatePortCfgTimeout);
+#ifdef WSC_V2_SUPPORT
+DECLARE_TIMER_FUNCTION(WscSetupLockTimeout);
+#endif /* WSC_V2_SUPPORT */
+#endif /* CONFIG_AP_SUPPORT */
+#endif /* WSC_INCLUDED */
+
+
+
+
+#ifdef RALINK_ATE
+DECLARE_TIMER_FUNCTION(ATEPeriodicExec);
+#endif /* RALINK_ATE */
+
+#endif /* __RTMP_TIMER_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtmp_type.h b/cleopatre/devkit/mt7601udrv/include/rtmp_type.h
new file mode 100644
index 0000000000..4c80ee0f9c
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtmp_type.h
@@ -0,0 +1,192 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtmp_type.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+ Paul Lin 1-2-2004
+*/
+
+#ifndef __RTMP_TYPE_H__
+#define __RTMP_TYPE_H__
+
+
+
+#ifndef GNU_PACKED
+#define GNU_PACKED __attribute__ ((packed))
+#endif /* GNU_PACKED */
+
+
+#ifdef LINUX
+/* Put platform dependent declaration here */
+/* For example, linux type definition */
+typedef unsigned char UINT8;
+typedef unsigned short UINT16;
+typedef unsigned int UINT32;
+typedef unsigned long long UINT64;
+typedef short INT16;
+typedef int INT32;
+typedef long long INT64;
+
+typedef unsigned char UCHAR;
+typedef unsigned short USHORT;
+typedef unsigned int UINT;
+typedef unsigned long ULONG;
+#endif /* LINUX */
+
+typedef unsigned char *PUINT8;
+typedef unsigned short *PUINT16;
+typedef unsigned int *PUINT32;
+typedef unsigned long long *PUINT64;
+typedef int *PINT32;
+typedef long long *PINT64;
+
+/* modified for fixing compile warning on Sigma 8634 platform */
+typedef char STRING;
+
+typedef signed char CHAR;
+
+typedef signed short SHORT;
+typedef signed int INT;
+typedef signed long LONG;
+typedef signed long long LONGLONG;
+
+typedef unsigned long long ULONGLONG;
+
+typedef unsigned char BOOLEAN;
+#ifdef LINUX
+typedef void VOID;
+#endif /* LINUX */
+
+typedef char *PSTRING;
+typedef VOID *PVOID;
+typedef CHAR *PCHAR;
+typedef UCHAR *PUCHAR;
+typedef USHORT *PUSHORT;
+typedef LONG *PLONG;
+typedef ULONG *PULONG;
+typedef UINT *PUINT;
+
+typedef unsigned int NDIS_MEDIA_STATE;
+
+typedef union _LARGE_INTEGER {
+ struct {
+#ifdef RT_BIG_ENDIAN
+ INT32 HighPart;
+ UINT LowPart;
+#else
+ UINT LowPart;
+ INT32 HighPart;
+#endif
+ } u;
+ INT64 QuadPart;
+} LARGE_INTEGER;
+
+
+/* Register set pair for initialzation register set definition */
+typedef struct _RTMP_REG_PAIR {
+ UINT32 Register;
+ UINT32 Value;
+} RTMP_REG_PAIR, *PRTMP_REG_PAIR;
+
+typedef struct _REG_PAIR {
+ UCHAR Register;
+ UCHAR Value;
+} REG_PAIR, *PREG_PAIR;
+
+typedef struct _REG_PAIR_CHANNEL {
+ UCHAR Register;
+ UCHAR FirstChannel;
+ UCHAR LastChannel;
+ UCHAR Value;
+} REG_PAIR_CHANNEL, *PREG_PAIR_CHANNEL;
+
+typedef struct _REG_PAIR_BW {
+ UCHAR Register;
+ UCHAR BW;
+ UCHAR Value;
+} REG_PAIR_BW, *PREG_PAIR_BW;
+
+
+typedef struct _REG_PAIR_PHY{
+ UCHAR reg;
+ UCHAR s_ch;
+ UCHAR e_ch;
+ UCHAR phy; /* RF_MODE_XXX */
+ UCHAR bw; /* RF_BW_XX */
+ UCHAR val;
+}REG_PAIR_PHY;
+
+
+/* Register set pair for initialzation register set definition */
+typedef struct _RTMP_RF_REGS {
+ UCHAR Channel;
+ UINT32 R1;
+ UINT32 R2;
+ UINT32 R3;
+ UINT32 R4;
+} RTMP_RF_REGS, *PRTMP_RF_REGS;
+
+typedef struct _FREQUENCY_ITEM {
+ UCHAR Channel;
+ UCHAR N;
+ UCHAR R;
+ UCHAR K;
+} FREQUENCY_ITEM, *PFREQUENCY_ITEM;
+
+typedef int NTSTATUS;
+
+#define STATUS_SUCCESS 0x00
+#define STATUS_UNSUCCESSFUL 0x01
+
+typedef struct _QUEUE_ENTRY {
+ struct _QUEUE_ENTRY *Next;
+} QUEUE_ENTRY, *PQUEUE_ENTRY;
+
+/* Queue structure */
+typedef struct _QUEUE_HEADER {
+ PQUEUE_ENTRY Head;
+ PQUEUE_ENTRY Tail;
+ ULONG Number;
+} QUEUE_HEADER, *PQUEUE_HEADER;
+
+typedef struct _BANK_RF_REG_PAIR {
+ UCHAR Bank;
+ UCHAR Register;
+ UCHAR Value;
+} BANK_RF_REG_PAIR, *PBANK_RF_REG_PAIR;
+
+typedef struct _R_M_W_REG{
+ UINT32 Register;
+ UINT32 ClearBitMask;
+ UINT32 Value;
+} R_M_W_REG, *PR_M_W_REG;
+
+typedef struct _RF_R_M_W_REG{
+ UCHAR Bank;
+ UCHAR Register;
+ UCHAR ClearBitMask;
+ UCHAR Value;
+} RF_R_M_W_REG, *PRF_R_M_W_REG;
+
+#endif /* __RTMP_TYPE_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/rtusb_io.h b/cleopatre/devkit/mt7601udrv/include/rtusb_io.h
new file mode 100644
index 0000000000..a249a8b9b3
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/rtusb_io.h
@@ -0,0 +1,195 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2009, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ rtusb_io.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+*/
+
+#ifndef __RTUSB_IO_H__
+#define __RTUSB_IO_H__
+
+#include "wpa_cmm.h"
+#include "rtmp_type.h"
+
+/* First RTUSB IO command number */
+#define CMDTHREAD_FIRST_CMD_ID 0x0D730101
+
+#define CMDTHREAD_RESET_BULK_OUT 0x0D730101
+#define CMDTHREAD_RESET_BULK_IN 0x0D730102
+#define CMDTHREAD_CHECK_GPIO 0x0D730103
+#define CMDTHREAD_SET_ASIC_WCID 0x0D730104
+#define CMDTHREAD_DEL_ASIC_WCID 0x0D730105
+#define CMDTHREAD_SET_CLIENT_MAC_ENTRY 0x0D730106
+
+
+#ifdef CONFIG_AP_SUPPORT
+#define CMDTHREAD_AP_UPDATE_CAPABILITY_AND_ERPIE 0x0D73010B
+#define CMDTHREAD_AP_ENABLE_TX_BURST 0x0D73010C
+#define CMDTHREAD_AP_DISABLE_TX_BURST 0x0D73010D
+#define CMDTHREAD_AP_ADJUST_EXP_ACK_TIME 0x0D73010E
+#define CMDTHREAD_AP_RECOVER_EXP_ACK_TIME 0x0D73010F
+#define CMDTHREAD_CHAN_RESCAN 0x0D730110
+#endif /* CONFIG_AP_SUPPORT */
+
+#define CMDTHREAD_SET_LED_STATUS 0x0D730111 /* Set WPS LED status (LED_WPS_XXX). */
+#ifdef WSC_INCLUDED
+#ifdef WSC_LED_SUPPORT
+#define CMDTHREAD_LED_WPS_MODE10 0x0D730112
+#endif /* WSC_LED_SUPPORT */
+#endif /* WSC_INCLUDED */
+
+/* Security related */
+#define CMDTHREAD_SET_WCID_SEC_INFO 0x0D730113
+#define CMDTHREAD_SET_ASIC_WCID_IVEIV 0x0D730114
+#define CMDTHREAD_SET_ASIC_WCID_ATTR 0x0D730115
+#define CMDTHREAD_SET_ASIC_SHARED_KEY 0x0D730116
+#define CMDTHREAD_SET_ASIC_PAIRWISE_KEY 0x0D730117
+#define CMDTHREAD_REMOVE_PAIRWISE_KEY 0x0D730118
+
+#ifdef CONFIG_AP_SUPPORT
+#define CMDTHREAD_802_11_COUNTER_MEASURE 0x0D73011A
+#endif /* CONFIG_AP_SUPPORT */
+
+/* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
+#define CMDTHREAD_UPDATE_PROTECT 0x0D73011B
+/* end johnli */
+
+#ifdef LINUX
+#ifdef RT_CFG80211_SUPPORT
+#define CMDTHREAD_REG_HINT 0x0D73011C
+#define CMDTHREAD_REG_HINT_11D 0x0D73011D
+#define CMDTHREAD_SCAN_END 0x0D73011E
+#define CMDTHREAD_CONNECT_RESULT_INFORM 0x0D73011F
+#endif /* RT_CFG80211_SUPPORT */
+#endif /* LINUX */
+
+
+
+
+#define CMDTHREAD_RESPONSE_EVENT_CALLBACK 0x0D730123
+
+
+typedef struct _CMDHandler_TLV {
+ USHORT Offset;
+ USHORT Length;
+ UCHAR DataFirst;
+} CMDHandler_TLV, *PCMDHandler_TLV;
+
+
+typedef struct _RT_SET_ASIC_WCID {
+ ULONG WCID; /* mechanism for rekeying: 0:disable, 1: time-based, 2: packet-based */
+ ULONG SetTid; /* time-based: seconds, packet-based: kilo-packets */
+ ULONG DeleteTid; /* time-based: seconds, packet-based: kilo-packets */
+ UCHAR Addr[MAC_ADDR_LEN]; /* avoid in interrupt when write key */
+} RT_SET_ASIC_WCID, *PRT_SET_ASIC_WCID;
+
+typedef struct _RT_ASIC_WCID_SEC_INFO {
+ UCHAR BssIdx;
+ UCHAR KeyIdx;
+ UCHAR CipherAlg;
+ UINT8 Wcid;
+ UINT8 KeyTabFlag;
+} RT_ASIC_WCID_SEC_INFO, *PRT_ASIC_WCID_SEC_INFO;
+
+typedef struct _RT_ASIC_WCID_IVEIV_ENTRY {
+ UINT8 Wcid;
+ UINT32 Iv;
+ UINT32 Eiv;
+} RT_ASIC_WCID_IVEIV_ENTRY, *PRT_ASIC_WCID_IVEIV_ENTRY;
+
+typedef struct _RT_ASIC_WCID_ATTR_ENTRY {
+ UCHAR BssIdx;
+ UCHAR KeyIdx;
+ UCHAR CipherAlg;
+ UINT8 Wcid;
+ UINT8 KeyTabFlag;
+} RT_ASIC_WCID_ATTR_ENTRY, *PRT_ASIC_WCID_ATTR_ENTRY;
+
+typedef struct _RT_ASIC_PAIRWISE_KEY {
+ UINT8 WCID;
+ CIPHER_KEY CipherKey;
+} RT_ASIC_PAIRWISE_KEY, *PRT_ASIC_PAIRWISE_KEY;
+
+typedef struct _RT_ASIC_SHARED_KEY {
+ UCHAR BssIndex;
+ UCHAR KeyIdx;
+ CIPHER_KEY CipherKey;
+} RT_ASIC_SHARED_KEY, *PRT_ASIC_SHARED_KEY;
+
+typedef struct _RT_ASIC_PROTECT_INFO {
+ USHORT OperationMode;
+ UCHAR SetMask;
+ BOOLEAN bDisableBGProtect;
+ BOOLEAN bNonGFExist;
+} RT_ASIC_PROTECT_INFO, *PRT_ASIC_PROTECT_INFO;
+
+/******************************************************************************
+
+ USB Cmd to ASIC Related MACRO
+
+******************************************************************************/
+/* reset MAC of a station entry to 0xFFFFFFFFFFFF */
+#define RTMP_STA_ENTRY_MAC_RESET(pAd, Wcid) \
+ { RT_SET_ASIC_WCID SetAsicWcid; \
+ SetAsicWcid.WCID = Wcid; \
+ RTEnqueueInternalCmd(pAd, CMDTHREAD_DEL_ASIC_WCID, \
+ &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); }
+
+/* Set MAC register value according operation mode */
+#ifdef CONFIG_AP_SUPPORT
+#define RTMP_AP_UPDATE_CAPABILITY_AND_ERPIE(pAd) \
+ RTEnqueueInternalCmd(pAd, CMDTHREAD_AP_UPDATE_CAPABILITY_AND_ERPIE, NULL, 0);
+#endif /* CONFIG_AP_SUPPORT */
+
+/* Insert the BA bitmap to ASIC for the Wcid entry */
+#define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID) \
+ do{ \
+ RT_SET_ASIC_WCID SetAsicWcid; \
+ SetAsicWcid.WCID = (_Aid); \
+ SetAsicWcid.SetTid = (0x10000<<(_TID)); \
+ SetAsicWcid.DeleteTid = 0xffffffff; \
+ RTEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \
+ }while(0)
+
+/* Remove the BA bitmap from ASIC for the Wcid entry */
+#define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID) \
+ do{ \
+ RT_SET_ASIC_WCID SetAsicWcid; \
+ SetAsicWcid.WCID = (_Wcid); \
+ SetAsicWcid.SetTid = (0xffffffff); \
+ SetAsicWcid.DeleteTid = (0x10000<<(_TID) ); \
+ RTEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \
+ }while(0)
+
+#define RTMP_UPDATE_PROTECT(_pAd, _OperationMode, _SetMask, _bDisableBGProtect, _bNonGFExist) \
+ do {\
+ RT_ASIC_PROTECT_INFO AsicProtectInfo;\
+ AsicProtectInfo.OperationMode = (_OperationMode);\
+ AsicProtectInfo.SetMask = (_SetMask);\
+ AsicProtectInfo.bDisableBGProtect = (_bDisableBGProtect);\
+ AsicProtectInfo.bNonGFExist = (_bNonGFExist);\
+ RTEnqueueInternalCmd((_pAd), CMDTHREAD_UPDATE_PROTECT, &AsicProtectInfo, sizeof(RT_ASIC_PROTECT_INFO));\
+ } while(0)
+
+#endif /* __RTUSB_IO_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/spectrum.h b/cleopatre/devkit/mt7601udrv/include/spectrum.h
new file mode 100644
index 0000000000..6a2c1bda19
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/spectrum.h
@@ -0,0 +1,215 @@
+
+#ifndef __SPECTRUM_H__
+#define __SPECTRUM_H__
+
+#include "rtmp_type.h"
+#include "spectrum_def.h"
+
+
+UINT8 GetRegulatoryMaxTxPwr(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT8 channel);
+
+CHAR RTMP_GetTxPwr(
+ IN PRTMP_ADAPTER pAd,
+ IN HTTRANSMIT_SETTING HTTxMode);
+
+/*
+ ==========================================================================
+ Description:
+ Prepare Measurement request action frame and enqueue it into
+ management queue waiting for transmition.
+
+ Parametrs:
+ 1. the destination mac address of the frame.
+
+ Return : None.
+ ==========================================================================
+ */
+VOID MakeMeasurementReqFrame(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pOutBuffer,
+ OUT PULONG pFrameLen,
+ IN UINT8 TotalLen,
+ IN UINT8 Category,
+ IN UINT8 Action,
+ IN UINT8 MeasureToken,
+ IN UINT8 MeasureReqMode,
+ IN UINT8 MeasureReqType,
+ IN UINT16 NumOfRepetitions);
+
+/*
+ ==========================================================================
+ Description:
+ Prepare Measurement report action frame and enqueue it into
+ management queue waiting for transmition.
+
+ Parametrs:
+ 1. the destination mac address of the frame.
+
+ Return : None.
+ ==========================================================================
+ */
+VOID EnqueueMeasurementRep(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDA,
+ IN UINT8 DialogToken,
+ IN UINT8 MeasureToken,
+ IN UINT8 MeasureReqMode,
+ IN UINT8 MeasureReqType,
+ IN UINT8 ReportInfoLen,
+ IN PUINT8 pReportInfo);
+
+/*
+ ==========================================================================
+ Description:
+ Prepare TPC Request action frame and enqueue it into
+ management queue waiting for transmition.
+
+ Parametrs:
+ 1. the destination mac address of the frame.
+
+ Return : None.
+ ==========================================================================
+ */
+VOID EnqueueTPCReq(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDA,
+ IN UCHAR DialogToken);
+
+/*
+ ==========================================================================
+ Description:
+ Prepare TPC Report action frame and enqueue it into
+ management queue waiting for transmition.
+
+ Parametrs:
+ 1. the destination mac address of the frame.
+
+ Return : None.
+ ==========================================================================
+ */
+VOID EnqueueTPCRep(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDA,
+ IN UINT8 DialogToken,
+ IN UINT8 TxPwr,
+ IN UINT8 LinkMargin);
+
+#ifdef WDS_SUPPORT
+/*
+ ==========================================================================
+ Description:
+ Prepare Channel Switch Announcement action frame and enqueue it into
+ management queue waiting for transmition.
+
+ Parametrs:
+ 1. the destination mac address of the frame.
+ 2. Channel switch announcement mode.
+ 2. a New selected channel.
+
+ Return : None.
+ ==========================================================================
+ */
+VOID EnqueueChSwAnn(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pDA,
+ IN UINT8 ChSwMode,
+ IN UINT8 NewCh);
+#endif /* WDS_SUPPORT */
+
+/*
+ ==========================================================================
+ Description:
+ Spectrun action frames Handler such as channel switch annoucement,
+ measurement report, measurement request actions frames.
+
+ Parametrs:
+ Elme - MLME message containing the received frame
+
+ Return : None.
+ ==========================================================================
+ */
+VOID PeerSpectrumAction(
+ IN PRTMP_ADAPTER pAd,
+ IN MLME_QUEUE_ELEM *Elem);
+
+/*
+ ==========================================================================
+ Description:
+
+ Parametrs:
+
+ Return : None.
+ ==========================================================================
+ */
+INT Set_MeasureReq_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_TpcReq_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PwrConstraint(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+
+NDIS_STATUS MeasureReqTabInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID MeasureReqTabExit(
+ IN PRTMP_ADAPTER pAd);
+
+PMEASURE_REQ_ENTRY MeasureReqLookUp(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT8 DialogToken);
+
+PMEASURE_REQ_ENTRY MeasureReqInsert(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT8 DialogToken);
+
+VOID MeasureReqDelete(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT8 DialogToken);
+
+VOID InsertChannelRepIE(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pFrameBuf,
+ OUT PULONG pFrameLen,
+ IN PSTRING pCountry,
+ IN UINT8 RegulatoryClass);
+
+VOID InsertTpcReportIE(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pFrameBuf,
+ OUT PULONG pFrameLen,
+ IN UINT8 TxPwr,
+ IN UINT8 LinkMargin);
+
+VOID InsertDialogToken(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pFrameBuf,
+ OUT PULONG pFrameLen,
+ IN UINT8 DialogToken);
+
+NDIS_STATUS TpcReqTabInit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID TpcReqTabExit(
+ IN PRTMP_ADAPTER pAd);
+
+VOID NotifyChSwAnnToPeerAPs(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pRA,
+ IN PUCHAR pTA,
+ IN UINT8 ChSwMode,
+ IN UINT8 Channel);
+
+VOID RguClass_BuildBcnChList(
+ IN PRTMP_ADAPTER pAd,
+ OUT PUCHAR pBuf,
+ OUT PULONG pBufLen);
+#endif /* __SPECTRUM_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/spectrum_def.h b/cleopatre/devkit/mt7601udrv/include/spectrum_def.h
new file mode 100644
index 0000000000..316956c132
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/spectrum_def.h
@@ -0,0 +1,249 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ spectrum_def.h
+
+ Abstract:
+ Handle association related requests either from WSTA or from local MLME
+
+ Revision History:
+ Who When What
+ --------- ---------- ----------------------------------------------
+ Fonchi Wu 2008 created for 802.11h
+ */
+
+#ifndef __SPECTRUM_DEF_H__
+#define __SPECTRUM_DEF_H__
+
+
+#define MAX_MEASURE_REQ_TAB_SIZE 32
+/* Size of hash tab must be power of 2. */
+#define MAX_HASH_MEASURE_REQ_TAB_SIZE MAX_MEASURE_REQ_TAB_SIZE
+
+#define MAX_TPC_REQ_TAB_SIZE 32
+/* Size of hash tab must be power of 2. */
+#define MAX_HASH_TPC_REQ_TAB_SIZE MAX_TPC_REQ_TAB_SIZE
+
+#define MIN_RCV_PWR 100 /* Negative value ((dBm) */
+
+#define TPC_REQ_AGE_OUT 500 /* ms */
+#define MQ_REQ_AGE_OUT 500 /* ms */
+
+#define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) & (MAX_HASH_TPC_REQ_TAB_SIZE - 1))
+#define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) & (MAX_MEASURE_REQ_TAB_SIZE - 1))
+
+typedef struct _MEASURE_REQ_ENTRY
+{
+ struct _MEASURE_REQ_ENTRY *pNext;
+ ULONG lastTime;
+ BOOLEAN Valid;
+ UINT8 DialogToken;
+ UINT8 MeasureDialogToken[3]; /* 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure. */
+} MEASURE_REQ_ENTRY, *PMEASURE_REQ_ENTRY;
+
+typedef struct _MEASURE_REQ_TAB
+{
+ UCHAR Size;
+ PMEASURE_REQ_ENTRY Hash[MAX_HASH_MEASURE_REQ_TAB_SIZE];
+ MEASURE_REQ_ENTRY Content[MAX_MEASURE_REQ_TAB_SIZE];
+} MEASURE_REQ_TAB, *PMEASURE_REQ_TAB;
+
+typedef struct _TPC_REQ_ENTRY
+{
+ struct _TPC_REQ_ENTRY *pNext;
+ ULONG lastTime;
+ BOOLEAN Valid;
+ UINT8 DialogToken;
+} TPC_REQ_ENTRY, *PTPC_REQ_ENTRY;
+
+typedef struct _TPC_REQ_TAB
+{
+ UCHAR Size;
+ PTPC_REQ_ENTRY Hash[MAX_HASH_TPC_REQ_TAB_SIZE];
+ TPC_REQ_ENTRY Content[MAX_TPC_REQ_TAB_SIZE];
+} TPC_REQ_TAB, *PTPC_REQ_TAB;
+
+
+/* The regulatory information */
+typedef struct _DOT11_CHANNEL_SET
+{
+ UCHAR NumberOfChannels;
+ UINT8 MaxTxPwr;
+ UCHAR ChannelList[16];
+} DOT11_CHANNEL_SET, *PDOT11_CHANNEL_SET;
+
+typedef struct _DOT11_REGULATORY_INFORMATION
+{
+ UCHAR RegulatoryClass;
+ DOT11_CHANNEL_SET ChannelSet;
+} DOT11_REGULATORY_INFORMATION, *PDOT11_REGULATORY_INFORMATION;
+
+
+
+#define RM_TPC_REQ 0
+#define RM_MEASURE_REQ 1
+
+#define RM_BASIC 0
+#define RM_CCA 1
+#define RM_RPI_HISTOGRAM 2
+#define RM_CH_LOAD 3
+#define RM_NOISE_HISTOGRAM 4
+
+
+typedef struct GNU_PACKED _TPC_REPORT_INFO
+{
+ UINT8 TxPwr;
+ UINT8 LinkMargin;
+} TPC_REPORT_INFO, *PTPC_REPORT_INFO;
+
+typedef struct GNU_PACKED _CH_SW_ANN_INFO
+{
+ UINT8 ChSwMode;
+ UINT8 Channel;
+ UINT8 ChSwCnt;
+} CH_SW_ANN_INFO, *PCH_SW_ANN_INFO;
+
+typedef union GNU_PACKED _MEASURE_REQ_MODE
+{
+#ifdef RT_BIG_ENDIAN
+ struct GNU_PACKED
+ {
+
+ UINT8 :3;
+ UINT8 DurationMandatory:1;
+ UINT8 Report:1;
+ UINT8 Request:1;
+ UINT8 Enable:1;
+ UINT8 Parallel:1;
+ } field;
+#else
+ struct GNU_PACKED
+ {
+ UINT8 Parallel:1;
+ UINT8 Enable:1;
+ UINT8 Request:1;
+ UINT8 Report:1;
+ UINT8 DurationMandatory:1;
+ UINT8 :3;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+ UINT8 word;
+} MEASURE_REQ_MODE, *PMEASURE_REQ_MODE;
+
+typedef struct GNU_PACKED _MEASURE_REQ
+{
+ UINT8 ChNum;
+ UINT64 MeasureStartTime;
+ UINT16 MeasureDuration;
+} MEASURE_REQ, *PMEASURE_REQ;
+
+typedef struct GNU_PACKED _MEASURE_REQ_INFO
+{
+ UINT8 Token;
+ MEASURE_REQ_MODE ReqMode;
+ UINT8 ReqType;
+ UINT8 Oct[0];
+} MEASURE_REQ_INFO, *PMEASURE_REQ_INFO;
+
+typedef union GNU_PACKED _MEASURE_BASIC_REPORT_MAP
+{
+#ifdef RT_BIG_ENDIAN
+ struct GNU_PACKED
+ {
+ UINT8 Rev:3;
+
+ UINT8 Unmeasure:1;
+ UINT8 Radar:1;
+ UINT8 UnidentifiedSignal:1;
+ UINT8 OfdmPreamble:1;
+ UINT8 BSS:1;
+ } field;
+#else
+ struct GNU_PACKED
+ {
+ UINT8 BSS:1;
+
+ UINT8 OfdmPreamble:1;
+ UINT8 UnidentifiedSignal:1;
+ UINT8 Radar:1;
+ UINT8 Unmeasure:1;
+ UINT8 Rev:3;
+ } field;
+#endif /* RT_BIG_ENDIAN */
+ UINT8 word;
+} MEASURE_BASIC_REPORT_MAP, *PMEASURE_BASIC_REPORT_MAP;
+
+typedef struct GNU_PACKED _MEASURE_BASIC_REPORT
+{
+ UINT8 ChNum;
+ UINT64 MeasureStartTime;
+ UINT16 MeasureDuration;
+ MEASURE_BASIC_REPORT_MAP Map;
+} MEASURE_BASIC_REPORT, *PMEASURE_BASIC_REPORT;
+
+typedef struct GNU_PACKED _MEASURE_CCA_REPORT
+{
+ UINT8 ChNum;
+ UINT64 MeasureStartTime;
+ UINT16 MeasureDuration;
+ UINT8 CCA_Busy_Fraction;
+} MEASURE_CCA_REPORT, *PMEASURE_CCA_REPORT;
+
+typedef struct GNU_PACKED _MEASURE_RPI_REPORT
+{
+ UINT8 ChNum;
+ UINT64 MeasureStartTime;
+ UINT16 MeasureDuration;
+ UINT8 RPI_Density[8];
+} MEASURE_RPI_REPORT, *PMEASURE_RPI_REPORT;
+
+typedef union GNU_PACKED _MEASURE_REPORT_MODE
+{
+ struct GNU_PACKED
+ {
+#ifdef RT_BIG_ENDIAN
+ UINT8 Rev:5;
+ UINT8 Refused:1;
+ UINT8 Incapable:1;
+ UINT8 Late:1;
+#else
+ UINT8 Late:1;
+ UINT8 Incapable:1;
+ UINT8 Refused:1;
+ UINT8 Rev:5;
+#endif /* RT_BIG_ENDIAN */
+ } field;
+ UINT8 word;
+} MEASURE_REPORT_MODE, *PMEASURE_REPORT_MODE;
+
+typedef struct GNU_PACKED _MEASURE_REPORT_INFO
+{
+ UINT8 Token;
+ UINT8 ReportMode;
+ UINT8 ReportType;
+ UINT8 Octect[0];
+} MEASURE_REPORT_INFO, *PMEASURE_REPORT_INFO;
+
+typedef struct GNU_PACKED _QUIET_INFO
+{
+ UINT8 QuietCnt;
+ UINT8 QuietPeriod;
+ UINT16 QuietDuration;
+ UINT16 QuietOffset;
+} QUIET_INFO, *PQUIET_INFO;
+
+#endif /* __SPECTRUM_DEF_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/sta_cfg.h b/cleopatre/devkit/mt7601udrv/include/sta_cfg.h
new file mode 100644
index 0000000000..5537384353
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/sta_cfg.h
@@ -0,0 +1,72 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2009, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ sta_cfg.h
+
+ Abstract:
+
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+
+*/
+
+#ifndef __STA_CFG_H__
+#define __STA_CFG_H__
+
+INT RTMPSTAPrivIoctlSet(
+ IN RTMP_ADAPTER *pAd,
+ IN PSTRING SetProcName,
+ IN PSTRING ProcArg);
+
+#if (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT)
+/* set WOW enable */
+INT Set_WOW_Enable(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+/* set GPIO pin for wake-up signal */
+INT Set_WOW_GPIO(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+/* set delay time for WOW really enable */
+INT Set_WOW_Delay(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+/* set wake up hold time */
+INT Set_WOW_Hold(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+/* set wakeup signal type */
+INT Set_WOW_InBand(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* (defined(WOW_SUPPORT) && defined(RTMP_MAC_USB)) || defined(NEW_WOW_SUPPORT) */
+
+#ifdef RTMP_MAC_USB
+/* Sets the FW into WOW Suspend mode */
+INT Set_UsbWOWSuspend(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+/* Resume the FW to Normal mode */
+INT Set_UsbWOWResume(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* RTMP_MAC_USB */
+
+#endif /* __STA_CFG_H__ */
diff --git a/cleopatre/devkit/mt7601udrv/include/uapsd.h b/cleopatre/devkit/mt7601udrv/include/uapsd.h
new file mode 100644
index 0000000000..3c7fbb975a
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/uapsd.h
@@ -0,0 +1,725 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All related WMM UAPSD definitions & function prototype.
+
+***************************************************************************/
+
+
+/* only for UAPSD_TIMING_RECORD */
+
+
+#define UAPSD_TIMING_RECORD_MAX 1000
+#define UAPSD_TIMING_RECORD_DISPLAY_TIMES 10
+
+#define UAPSD_QUEUE_TIMEOUT 5 /* unit: seconds */
+
+#define UAPSD_TIMING_RECORD_ISR 1
+#define UAPSD_TIMING_RECORD_TASKLET 2
+#define UAPSD_TIMING_RECORD_TRG_RCV 3
+#define UAPSD_TIMING_RECORD_MOVE2TX 4
+#define UAPSD_TIMING_RECORD_TX2AIR 5
+
+#define UAPSD_TIMING_CTRL_STOP 0
+#define UAPSD_TIMING_CTRL_START 1
+#define UAPSD_TIMING_CTRL_SUSPEND 2
+
+#ifdef UAPSD_TIMING_RECORD_FUNC
+#define UAPSD_TIMING_RECORD_START() \
+ UAPSD_TimingRecordCtrl(UAPSD_TIMING_CTRL_START);
+#define UAPSD_TIMING_RECORD_STOP() \
+ UAPSD_TimingRecordCtrl(UAPSD_TIMING_CTRL_STOP);
+#define UAPSD_TIMING_RECORD(__pAd, __Type) \
+ UAPSD_TimingRecord(__pAd, __Type);
+#define UAPSD_TIMING_RECORD_INDEX(__LoopIndex) \
+ UAPSD_TimeingRecordLoopIndex(__LoopIndex);
+#else
+
+#define UAPSD_TIMING_RECORD_START()
+#define UAPSD_TIMING_RECORD_STOP()
+#define UAPSD_TIMING_RECORD(__pAd, __type)
+#define UAPSD_TIMING_RECORD_INDEX(__LoopIndex)
+#endif /* UAPSD_TIMING_RECORD_FUNC */
+
+
+/* timing */
+#define UAPSD_TIMESTAMP_GET(__pAd, __TimeStamp) \
+ { \
+ UINT32 __CSR=0; UINT64 __Value64; \
+ RTMP_IO_READ32((__pAd), TSF_TIMER_DW0, &__CSR); \
+ __TimeStamp = (UINT64)__CSR; \
+ RTMP_IO_READ32((__pAd), TSF_TIMER_DW1, &__CSR); \
+ __Value64 = (UINT64)__CSR; \
+ __TimeStamp |= (__Value64 << 32); \
+ }
+
+
+#define UAPSD_TIME_GET(__pAd, __Time) \
+ { \
+ NdisGetSystemUpTime(&__Time); \
+ }
+
+/* uapsd packet */
+#ifdef VENDOR_FEATURE3_SUPPORT
+#define UAPSD_INSERT_QUEUE_AC UAPSD_InsertTailQueueAc
+#else
+#define UAPSD_INSERT_QUEUE_AC InsertTailQueueAc
+#endif /* VENDOR_FEATURE3_SUPPORT */
+
+/* uapsd initialization */
+#define UAPSD_INFO_INIT(__pInfo) \
+{ \
+ (__pInfo)->bAPSDCapable = FALSE; \
+}
+
+#define UAPSD_SP_START(__pAd, __pEntry) \
+ __pEntry->bAPSDFlagSPStart = 1;
+
+/* for AP, we maybe sleep until all SPs are closed */
+#define UAPSD_SP_END(__pAd, __pEntry) \
+ __pEntry->bAPSDFlagSPStart = 0;
+
+
+
+/* recover the peer power save mode virtually */
+#define RTMP_PS_VIRTUAL_SLEEP(__pMacEntry) \
+{ \
+ __pMacEntry->FlgPsModeIsWakeForAWhile = FALSE; \
+ __pMacEntry->VirtualTimeout = 0; \
+ DBGPRINT(RT_DEBUG_TRACE, \
+ ("%02x:%02x:%02x:%02x:%02x:%02x can sleep (ps mode = %d)!\n", \
+ __pMacEntry->Addr[0], __pMacEntry->Addr[1], __pMacEntry->Addr[2], \
+ __pMacEntry->Addr[3], __pMacEntry->Addr[4], __pMacEntry->Addr[5], \
+ __pMacEntry->PsMode)); \
+}
+
+/* check if the peer virtual ps mode timeout */
+#define RTMP_PS_VIRTUAL_TIMEOUT_HANDLE(__pMacEntry) \
+{ \
+ if (__pMacEntry->VirtualTimeout > 0) \
+ { \
+ __pMacEntry->VirtualTimeout --; \
+ if (__pMacEntry->VirtualTimeout == 0) \
+ { \
+ DBGPRINT(RT_DEBUG_TRACE, \
+ ("tdls uapsd> virtual ps timeout!\n")); \
+ RTMP_PS_VIRTUAL_SLEEP(__pMacEntry); \
+ } \
+ } \
+}
+
+/* extern MACRO & function */
+#ifndef MODULE_WMM_UAPSD
+
+#define UAPSD_EXTERN extern
+
+/* Public Marco list */
+
+/*
+ Init some parameters in packet structure for QoS Null frame;
+ purpose: is for management frame tx done use
+*/
+#define UAPSD_MR_QOS_NULL_HANDLE(__pAd, __pData, __pPacket) \
+ { \
+ PHEADER_802_11 __pHeader = (PHEADER_802_11)(__pData); \
+ MAC_TABLE_ENTRY *__pEntry; \
+ if (__pHeader->FC.SubType == SUBTYPE_QOS_NULL) \
+ { \
+ RTMP_SET_PACKET_QOS_NULL((__pPacket)); \
+ __pEntry = MacTableLookup((__pAd), __pHeader->Addr1); \
+ if (__pEntry != NULL) \
+ { \
+ RTMP_SET_PACKET_WCID((__pPacket), __pEntry->Aid); \
+ } \
+ } \
+ else \
+ { \
+ RTMP_SET_PACKET_NON_QOS_NULL((__pPacket)); \
+ } \
+ }
+
+/*
+ Init MAC entry UAPSD parameters;
+ purpose: initialize UAPSD PS queue and control parameters
+*/
+#define UAPSD_MR_ENTRY_INIT(__pEntry) \
+ { \
+ UINT16 __IdAc; \
+ for(__IdAc=0; __IdAc<WMM_NUM_OF_AC; __IdAc++) \
+ InitializeQueueHeader(&(__pEntry)->UAPSDQueue[__IdAc]); \
+ (__pEntry)->UAPSDTxNum = 0; \
+ (__pEntry)->pUAPSDEOSPFrame = NULL; \
+ (__pEntry)->bAPSDFlagSPStart = 0; \
+ (__pEntry)->bAPSDFlagEOSPOK = 0; \
+ (__pEntry)->MaxSPLength = 0; \
+ DBGPRINT(RT_DEBUG_TRACE, ("uapsd> MaxSPLength = 0!\n")); \
+ }
+
+/*
+ Reset MAC entry UAPSD parameters;
+ purpose: clean all UAPSD PS queue; release the EOSP frame if exists;
+ reset control parameters
+*/
+#define UAPSD_MR_ENTRY_RESET(__pAd, __pEntry) \
+ { \
+ MAC_TABLE_ENTRY *__pSta; \
+ UINT32 __IdAc; \
+ __pSta = (__pEntry); \
+ /* clear all U-APSD queues */ \
+ for(__IdAc=0; __IdAc<WMM_NUM_OF_AC; __IdAc++) \
+ RtmpCleanupPsQueue((__pAd), &__pSta->UAPSDQueue[__IdAc]); \
+ /* clear EOSP frame */ \
+ __pSta->UAPSDTxNum = 0; \
+ if (__pSta->pUAPSDEOSPFrame != NULL) { \
+ RELEASE_NDIS_PACKET((__pAd), \
+ QUEUE_ENTRY_TO_PACKET(__pSta->pUAPSDEOSPFrame), \
+ NDIS_STATUS_FAILURE); \
+ __pSta->pUAPSDEOSPFrame = NULL; } \
+ __pSta->bAPSDFlagSPStart = 0; \
+ __pSta->bAPSDFlagEOSPOK = 0; \
+ UAPSD_SP_END(__pAd, __pSta); \
+ DBGPRINT(RT_DEBUG_TRACE, ("uapsd> clear UAPSD queues!\n")); }
+
+/*
+ * we can not use bMoreData bit to get EOSP bit because
+ * maybe bMoreData = 1 & EOSP = 1 when Max SP Length != 0
+ */
+#define UAPSD_MR_EOSP_SET(__pQosCtrl, __pTxBlk) \
+ if (CLIENT_STATUS_TEST_FLAG((__pTxBlk)->pMacEntry, \
+ fCLIENT_STATUS_APSD_CAPABLE)) { \
+ if (TX_BLK_TEST_FLAG((__pTxBlk), fTX_bWMM_UAPSD_EOSP)) \
+ *(__pQosCtrl) |= (1 << 4); \
+ }
+
+/*
+ Enable or disable UAPSD flag in WMM element in beacon frame;
+ purpose: set UAPSD enable/disable bit
+*/
+#define UAPSD_MR_IE_FILL(__QosCtrlField, __pUapsdInfo) \
+ (__QosCtrlField) |= ((__pUapsdInfo)->bAPSDCapable) ? 0x80 : 0x00;
+
+/*
+ Check if we do NOT need to control TIM bit for the station;
+ note: we control TIM bit only when all AC are UAPSD AC
+*/
+#define UAPSD_MR_IS_NOT_TIM_BIT_NEEDED_HANDLED(__pMacEntry, __QueIdx) \
+ (CLIENT_STATUS_TEST_FLAG((__pMacEntry), fCLIENT_STATUS_APSD_CAPABLE) && \
+ (!(__pMacEntry)->bAPSDDeliverEnabledPerAC[QID_AC_VO] || \
+ !(__pMacEntry)->bAPSDDeliverEnabledPerAC[QID_AC_VI] || \
+ !(__pMacEntry)->bAPSDDeliverEnabledPerAC[QID_AC_BE] || \
+ !(__pMacEntry)->bAPSDDeliverEnabledPerAC[QID_AC_BK]) && \
+ (__pMacEntry)->bAPSDDeliverEnabledPerAC[__QueIdx])
+
+/* check if the AC is UAPSD delivery-enabled AC */
+#define UAPSD_MR_IS_UAPSD_AC(__pMacEntry, __AcId) \
+ (CLIENT_STATUS_TEST_FLAG((__pMacEntry), fCLIENT_STATUS_APSD_CAPABLE) && \
+ ((0 <= (__AcId)) && ((__AcId) < WMM_NUM_OF_AC)) && /* 0 ~ 3 */ \
+ (__pMacEntry)->bAPSDDeliverEnabledPerAC[(__AcId)])
+
+/* check if all AC are UAPSD delivery-enabled AC */
+#define UAPSD_MR_IS_ALL_AC_UAPSD(__FlgIsActive, __pMacEntry) \
+ (((__FlgIsActive) == FALSE) && ((__pMacEntry)->bAPSDAllAC == 1))
+
+/* suspend SP */
+#define UAPSD_MR_SP_SUSPEND(__pAd) \
+ (__pAd)->bAPSDFlagSPSuspend = 1;
+
+/* resume SP */
+#define UAPSD_MR_SP_RESUME(__pAd) \
+ (__pAd)->bAPSDFlagSPSuspend = 0;
+
+/* mark PS poll frame sent in mix mode */
+
+#ifdef RTMP_MAC_USB
+#define UAPSD_MR_MIX_PS_POLL_RCV(__pAd, __pMacEntry)
+#endif /* RTMP_MAC_USB */
+
+#else
+
+#define UAPSD_EXTERN
+#define UAPSD_QOS_NULL_QUE_ID 0x7f
+
+
+#define UAPSD_EPT_SP_INT (100000/(1000000/OS_HZ)) /* 100ms */
+
+#endif /* MODULE_WMM_UAPSD */
+
+
+/* max UAPSD buffer queue size */
+#define MAX_PACKETS_IN_UAPSD_QUEUE 16 /* for each AC = 16*4 = 64 */
+
+
+/* Public function list */
+/*
+========================================================================
+Routine Description:
+ UAPSD Module Init.
+
+Arguments:
+ pAd Pointer to our adapter
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_Init(
+ IN PRTMP_ADAPTER pAd);
+
+
+/*
+========================================================================
+Routine Description:
+ UAPSD Module Release.
+
+Arguments:
+ pAd Pointer to our adapter
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_Release(
+ IN PRTMP_ADAPTER pAd);
+
+
+/*
+========================================================================
+Routine Description:
+ Check if ASIC can enter sleep mode. Not software sleep.
+
+Arguments:
+ pAd Pointer to our adapter
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID RtmpAsicSleepHandle(
+ IN PRTMP_ADAPTER pAd);
+
+/*
+========================================================================
+Routine Description:
+ Close current Service Period.
+
+Arguments:
+ pAd Pointer to our adapter
+ pEntry Close the SP of the entry
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_SP_Close(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+/*
+========================================================================
+Routine Description:
+ Check if the SP for entry is closed.
+
+Arguments:
+ pAd Pointer to our adapter
+ pEntry the peer entry
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN BOOLEAN UAPSD_SP_IsClosed(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+/*
+========================================================================
+Routine Description:
+ Deliver all queued packets.
+
+Arguments:
+ pAd Pointer to our adapter
+ *pEntry STATION
+
+Return Value:
+ None
+
+Note:
+ SMP protection by caller for packet enqueue.
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_AllPacketDeliver(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+
+/*
+========================================================================
+Routine Description:
+ Parse the UAPSD field in WMM element in (re)association request frame.
+
+Arguments:
+ pAd Pointer to our adapter
+ *pEntry STATION
+ *pElm QoS information field
+ FlgApsdCapable TRUE: Support UAPSD
+
+Return Value:
+ None
+
+Note:
+ No protection is needed.
+
+ 1. Association -> TSPEC:
+ use static UAPSD settings in Association
+ update UAPSD settings in TSPEC
+
+ 2. Association -> TSPEC(11r) -> Reassociation:
+ update UAPSD settings in TSPEC
+ backup static UAPSD settings in Reassociation
+
+ 3. Association -> Reassociation:
+ update UAPSD settings in TSPEC
+ backup static UAPSD settings in Reassociation
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_AssocParse(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR *pElm,
+ IN BOOLEAN FlgApsdCapable);
+
+
+/*
+========================================================================
+Routine Description:
+ Enqueue a UAPSD packet.
+
+Arguments:
+ pAd Pointer to our adapter
+ *pEntry STATION
+ pPacket UAPSD dnlink packet
+ IdAc UAPSD AC ID (0 ~ 3)
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_PacketEnqueue(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN PNDIS_PACKET pPacket,
+ IN UINT32 IdAc);
+
+
+/*
+========================================================================
+Routine Description:
+ Handle QoS Null Frame Tx Done or Management Tx Done interrupt.
+
+Arguments:
+ pAd Pointer to our adapter
+ pPacket Completed TX packet
+ pDstMac Destinated MAC address
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_QoSNullTxMgmtTxDoneHandle(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR *pDstMac);
+
+
+/*
+========================================================================
+Routine Description:
+ Maintenance our UAPSD PS queue. Release all queued packet if timeout.
+
+Arguments:
+ pAd Pointer to our adapter
+ *pEntry STATION
+
+Return Value:
+ None
+
+Note:
+ If in RT2870, pEntry can not be removed during UAPSD_QueueMaintenance()
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_QueueMaintenance(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+
+/*
+========================================================================
+Routine Description:
+ Close SP in Tx Done, not Tx DMA Done.
+
+Arguments:
+ pAd Pointer to our adapter
+ pEntry destination entry
+ FlgSuccess 0:tx success, 1:tx fail
+
+Return Value:
+ None
+
+Note:
+ For RT28xx series, for packetID=0 or multicast frame, no statistics
+ count can be got, ex: ARP response or DHCP packets, we will use
+ low rate to set (CCK, MCS=0=packetID).
+ So SP will not be close until UAPSD_EPT_SP_INT timeout.
+
+ So if the tx rate is 1Mbps for a entry, we will use DMA done, not
+ use UAPSD_SP_AUE_Handle().
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_SP_AUE_Handle(
+ IN RTMP_ADAPTER *pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR FlgSuccess);
+
+
+/*
+========================================================================
+Routine Description:
+ Close current Service Period.
+
+Arguments:
+ pAd Pointer to our adapter
+
+Return Value:
+ None
+
+Note:
+ When we receive EOSP frame tx done interrupt and a uplink packet
+ from the station simultaneously, we will regard it as a new trigger
+ frame because the packet is received when EOSP frame tx done interrupt.
+
+ We can not sure the uplink packet is sent after old SP or in the old SP.
+ So we must close the old SP in receive done ISR to avoid the problem.
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_SP_CloseInRVDone(
+ IN PRTMP_ADAPTER pAd);
+
+
+/*
+========================================================================
+Routine Description:
+ Check if we need to close current SP.
+
+Arguments:
+ pAd Pointer to our adapter
+ pPacket Completed TX packet
+ pDstMac Destinated MAC address
+
+Return Value:
+ None
+
+Note:
+ 1. We need to call the function in TxDone ISR.
+ 2. SMP protection by caller for packet enqueue.
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_SP_PacketCheck(
+ IN PRTMP_ADAPTER pAd,
+ IN PNDIS_PACKET pPacket,
+ IN UCHAR *pDstMac);
+
+
+#ifdef UAPSD_TIMING_RECORD_FUNC
+/*
+========================================================================
+Routine Description:
+ Enable/Disable Timing Record Function.
+
+Arguments:
+ pAd Pointer to our adapter
+ Flag 1 (Enable) or 0 (Disable)
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_TimingRecordCtrl(
+ IN UINT32 Flag);
+
+/*
+========================================================================
+Routine Description:
+ Record some timings.
+
+Arguments:
+ pAd Pointer to our adapter
+ Type The timing is for what type
+
+Return Value:
+ None
+
+Note:
+ UAPSD_TIMING_RECORD_ISR
+ UAPSD_TIMING_RECORD_TASKLET
+ UAPSD_TIMING_RECORD_TRG_RCV
+ UAPSD_TIMING_RECORD_MOVE2TX
+ UAPSD_TIMING_RECORD_TX2AIR
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_TimingRecord(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT32 Type);
+
+/*
+========================================================================
+Routine Description:
+ Record the loop index for received packet handle.
+
+Arguments:
+ pAd Pointer to our adapter
+ LoopIndex The RxProcessed in APRxDoneInterruptHandle()
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_TimeingRecordLoopIndex(
+ IN UINT32 LoopIndex);
+#endif /* UAPSD_TIMING_RECORD_FUNC */
+
+
+/*
+========================================================================
+Routine Description:
+ Get the queue status for delivery-enabled AC.
+
+Arguments:
+ pAd Pointer to our adapter
+ pEntry the peer entry
+ pFlgIsAnyPktForBK TRUE: At lease a BK packet is queued
+ pFlgIsAnyPktForBE TRUE: At lease a BE packet is queued
+ pFlgIsAnyPktForVI TRUE: At lease a VI packet is queued
+ pFlgIsAnyPktForVO TRUE: At lease a VO packet is queued
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+VOID UAPSD_QueueStatusGet(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ OUT BOOLEAN *pFlgIsAnyPktForBK,
+ OUT BOOLEAN *pFlgIsAnyPktForBE,
+ OUT BOOLEAN *pFlgIsAnyPktForVI,
+ OUT BOOLEAN *pFlgIsAnyPktForVO);
+
+
+/*
+========================================================================
+Routine Description:
+ Handle UAPSD Trigger Frame.
+
+Arguments:
+ pAd Pointer to our adapter
+ *pEntry the source STATION
+ UpOfFrame the UP of the trigger frame
+
+Return Value:
+ None
+
+Note:
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_TriggerFrameHandle(
+ IN PRTMP_ADAPTER pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN UCHAR UpOfFrame);
+
+
+#ifdef RTMP_MAC_USB
+/*
+========================================================================
+Routine Description:
+ Tag current offset of the AC in USB URB tx buffer.
+
+Arguments:
+ pAd Pointer to our adapter
+ *pPkt the tx packet
+ Wcid destination entry id
+ PktOffset USB tx buffer offset
+
+Return Value:
+ None
+
+Note:
+ Only for RT2870.
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_TagFrame(
+ IN RTMP_ADAPTER *pAd,
+ IN NDIS_PACKET *pPkt,
+ IN UCHAR Wcid,
+ IN UINT32 PktOffset);
+
+
+/*
+========================================================================
+Routine Description:
+ Check if UAPSD packets are tx ok.
+
+Arguments:
+ pAd Pointer to our adapter
+ AcQueId TX completion for the AC (0 ~ 3)
+ bulkStartPos
+ bulkEnPos
+
+Return Value:
+ None
+
+Note:
+ Only for RT2870.
+========================================================================
+*/
+UAPSD_EXTERN VOID UAPSD_UnTagFrame(
+ IN RTMP_ADAPTER *pAd,
+ IN UCHAR AcQueId,
+ IN UINT32 bulkStartPos,
+ IN UINT32 bulkEnPos);
+#endif /* RTMP_MAC_USB */
+
+/* End of ap_uapsd.h */
diff --git a/cleopatre/devkit/mt7601udrv/include/vht.h b/cleopatre/devkit/mt7601udrv/include/vht.h
new file mode 100644
index 0000000000..3725ea086a
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/vht.h
@@ -0,0 +1,28 @@
+/*
+
+*/
+
+#include "dot11ac_vht.h"
+
+
+struct _RTMP_ADAPTER;
+struct _RT_PHY_INFO;
+
+
+VOID dump_vht_cap(struct _RTMP_ADAPTER *pAd, VHT_CAP_IE *vht_ie);
+VOID dump_vht_op(struct _RTMP_ADAPTER *pAd, VHT_OP_IE *vht_ie);
+
+INT build_vht_ies(struct _RTMP_ADAPTER *pAd, UCHAR *buf, UCHAR frm);
+INT build_vht_cap_ie(RTMP_ADAPTER *pAd, UCHAR *buf);
+
+UCHAR vht_cent_ch_freq(struct _RTMP_ADAPTER *pAd, UCHAR prim_ch);
+INT vht_mode_adjust(struct _RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry, VHT_CAP_IE *cap, VHT_OP_IE *op);
+INT SetCommonVHT(struct _RTMP_ADAPTER *pAd);
+VOID rtmp_set_vht(struct _RTMP_ADAPTER *pAd, struct _RT_PHY_INFO *phy_info);
+
+void assoc_vht_info_debugshow(
+ IN RTMP_ADAPTER *pAd,
+ IN MAC_TABLE_ENTRY *pEntry,
+ IN VHT_CAP_IE *vht_cap,
+ IN VHT_OP_IE *vht_op);
+
diff --git a/cleopatre/devkit/mt7601udrv/include/video.h b/cleopatre/devkit/mt7601udrv/include/video.h
new file mode 100644
index 0000000000..54ec5e6901
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/video.h
@@ -0,0 +1,12 @@
+#ifdef VIDEO_TURBINE_SUPPORT
+extern AP_VIDEO_STRUCT GLOBAL_AP_VIDEO_CONFIG;
+
+VOID VideoModeUpdate(IN PRTMP_ADAPTER pAd);
+VOID VideoModeDynamicTune(IN PRTMP_ADAPTER pAd);
+UINT32 GetAsicDefaultRetry(IN PRTMP_ADAPTER pAd);
+UCHAR GetAsicDefaultTxBA(IN PRTMP_ADAPTER pAd);
+UINT32 GetAsicVideoRetry(IN PRTMP_ADAPTER pAd);
+UCHAR GetAsicVideoTxBA(IN PRTMP_ADAPTER pAd);
+VOID VideoConfigInit(IN PRTMP_ADAPTER pAd);
+#endif /* VIDEO_TURBINE_SUPPORT */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/vr_ikans.h b/cleopatre/devkit/mt7601udrv/include/vr_ikans.h
new file mode 100644
index 0000000000..c5694cb858
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/vr_ikans.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ * (c) Copyright 2002, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ****************************************************************************
+
+ Module Name:
+ vr_ikans.h
+
+ Abstract:
+ Only for IKANOS Vx160 or Vx180 platform.
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Sample Lin 01-28-2008 Created
+
+ */
+
+#ifndef __VR_IKANS_H__
+#define __VR_IKANS_H__
+
+#ifndef MODULE_IKANOS
+#define IKANOS_EXTERN extern
+#else
+#define IKANOS_EXTERN
+#endif /* MODULE_IKANOS */
+
+#ifdef IKANOS_VX_1X0
+ typedef void (*IkanosWlanTxCbFuncP)(void *, void *);
+
+ struct IKANOS_TX_INFO
+ {
+ struct net_device *netdev;
+ IkanosWlanTxCbFuncP *fp;
+ };
+#endif /* IKANOS_VX_1X0 */
+
+
+IKANOS_EXTERN void VR_IKANOS_FP_Init(UINT8 BssNum, UINT8 *pApMac);
+
+IKANOS_EXTERN INT32 IKANOS_DataFramesTx(struct sk_buff *pSkb,
+ struct net_device *pNetDev);
+
+IKANOS_EXTERN void IKANOS_DataFrameRx(PRTMP_ADAPTER pAd,
+ struct sk_buff *pSkb);
+
+#endif /* __VR_IKANS_H__ */
+
+/* End of vr_ikans.h */
diff --git a/cleopatre/devkit/mt7601udrv/include/vrut_ubm.h b/cleopatre/devkit/mt7601udrv/include/vrut_ubm.h
new file mode 100644
index 0000000000..fab13c4ea6
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/vrut_ubm.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ * Ralink Tech Inc.
+ * Taiwan, R.O.C.
+ *
+ * (c) Copyright 2010, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************/
+
+/****************************************************************************
+
+ Abstract:
+
+ All Related Structure & Definition for UBICOM platform.
+
+ Only used in UTIL module.
+
+***************************************************************************/
+
+#ifndef __VR_UBICOM_H__
+#define __VR_UBICOM_H__
+
+#ifdef PLATFORM_UBM_IPX8
+
+#include <asm/cachectl.h>
+
+#undef RTMP_UTIL_DCACHE_FLUSH
+#define RTMP_UTIL_DCACHE_FLUSH(__AddrStart, __Size) \
+ flush_dcache_range((ULONG)(__AddrStart), \
+ (ULONG)(((UCHAR *)(__AddrStart)) + __Size - 1))
+
+#endif /* PLATFORM_UBM_IPX8 */
+
+#endif /* __VR_UBICOM_H__ */
+
+/* End of vrut_ubm.h */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wapi.h b/cleopatre/devkit/mt7601udrv/include/wapi.h
new file mode 100644
index 0000000000..4a98cac493
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wapi.h
@@ -0,0 +1,183 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2005, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attempt
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ wapi.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Albert 2008-4-3 Supoort WAPI protocol
+*/
+
+#ifndef __WAPI_H__
+#define __WAPI_H__
+
+#include "wpa_cmm.h"
+
+/* Increase TxIV value for next transmission */
+/* Todo - When overflow occurred, do re-key mechanism */
+#define INC_TX_IV(_V, NUM) \
+{ \
+ UCHAR cnt = LEN_WAPI_TSC; \
+ do \
+ { \
+ cnt--; \
+ _V[cnt] = _V[cnt] + NUM; \
+ if (cnt == 0) \
+ { \
+ DBGPRINT(RT_DEBUG_TRACE, ("PN overflow!!!!\n")); \
+ break; \
+ } \
+ }while (_V[cnt] == 0); \
+}
+
+#define IS_WAPI_CAPABILITY(a) (((a) >= Ndis802_11AuthModeWAICERT) && ((a) <= Ndis802_11AuthModeWAIPSK))
+
+/* The underlying chip supports hardware-based WPI-SMS4 encryption and de-encryption. */
+#define IS_HW_WAPI_SUPPORT(__pAd) (__pAd->chipCap.FlgIsHwWapiSup)
+/*
+ =====================================
+ function prototype in wapi_crypt.c
+ =====================================
+*/
+int wpi_cbc_mac_engine(
+ unsigned char * maciv_in,
+ unsigned char * in_data1,
+ unsigned int in_data1_len,
+ unsigned char * in_data2,
+ unsigned int in_data2_len,
+ unsigned char * pkey,
+ unsigned char * mac_out);
+
+int wpi_sms4_ofb_engine(
+ unsigned char * pofbiv_in,
+ unsigned char * pbw_in,
+ unsigned int plbw_in,
+ unsigned char * pkey,
+ unsigned char * pcw_out);
+
+VOID RTMPInsertWapiIe(
+ IN UINT AuthMode,
+ IN UINT WepStatus,
+ OUT PUCHAR pWIe,
+ OUT UCHAR *w_len);
+
+BOOLEAN RTMPCheckWAIframe(
+ IN PUCHAR pData,
+ IN ULONG DataByteCount);
+
+VOID RTMPConstructWPIIVHdr(
+ IN UCHAR key_id,
+ IN UCHAR *tx_iv,
+ OUT UCHAR *iv_hdr);
+
+extern INT RTMPSoftEncryptSMS4(
+ IN PUCHAR pHeader,
+ IN PUCHAR pData,
+ IN UINT32 data_len,
+ IN UCHAR key_id,
+ IN PUCHAR pKey,
+ IN PUCHAR pIv);
+extern INT RTMPSoftDecryptSMS4(
+ IN PUCHAR pHdr,
+ IN BOOLEAN bSanityIV,
+ IN PCIPHER_KEY pKey,
+ INOUT PUCHAR pData,
+ INOUT UINT16 *DataByteCnt);
+
+VOID RTMPDeriveWapiGTK(
+ IN PUCHAR nmk,
+ OUT PUCHAR gtk_ptr);
+
+VOID RT_SMS4_TEST(
+ IN UINT8 test);
+
+INT SMS4_TEST(void);
+
+/*
+ =====================================
+ function prototype in wapi.c
+ =====================================
+*/
+
+BOOLEAN RTMPIsWapiCipher(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR apidx);
+
+VOID RTMPIoctlQueryWapiConf(
+ IN PRTMP_ADAPTER pAd,
+ IN RTMP_IOCTL_INPUT_STRUCT *wrq);
+
+void rtmp_read_wapi_parms_from_file(
+ IN PRTMP_ADAPTER pAd,
+ char *tmpbuf,
+ char *buffer);
+
+VOID RTMPWapiUskRekeyPeriodicExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID RTMPWapiMskRekeyPeriodicExec(
+ IN PVOID SystemSpecific1,
+ IN PVOID FunctionContext,
+ IN PVOID SystemSpecific2,
+ IN PVOID SystemSpecific3);
+
+VOID RTMPInitWapiRekeyTimerAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID RTMPStartWapiRekeyTimerAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID RTMPCancelWapiRekeyTimerAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+VOID RTMPGetWapiTxTscFromAsic(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT Wcid,
+ OUT UCHAR *tx_tsc);
+
+VOID WAPIInstallPairwiseKey(
+ PRTMP_ADAPTER pAd,
+ PMAC_TABLE_ENTRY pEntry,
+ BOOLEAN bAE);
+
+VOID WAPIInstallSharedKey(
+ PRTMP_ADAPTER pAd,
+ UINT8 GroupCipher,
+ UINT8 BssIdx,
+ UINT8 KeyIdx,
+ UINT8 Wcid,
+ PUINT8 pGtk);
+
+BOOLEAN WAPI_InternalCmdAction(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR AuthMode,
+ IN UCHAR apidx,
+ IN PUCHAR pAddr,
+ IN UCHAR flag);
+
+#endif /* __WAPI_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wapi_def.h b/cleopatre/devkit/mt7601udrv/include/wapi_def.h
new file mode 100644
index 0000000000..774bdae1ca
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wapi_def.h
@@ -0,0 +1,179 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2005, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attempt
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ wapi_def.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+*/
+
+#ifndef __WAPI_DEF_H__
+#define __WAPI_DEF_H__
+
+#ifndef IN
+#define IN
+#endif
+#ifndef OUT
+#define OUT
+#endif
+#ifndef INOUT
+#define INOUT
+#endif
+#ifndef MAC_ADDR_LEN
+#define MAC_ADDR_LEN 6
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define WAPI_IFNAMSIZ 16
+#define MAX_WAPI_MBSSID_NUM 8
+#define MAX_ID_NO 10
+
+#define LENGTH_WAI_H 12
+#define LEN_WAPI_TSC 16
+#define LEN_WPI_MIC 16
+#define LEN_WPI_IV_HDR 18
+#define LEN_WAPI_NMK 16
+#define LEN_WAPI_GTK 32
+
+/* trigger message from driver */
+#define WAI_MLME_CERT_AUTH_START 1
+#define WAI_MLME_KEY_HS_START 2
+#define WAI_MLME_UPDATE_BK 3
+#define WAI_MLME_UPDATE_USK 4
+#define WAI_MLME_UPDATE_MSK 5
+#define WAI_MLME_DISCONNECT 0xff
+
+#define WAPI_KEY_UPDATE_EXEC_INTV 1000 /* 1 sec */
+
+/* WAPI rekey method */
+#define REKEY_METHOD_DISABLE 0
+#define REKEY_METHOD_TIME 1
+#define REKEY_METHOD_PKT 2
+/*#define REKEY_METHOD_TIME_PKT 3 */
+
+#define STATUS_WAPI_KEY_INVALID 1
+#define STATUS_WAPI_IV_MISMATCH 2
+#define STATUS_WAPI_MIC_DIFF 3
+
+extern UCHAR AE_BCAST_PN[LEN_WAPI_TSC];
+extern UCHAR ASUE_UCAST_PN[LEN_WAPI_TSC];
+extern UCHAR AE_UCAST_PN[LEN_WAPI_TSC];
+
+/* WAPI authentication mode */
+typedef enum _WAPI_AUTH_MODE
+{
+ WAPI_AUTH_DISABLE,
+ WAPI_AUTH_PSK,
+ WAPI_AUTH_CERT,
+} WAPI_AUTH_MODE, *PWAPI_AUTH_MODE;
+
+/* WAPI authentication mode */
+typedef enum _KEY_TYPE_MODE
+{
+ HEX_MODE,
+ ASCII_MODE
+} KEY_TYPE_MODE, *PKEY_TYPE_MODE;
+
+/* the defintion of WAI header */
+typedef struct GNU_PACKED _HEADER_WAI {
+ USHORT version;
+ UCHAR type;
+ UCHAR sub_type;
+ USHORT reserved;
+ USHORT length;
+ USHORT pkt_seq;
+ UCHAR frag_seq;
+ UCHAR flag;
+} HEADER_WAI, *PHEADER_WAI;
+
+/* For WAPI */
+typedef struct GNU_PACKED _WAPIIE {
+ USHORT version;
+ USHORT acount;
+ struct GNU_PACKED {
+ UCHAR oui[4];
+ }auth[1];
+} WAPIIE, *PWAPIIE;
+
+/* unicast key suite */
+typedef struct GNU_PACKED _WAPIIE_UCAST {
+ USHORT ucount;
+ struct GNU_PACKED {
+ UCHAR oui[4];
+ }ucast[1];
+} WAPIIE_UCAST,*PWAPIIE_UCAST;
+
+/* multi-cast key suite and capability */
+typedef struct GNU_PACKED _WAPIIE_MCAST {
+ UCHAR mcast[4];
+ USHORT capability;
+} WAPIIE_MCAST,*PWAPIIE_MCAST;
+
+/* the relative to wapi daemon */
+typedef struct GNU_PACKED _COMMON_WAPI_INFO
+{
+ UINT8 wapi_ifname[WAPI_IFNAMSIZ]; /* wai negotiation */
+ UINT8 wapi_ifname_len;
+ UINT8 preauth_ifname[WAPI_IFNAMSIZ]; /* pre-authentication */
+ UINT8 preauth_ifname_len;
+ UINT8 as_cert_no;
+ UINT8 as_cert_path[MAX_ID_NO][128]; /* the path of as certification */
+ UINT8 as_cert_path_len[MAX_ID_NO];
+ UINT8 ca_cert_path[128]; /* the path of ca certification */
+ UINT8 ca_cert_path_len;
+ UINT8 user_cert_path[128]; /* the path of local user certification */
+ UINT8 user_cert_path_len;
+ UINT32 wapi_as_ip; /* the ip address of authentication server */
+ UINT32 wapi_as_port; /* the port of authentication server */
+} COMMON_WAPI_INFO, *PCOMMON_WAPI_INFO;
+
+typedef struct GNU_PACKED _MBSS_WAPI_INFO
+{
+ UINT8 ifname[WAPI_IFNAMSIZ];
+ UINT8 ifname_len;
+ UINT8 auth_mode;
+ UINT8 psk[64];
+ UINT8 psk_len;
+ UINT8 wie[128];
+ UINT8 wie_len;
+} MBSS_WAPI_INFO, *PMBSS_WAPI_INFO;
+
+/* It's used by wapi daemon to require relative configuration */
+typedef struct GNU_PACKED _WAPI_CONF
+{
+ UINT8 mbss_num; /* indicate multiple BSS number */
+ COMMON_WAPI_INFO comm_wapi_info;
+ MBSS_WAPI_INFO mbss_wapi_info[MAX_WAPI_MBSSID_NUM];
+} WAPI_CONF, *PWAPI_CONF;
+
+#ifdef LINUX
+#define WapiMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
+#define WapiZeroMemory(Destination, Length) memset(Destination, 0, Length)
+#define WapiEqualMemory(Source1, Source2, Length) (!memcmp(Source1, Source2, Length))
+#endif /* LINUX */
+
+#endif /* __WAPI_DEF_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wapi_sms4.h b/cleopatre/devkit/mt7601udrv/include/wapi_sms4.h
new file mode 100644
index 0000000000..ef90f2a465
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wapi_sms4.h
@@ -0,0 +1,12 @@
+
+
+/* SMS4 encryption/decryption definition */
+/* Parameter : */
+/* Input - the incoming message packet */
+/* Ouput - the result ouput */
+/* rk - key */
+void SMS4Crypt(unsigned char *Input, unsigned char *Output, unsigned int *rk);
+
+/* SMS4 key extend algorithm */
+void SMS4KeyExt(unsigned char *Key, unsigned int *rk, unsigned int CryptFlag);
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wfd.h b/cleopatre/devkit/mt7601udrv/include/wfd.h
new file mode 100644
index 0000000000..beb88fa47f
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wfd.h
@@ -0,0 +1,149 @@
+/*
+
+ This file is provided under a dual BSD/GPLv2 license. When using or
+ redistributing this file, you may do so under either license.
+
+ GPL LICENSE SUMMARY
+
+ Copyright(c) 2005-2011 Ralink Technology Corporation.
+
+ 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 St - Fifth Floor, Boston, MA 02110-1301 USA.
+ The full GNU General Public License is included in this distribution
+ in the file called LICENSE.GPL.
+
+ Contact Information:
+ Ralink Technology Corporation
+ 5F, No.5, Tai-Yuen 1st St., Jhubei City,
+ HsinChu Hsien 30265, Taiwan, R.O.C.
+
+
+ BSD LICENSE
+
+ Copyright(c) 2005-2011 Ralink Technology Corporation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, 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.
+ * 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 Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER 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, WHETHER IN 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.
+
+*/
+
+
+/*
+ Module Name:
+ wfd.h
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+
+*/
+
+
+#ifndef __WFD_H__
+#define __WFD_H__
+
+#ifdef WFD_SUPPORT
+
+#include "rtmp_type.h"
+
+INT Set_WfdEnable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+#ifdef RT_CFG80211_SUPPORT
+INT Set_WfdInsertIe_Proc
+(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+#endif /* RT_CFG80211_SUPPORT */
+
+INT Set_WfdDeviceType_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WfdCouple_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WfdSessionAvailable_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WfdCP_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WfdRtspPort_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WfdMaxThroughput_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_WfdLocalIp_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+INT Set_PeerRtspPort_Proc(
+ IN PRTMP_ADAPTER pAd,
+ IN PSTRING arg);
+
+VOID WfdMakeWfdIE(
+ IN PRTMP_ADAPTER pAd,
+ IN ULONG WfdIeBitmap,
+ OUT PUCHAR pOutBuf,
+ OUT PULONG pIeLen);
+
+ULONG InsertWfdSubelmtTlv(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR SubId,
+ IN PUCHAR pInBuffer,
+ IN PUCHAR pOutBuffer,
+ IN UINT Action);
+
+VOID WfdParseSubElmt(
+ IN PRTMP_ADAPTER pAd,
+ IN PWFD_ENTRY_INFO pWfdEntryInfo,
+ IN VOID *Msg,
+ IN ULONG MsgLen);
+
+VOID WfdCfgInit(
+ IN PRTMP_ADAPTER pAd);
+
+#endif /* WFD_SUPPORT */
+#endif /* __WFD_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wfd_cmm.h b/cleopatre/devkit/mt7601udrv/include/wfd_cmm.h
new file mode 100644
index 0000000000..4d58fc5415
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wfd_cmm.h
@@ -0,0 +1,293 @@
+/*
+
+ This file is provided under a dual BSD/GPLv2 license. When using or
+ redistributing this file, you may do so under either license.
+
+ GPL LICENSE SUMMARY
+
+ Copyright(c) 2005-2011 Ralink Technology Corporation.
+
+ 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 St - Fifth Floor, Boston, MA 02110-1301 USA.
+ The full GNU General Public License is included in this distribution
+ in the file called LICENSE.GPL.
+
+ Contact Information:
+ Ralink Technology Corporation
+ 5F, No.5, Tai-Yuen 1st St., Jhubei City,
+ HsinChu Hsien 30265, Taiwan, R.O.C.
+
+
+ BSD LICENSE
+
+ Copyright(c) 2005-2011 Ralink Technology Corporation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, 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.
+ * 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 Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER 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, WHETHER IN 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.
+
+*/
+
+
+/*
+ Module Name:
+ wfd.h
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+
+*/
+
+
+#ifndef __WFD_CMM_H__
+#define __WFD_CMM_H__
+
+#ifdef WFD_SUPPORT
+
+#include "rtmp_type.h"
+
+#define WFD_OUI 0x506F9A
+
+/* Subelement ID Definitions */
+#define SUBID_WFD_DEVICE_INFO 0
+#define SUBID_WFD_ASSOCIATED_BSSID 1
+#define SUBID_WFD_AUDIO_FORMATS 2
+#define SUBID_WFD_VIDEO_FORMATS 3
+#define SUBID_WFD_3D_VIDEO_FORMATS 4
+#define SUBID_WFD_CONTENT_PROTECTION 5
+#define SUBID_WFD_COUPLED_SINK_INFO 6
+#define SUBID_WFD_EXTENDED_CAP 7
+#define SUBID_WFD_LOCAL_IP_ADDR 8
+#define SUBID_WFD_SESSION_INFO 9
+#define SUBID_WFD_ALTERNATE_MAC_ADDR 10
+#define SUBID_WFD_END 11
+
+/* Subelement ID Definitions */
+#define SUBID_WFD_DEVICE_INFO_LEN 6
+#define SUBID_WFD_ASSOCIATED_BSSID_LEN 6
+#define SUBID_WFD_AUDIO_FORMATS_LEN 15
+#define SUBID_WFD_VIDEO_FORMATS_LEN 21
+#define SUBID_WFD_3D_VIDEO_FORMATS_LEN 13
+#define SUBID_WFD_CONTENT_PROTECTION_LEN 1
+#define SUBID_WFD_COUPLED_SINK_INFO_LEN 1
+#define SUBID_WFD_EXTENDED_CAP_LEN 2
+#define SUBID_WFD_LOCAL_IP_ADDR_LEN 5
+#define SUBID_WFD_ALTERNATE_MAC_ADDR_LEN 6
+#define WFD_SOURCE 0x0
+#define WFD_PRIMARY_SINK 0x1
+#define WFD_SECONDARY_SINK 0x2
+#define WFD_SOURCE_PRIMARY_SINK 0x3
+#define WFD_DEVICE_TYPE_END 0x4
+
+#define WFD_COUPLED_NOT_SUPPORT 0x0
+#define WFD_COUPLED_SUPPORT 0x1
+
+#define WFD_SESSION_NOT_AVAILABLE 0x0
+#define WFD_SESSION_AVAILABLE 0x1
+
+#define WFD_WSD_NOT_SUPPORT 0x0
+#define WFD_WSD_SUPPORT 0x1
+
+#define WFD_PC_P2P 0x0
+#define WFD_PC_TDLS 0x1
+
+#define WFD_CP_NOT_SUPPORT 0x0
+#define WFD_CP_HDCP20 0x1
+
+#define WFD_TIME_SYNC_NOT_SUPPORT 0x0
+#define WFD_TIME_SYNC_SUPPORT 0x1 /* Time Synchronization using 802.1AS */
+
+#define WFD_TDLS_WEAK_SECURITY 0x0
+#define WFD_TDLS_STRONG_SECURITY 0x1
+
+/* Coupled Sink Status Bitmap */
+#define WFD_AVAILABLE_FOR_COUPLING 0x0
+#define WFD_COUPLED_SUCCESS 0x1
+#define WFD_TEARDOWN_COUPLING 0x2
+
+/* WFD RTSP Default Port */
+#define WFD_RTSP_DEFAULT_PORT 7236
+
+/* Version of Local IP Address Subelement */
+#define WFD_LOCAL_IP_ADDR_VERSION_IPV4 1
+
+/* Default max throughput */
+#define WFD_MAX_THROUGHPUT_DEFAULT 150
+
+/* Default content protection bit */
+#define WFD_CONTENT_PROTECT_DEFAULT WFD_CP_NOT_SUPPORT
+
+typedef struct GNU_PACKED _WFD_DEVICE_INFO
+{
+#ifndef RT_BIG_ENDIAN
+ USHORT DeviceType:2;
+ USHORT SourceCoupled:1;
+ USHORT SinkCoupled:1;
+ USHORT SessionAvail:2;
+ USHORT WSD:1;
+ USHORT PC:1; /* Preferred Connectivity */
+ USHORT CP:1;
+ USHORT TimeSync:1;
+ USHORT Rsvd:6;
+#else
+ USHORT Rsvd:6;
+ USHORT TimeSync:1; /* 802.1AS Support */
+ USHORT CP:1; /* Content Protection */
+ USHORT PC:1; /* Preferred Connectivity */
+ USHORT WSD:1; /* WFD Service Discovery */
+ USHORT SessionAvail:2;
+ USHORT SinkCoupled:1;
+ USHORT SourceCoupled:1;
+ USHORT DeviceType:2;
+#endif
+} WFD_DEVICE_INFO, *PWFD_DEVICE_INFO;
+
+
+typedef struct GNU_PACKED _WFD_COUPLED_SINK_INFO
+{
+#ifndef RT_BIG_ENDIAN
+ UCHAR CoupledStat:2;
+ UCHAR Rsvd:6;
+#else
+ UCHAR Rsvd:6;
+ UCHAR CoupledStat:2;
+#endif
+} WFD_COUPLED_SINK_INFO, *PWFD_COUPLED_SINK_INFO;
+
+
+typedef struct GNU_PACKED _WFD_SESSION_INFO
+{
+#ifndef RT_BIG_ENDIAN
+ UCHAR Length;
+ UCHAR DeviceAddr[MAC_ADDR_LEN];
+ UCHAR Bssid[MAC_ADDR_LEN];
+ WFD_DEVICE_INFO WfdDevInfo;
+ USHORT MaxThroughput;
+ WFD_COUPLED_SINK_INFO CoupledSinkInfo;
+ UCHAR CoupledPeerAddr[MAC_ADDR_LEN];
+#else
+ UCHAR CoupledPeerAddr[MAC_ADDR_LEN];
+ WFD_COUPLED_SINK_INFO CoupledSinkInfo;
+ USHORT MaxThroughput;
+ WFD_DEVICE_INFO WfdDevInfo;
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR DeviceAddr[MAC_ADDR_LEN];
+ UCHAR Length;
+#endif
+} WFD_SESSION_INFO, *PWFD_SESSION_INFO;
+
+typedef struct _WFD_SERV_DISC_QUERY_INFO
+{
+ BOOLEAN bWfd_device_info_ie;
+ UCHAR wfd_device_info_ie[SUBID_WFD_DEVICE_INFO_LEN];
+ BOOLEAN bWfd_associate_bssid_ie;
+ UCHAR wfd_associate_bssid_ie[SUBID_WFD_ASSOCIATED_BSSID_LEN];
+ BOOLEAN bWfd_audio_format_ie;
+ UCHAR wfd_audio_format_ie[SUBID_WFD_AUDIO_FORMATS_LEN];
+ BOOLEAN bWfd_video_format_ie;
+ UCHAR wfd_video_format_ie[SUBID_WFD_VIDEO_FORMATS_LEN];
+ BOOLEAN bWfd_3d_video_format_ie;
+ UCHAR wfd_3d_video_format_ie[SUBID_WFD_3D_VIDEO_FORMATS_LEN];
+ BOOLEAN bWfd_content_proctection;
+ UCHAR wfd_content_proctection[SUBID_WFD_CONTENT_PROTECTION_LEN];
+ BOOLEAN bWfd_couple_sink_info_ie;
+ UCHAR wfd_couple_sink_info_ie[SUBID_WFD_COUPLED_SINK_INFO_LEN];
+ BOOLEAN bWfd_extent_capability_ie;
+ UCHAR wfd_extent_capability_ie[SUBID_WFD_EXTENDED_CAP_LEN];
+ BOOLEAN bWfd_local_ip_ie;
+ UCHAR wfd_local_ip_ie[SUBID_WFD_LOCAL_IP_ADDR_LEN];
+ BOOLEAN bWfd_session_info_ie;
+ UCHAR wfd_session_info_ie[120];
+ BOOLEAN bWfd_alternate_mac_addr_ie;
+ UCHAR wfd_alternate_mac_addr_ie[SUBID_WFD_ALTERNATE_MAC_ADDR_LEN];
+} WFD_SERV_DISC_QUERY_INFO, *PWFD_SERV_DISC_QUERY_INFO;
+
+/* Store for WFD Entry Configuration */
+typedef struct _WFD_ENTRY_INFO
+{
+ UCHAR bWfdClient;
+ UCHAR wfd_devive_type;
+ UCHAR source_coupled;
+ UCHAR sink_coupled;
+ UCHAR session_avail;
+ UCHAR wfd_service_discovery;
+ UCHAR wfd_PC;
+ UCHAR wfd_CP;
+ UCHAR wfd_time_sync;
+ UCHAR sink_audio_unsupport;
+ UCHAR source_audio_only;
+ UCHAR tdls_persistent_group;
+ USHORT rtsp_port;
+ USHORT max_throughput;
+ UCHAR assoc_addr[MAC_ADDR_LEN];
+ WFD_COUPLED_SINK_INFO coupled_sink_status;
+ UCHAR coupled_peer_addr[MAC_ADDR_LEN];
+ /* Service Discovery */
+ WFD_SERV_DISC_QUERY_INFO wfd_serv_disc_query_info;
+} WFD_ENTRY_INFO, *PWFD_ENTRY_INFO;
+
+/* Store for WFD Configuration */
+typedef struct _RT_WFD_CONFIG
+{
+ BOOLEAN bWfdEnable;
+#ifdef RT_CFG80211_SUPPORT
+ BOOLEAN bSuppInsertWfdIe; /* Insert WFD IE to management frames from wpa_supplicant */
+ BOOLEAN bSuppGoOn; /* wpa_supplicant P2P GO is on */
+#endif /* RT_CFG80211_SUPPORT */
+ UCHAR DeviceType;
+ UCHAR SourceCoupled;
+ UCHAR SinkCoupled;
+ UCHAR SessionAvail;
+ UCHAR WSD;
+ UCHAR PC;
+ UCHAR CP; /* WFD Content Protection capability */
+ UCHAR TimeSync;
+ USHORT RtspPort; /* Deafult WFD_RTSP_DEFAULT_PORT */
+ USHORT MaxThroughput; /* Maximum average throughput capability */
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR IPv4Addr[4];
+ UCHAR TdlsSecurity;
+ UCHAR PeerSessionAvail;
+ UCHAR PeerPC;
+ WFD_COUPLED_SINK_INFO CoupledSinkStatus;
+ /* Service Discovery */
+ UINT32 WfdSerDiscCapable;
+ WFD_SERV_DISC_QUERY_INFO wfd_serv_disc_query_info;
+} RT_WFD_CONFIG, *PRT_WFD_CONFIG;
+
+#endif /* WFD_SUPPORT */
+#endif /* __WFD_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wpa.h b/cleopatre/devkit/mt7601udrv/include/wpa.h
new file mode 100644
index 0000000000..3dcd838404
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wpa.h
@@ -0,0 +1,506 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2004, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ wpa.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+*/
+
+#ifndef __WPA_H__
+#define __WPA_H__
+
+#ifndef ROUND_UP
+#define ROUND_UP(__x, __y) \
+ (((ULONG)((__x)+((__y)-1))) & ((ULONG)~((__y)-1)))
+#endif
+
+#define SET_UINT16_TO_ARRARY(_V, _LEN) \
+{ \
+ _V[0] = ((UINT16)_LEN) >> 8; \
+ _V[1] = ((UINT16)_LEN & 0xFF); \
+}
+
+#define INC_UINT16_TO_ARRARY(_V, _LEN) \
+{ \
+ UINT16 var_len; \
+ \
+ var_len = (_V[0]<<8) | (_V[1]); \
+ var_len += _LEN; \
+ \
+ _V[0] = (var_len & 0xFF00) >> 8; \
+ _V[1] = (var_len & 0xFF); \
+}
+
+#define CONV_ARRARY_TO_UINT16(_V) ((_V[0]<<8) | (_V[1]))
+
+#define ADD_ONE_To_64BIT_VAR(_V) \
+{ \
+ UCHAR cnt = LEN_KEY_DESC_REPLAY; \
+ do \
+ { \
+ cnt--; \
+ _V[cnt]++; \
+ if (cnt == 0) \
+ break; \
+ }while (_V[cnt] == 0); \
+}
+
+#define INC_TX_TSC(_tsc, _cnt) \
+{ \
+ INT i=0; \
+ while (++_tsc[i] == 0x0) \
+ { \
+ i++; \
+ if (i == (_cnt)) \
+ break; \
+ } \
+}
+
+#define IS_WPA_CAPABILITY(a) (((a) >= Ndis802_11AuthModeWPA) && ((a) <= Ndis802_11AuthModeWPA1PSKWPA2PSK))
+
+/*
+ WFA recommend to restrict the encryption type in 11n-HT mode.
+ So, the WEP and TKIP shall not be allowed to use HT rate.
+ */
+#define IS_INVALID_HT_SECURITY(_mode) \
+ (((_mode) == Ndis802_11Encryption1Enabled) || \
+ ((_mode) == Ndis802_11Encryption2Enabled))
+
+#define MIX_CIPHER_WPA_TKIP_ON(x) (((x) & 0x08) != 0)
+#define MIX_CIPHER_WPA_AES_ON(x) (((x) & 0x04) != 0)
+#define MIX_CIPHER_WPA2_TKIP_ON(x) (((x) & 0x02) != 0)
+#define MIX_CIPHER_WPA2_AES_ON(x) (((x) & 0x01) != 0)
+
+/* Some definition are different between Keneral mode and Daemon mode */
+#ifdef WPA_DAEMON_MODE
+/* The definition for Daemon mode */
+#define WPA_GET_BSS_NUM(_pAd) (_pAd)->mbss_num
+
+#define WPA_GET_PMK(_pAd, _pEntry, _pmk) \
+{ \
+ _pmk = _pAd->MBSS[_pEntry->apidx].PMK; \
+}
+
+#define WPA_GET_GTK(_pAd, _pEntry, _gtk) \
+{ \
+ _gtk = _pAd->MBSS[_pEntry->apidx].GTK; \
+}
+
+#define WPA_GET_GROUP_CIPHER(_pAd, _pEntry, _cipher) \
+{ \
+ _cipher = (_pAd)->MBSS[_pEntry->apidx].GroupEncrypType; \
+}
+
+#define WPA_GET_DEFAULT_KEY_ID(_pAd, _pEntry, _idx) \
+{ \
+ _idx = (_pAd)->MBSS[_pEntry->apidx].DefaultKeyId; \
+}
+
+#define WPA_GET_BMCST_TSC(_pAd, _pEntry, _tsc) \
+{ \
+ _tsc = 1; \
+}
+
+#define WPA_BSSID(_pAd, _apidx) (_pAd)->MBSS[_apidx].wlan_addr
+
+#define WPA_OS_MALLOC(_p, _s) \
+{ \
+ _p = os_malloc(_s); \
+}
+
+#define WPA_OS_FREE(_p) \
+{ \
+ os_free(_p); \
+}
+
+#define WPA_GET_CURRENT_TIME(_time) \
+{ \
+ struct timeval tv; \
+ gettimeofday(&tv, NULL); \
+ *(_time) = tv.tv_sec; \
+}
+
+#else
+/* The definition for Driver mode */
+
+#if defined(CONFIG_AP_SUPPORT) && defined(CONFIG_STA_SUPPORT)
+#define WPA_GET_BSS_NUM(_pAd) (((_pAd)->OpMode == OPMODE_AP) ? (_pAd)->ApCfg.BssidNum : 1)
+#define WPA_GET_GROUP_CIPHER(_pAd, _pEntry, _cipher) \
+ { \
+ _cipher = Ndis802_11WEPDisabled; \
+ if ((_pAd)->OpMode == OPMODE_AP) \
+ { \
+ if (IS_ENTRY_APCLI(_pEntry) && \
+ ((_pEntry)->MatchAPCLITabIdx < MAX_APCLI_NUM)) \
+ _cipher = (_pAd)->ApCfg.ApCliTab[(_pEntry)->MatchAPCLITabIdx].GroupCipher; \
+ else if ((_pEntry)->apidx < (_pAd)->ApCfg.BssidNum) \
+ _cipher = (_pAd)->ApCfg.MBSSID[_pEntry->apidx].GroupKeyWepStatus;\
+ } \
+ else \
+ _cipher = (_pAd)->StaCfg.GroupCipher; \
+ }
+
+#define WPA_BSSID(_pAd, _apidx) (((_pAd)->OpMode == OPMODE_AP) ?\
+ (_pAd)->ApCfg.MBSSID[_apidx].Bssid :\
+ (_pAd)->CommonCfg.Bssid)
+#elif defined(CONFIG_AP_SUPPORT)
+#define WPA_GET_BSS_NUM(_pAd) (_pAd)->ApCfg.BssidNum
+#define WPA_GET_GROUP_CIPHER(_pAd, _pEntry, _cipher) \
+ { \
+ _cipher = Ndis802_11WEPDisabled; \
+ if (IS_ENTRY_APCLI(_pEntry) && \
+ ((_pEntry)->MatchAPCLITabIdx < MAX_APCLI_NUM)) \
+ _cipher = (_pAd)->ApCfg.ApCliTab[(_pEntry)->MatchAPCLITabIdx].GroupCipher; \
+ else if ((_pEntry)->apidx < (_pAd)->ApCfg.BssidNum) \
+ _cipher = (_pAd)->ApCfg.MBSSID[_pEntry->apidx].GroupKeyWepStatus;\
+ }
+
+#define WPA_BSSID(_pAd, _apidx) (_pAd)->ApCfg.MBSSID[_apidx].Bssid
+
+#elif defined(CONFIG_STA_SUPPORT)
+#define WPA_GET_BSS_NUM(_pAd) 1
+#define WPA_GET_GROUP_CIPHER(_pAd, _pEntry, _cipher) \
+ { \
+ _cipher = (_pAd)->StaCfg.GroupCipher; \
+ }
+#define WPA_BSSID(_pAd, _apidx) (_pAd)->CommonCfg.Bssid
+#endif /* defined(CONFIG_STA_SUPPORT) */
+
+#define WPA_OS_MALLOC(_p, _s) \
+{ \
+ os_alloc_mem(NULL, (PUCHAR *)&_p, _s); \
+}
+
+#define WPA_OS_FREE(_p) \
+{ \
+ os_free_mem(NULL, _p); \
+}
+
+#define WPA_GET_CURRENT_TIME(_time) NdisGetSystemUpTime(_time);
+
+#endif /* End of Driver Mode */
+
+#ifdef CONFIG_AP_SUPPORT
+/*========================================
+ The prototype is defined in ap_wpa.c
+ ========================================*/
+VOID WPA_APSetGroupRekeyAction(
+ IN PRTMP_ADAPTER pAd);
+
+#endif /* CONFIG_AP_SUPPORT */
+
+/*========================================
+ The prototype is defined in cmm_wpa.c
+ ========================================*/
+void inc_iv_byte(
+ UCHAR *iv,
+ UINT len,
+ UINT cnt);
+
+BOOLEAN WpaMsgTypeSubst(
+ IN UCHAR EAPType,
+ OUT INT *MsgType);
+
+VOID PRF(
+ IN UCHAR *key,
+ IN INT key_len,
+ IN UCHAR *prefix,
+ IN INT prefix_len,
+ IN UCHAR *data,
+ IN INT data_len,
+ OUT UCHAR *output,
+ IN INT len);
+
+int RtmpPasswordHash(
+ char *password,
+ unsigned char *ssid,
+ int ssidlength,
+ unsigned char *output);
+
+ VOID KDF(
+ IN PUINT8 key,
+ IN INT key_len,
+ IN PUINT8 label,
+ IN INT label_len,
+ IN PUINT8 data,
+ IN INT data_len,
+ OUT PUINT8 output,
+ IN USHORT len);
+
+PUINT8 WPA_ExtractSuiteFromRSNIE(
+ IN PUINT8 rsnie,
+ IN UINT rsnie_len,
+ IN UINT8 type,
+ OUT UINT8 *count);
+
+VOID WpaShowAllsuite(
+ IN PUINT8 rsnie,
+ IN UINT rsnie_len);
+
+VOID RTMPInsertRSNIE(
+ IN PUCHAR pFrameBuf,
+ OUT PULONG pFrameLen,
+ IN PUINT8 rsnie_ptr,
+ IN UINT8 rsnie_len,
+ IN PUINT8 pmkid_ptr,
+ IN UINT8 pmkid_len);
+
+/*
+ =====================================
+ function prototype in cmm_wpa.c
+ =====================================
+*/
+VOID RTMPToWirelessSta(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN PUCHAR pHeader802_3,
+ IN UINT HdrLen,
+ IN PUCHAR pData,
+ IN UINT DataLen,
+ IN BOOLEAN bClearFrame);
+
+VOID WpaDerivePTK(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR *PMK,
+ IN UCHAR *ANonce,
+ IN UCHAR *AA,
+ IN UCHAR *SNonce,
+ IN UCHAR *SA,
+ OUT UCHAR *output,
+ IN UINT len);
+
+VOID WpaDeriveGTK(
+ IN UCHAR *PMK,
+ IN UCHAR *GNonce,
+ IN UCHAR *AA,
+ OUT UCHAR *output,
+ IN UINT len);
+
+VOID GenRandom(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR *macAddr,
+ OUT UCHAR *random);
+
+BOOLEAN RTMPCheckWPAframe(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN PUCHAR pData,
+ IN ULONG DataByteCount,
+ IN UCHAR FromWhichBSSID);
+
+#ifdef HDR_TRANS_SUPPORT
+BOOLEAN RTMPCheckWPAframe_Hdr_Trns(
+ IN PRTMP_ADAPTER pAd,
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN PUCHAR pData,
+ IN ULONG DataByteCount,
+ IN UCHAR FromWhichBSSID);
+#endif /* HDR_TRANS_SUPPORT */
+
+BOOLEAN RTMPParseEapolKeyData(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pKeyData,
+ IN UCHAR KeyDataLen,
+ IN UCHAR GroupKeyIndex,
+ IN UCHAR MsgType,
+ IN BOOLEAN bWPA2,
+ IN MAC_TABLE_ENTRY *pEntry);
+
+VOID WPA_ConstructKdeHdr(
+ IN UINT8 data_type,
+ IN UINT8 data_len,
+ OUT PUCHAR pBuf);
+
+VOID ConstructEapolMsg(
+ IN PMAC_TABLE_ENTRY pEntry,
+ IN UCHAR GroupKeyWepStatus,
+ IN UCHAR MsgType,
+ IN UCHAR DefaultKeyIdx,
+ IN UCHAR *KeyNonce,
+ IN UCHAR *TxRSC,
+ IN UCHAR *GTK,
+ IN UCHAR *RSNIE,
+ IN UCHAR RSNIE_Len,
+ OUT PEAPOL_PACKET pMsg);
+
+PCIPHER_KEY RTMPSwCipherKeySelection(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pIV,
+ IN RX_BLK *pRxBlk,
+ IN PMAC_TABLE_ENTRY pEntry);
+
+NDIS_STATUS RTMPSoftDecryptionAction(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pHdr,
+ IN UCHAR UserPriority,
+ IN PCIPHER_KEY pKey,
+ INOUT PUCHAR pData,
+ INOUT UINT16 *DataByteCnt);
+
+VOID RTMPSoftConstructIVHdr(
+ IN UCHAR CipherAlg,
+ IN UCHAR key_id,
+ IN PUCHAR pTxIv,
+ OUT PUCHAR pHdrIv,
+ OUT UINT8 *hdr_iv_len);
+
+VOID RTMPSoftEncryptionAction(
+ IN PRTMP_ADAPTER pAd,
+ IN UCHAR CipherAlg,
+ IN PUCHAR pHdr,
+ IN PUCHAR pSrcBufData,
+ IN UINT32 SrcBufLen,
+ IN UCHAR KeyIdx,
+ IN PCIPHER_KEY pKey,
+ OUT UINT8 *ext_len);
+
+VOID RTMPMakeRSNIE(
+ IN PRTMP_ADAPTER pAd,
+ IN UINT AuthMode,
+ IN UINT WepStatus,
+ IN UCHAR apidx);
+
+VOID WPAInstallPairwiseKey(
+ PRTMP_ADAPTER pAd,
+ UINT8 BssIdx,
+ PMAC_TABLE_ENTRY pEntry,
+ BOOLEAN bAE);
+
+VOID WPAInstallSharedKey(
+ PRTMP_ADAPTER pAd,
+ UINT8 GroupCipher,
+ UINT8 BssIdx,
+ UINT8 KeyIdx,
+ UINT8 Wcid,
+ BOOLEAN bAE,
+ PUINT8 pGtk,
+ UINT8 GtkLen);
+
+VOID RTMPSetWcidSecurityInfo(
+ PRTMP_ADAPTER pAd,
+ UINT8 BssIdx,
+ UINT8 KeyIdx,
+ UINT8 CipherAlg,
+ UINT8 Wcid,
+ UINT8 KeyTabFlag);
+
+VOID CalculateMIC(
+ IN UCHAR KeyDescVer,
+ IN UCHAR *PTK,
+ OUT PEAPOL_PACKET pMsg);
+
+PSTRING GetEapolMsgType(
+ CHAR msg);
+
+
+/*
+ =====================================
+ function prototype in cmm_wep.c
+ =====================================
+*/
+UINT RTMP_CALC_FCS32(
+ IN UINT Fcs,
+ IN PUCHAR Cp,
+ IN INT Len);
+
+VOID RTMPConstructWEPIVHdr(
+ IN UINT8 key_idx,
+ IN UCHAR *pn,
+ OUT UCHAR *iv_hdr);
+
+BOOLEAN RTMPSoftEncryptWEP(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pIvHdr,
+ IN PCIPHER_KEY pKey,
+ INOUT PUCHAR pData,
+ IN ULONG DataByteCnt);
+
+BOOLEAN RTMPSoftDecryptWEP(
+ IN PRTMP_ADAPTER pAd,
+ IN PCIPHER_KEY pKey,
+ INOUT PUCHAR pData,
+ INOUT UINT16 *DataByteCnt);
+
+/*
+ =====================================
+ function prototype in cmm_tkip.c
+ =====================================
+*/
+BOOLEAN RTMPSoftDecryptTKIP(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pHdr,
+ IN UCHAR UserPriority,
+ IN PCIPHER_KEY pKey,
+ INOUT PUCHAR pData,
+ IN UINT16 *DataByteCnt);
+
+VOID TKIP_GTK_KEY_WRAP(
+ IN UCHAR *key,
+ IN UCHAR *iv,
+ IN UCHAR *input_text,
+ IN UINT32 input_len,
+ OUT UCHAR *output_text);
+
+VOID TKIP_GTK_KEY_UNWRAP(
+ IN UCHAR *key,
+ IN UCHAR *iv,
+ IN UCHAR *input_text,
+ IN UINT32 input_len,
+ OUT UCHAR *output_text);
+
+/*
+ =====================================
+ function prototype in cmm_aes.c
+ =====================================
+*/
+BOOLEAN RTMPSoftDecryptAES(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pData,
+ IN ULONG DataByteCnt,
+ IN PCIPHER_KEY pWpaKey);
+
+VOID RTMPConstructCCMPHdr(
+ IN UINT8 key_idx,
+ IN UCHAR *pn,
+ OUT UCHAR *ccmp_hdr);
+
+BOOLEAN RTMPSoftEncryptCCMP(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pHdr,
+ IN PUCHAR pIV,
+ IN PUCHAR pKey,
+ INOUT PUCHAR pData,
+ IN UINT32 DataLen);
+
+BOOLEAN RTMPSoftDecryptCCMP(
+ IN PRTMP_ADAPTER pAd,
+ IN PUCHAR pHdr,
+ IN PCIPHER_KEY pKey,
+ INOUT PUCHAR pData,
+ INOUT UINT16 *DataLen);
+
+VOID CCMP_test_vector(
+ IN PRTMP_ADAPTER pAd,
+ IN INT input);
+
+#endif
diff --git a/cleopatre/devkit/mt7601udrv/include/wpa_cmm.h b/cleopatre/devkit/mt7601udrv/include/wpa_cmm.h
new file mode 100644
index 0000000000..feccc6c8ce
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wpa_cmm.h
@@ -0,0 +1,211 @@
+
+#ifndef WPA_CMM_H
+#define WPA_CMM_H
+
+#include "rtmp_type.h"
+#include "dot11i_wpa.h"
+
+#define CACHE_NOT_FOUND -1
+
+#define TX_EAPOL_BUFFER 1500
+
+/* Retry timer counter initial value */
+#define PEER_MSG1_RETRY_TIMER_CTR 0
+#define PEER_MSG3_RETRY_TIMER_CTR 10
+#define GROUP_MSG1_RETRY_TIMER_CTR 20
+
+/* WPA mechanism retry timer interval */
+#define PEER_MSG1_RETRY_EXEC_INTV 1000 /* 1 sec */
+#define PEER_MSG3_RETRY_EXEC_INTV 3000 /* 3 sec */
+#define GROUP_KEY_UPDATE_EXEC_INTV 1000 /* 1 sec */
+#define PEER_GROUP_KEY_UPDATE_INIV 2000 /* 2 sec */
+
+#define EAPOL_MSG_INVALID 0
+#define EAPOL_PAIR_MSG_1 1
+#define EAPOL_PAIR_MSG_2 2
+#define EAPOL_PAIR_MSG_3 3
+#define EAPOL_PAIR_MSG_4 4
+#define EAPOL_GROUP_MSG_1 5
+#define EAPOL_GROUP_MSG_2 6
+
+#define ENQUEUE_EAPOL_START_TIMER 200 /* 200 ms */
+
+/* group rekey interval */
+#define TIME_REKEY 0
+#define PKT_REKEY 1
+#define DISABLE_REKEY 2
+#define MAX_REKEY 2
+
+#define MAX_REKEY_INTER 0x3ffffff
+
+#define EAPOL_START_DISABLE 0
+#define EAPOL_START_PSK 1
+#define EAPOL_START_1X 2
+
+/* */
+/* Common WPA state machine: states, events, total function # */
+/* */
+#define WPA_PTK 0
+#define MAX_WPA_PTK_STATE 1
+
+#define WPA_MACHINE_BASE 0
+#define MT2_EAPPacket 0
+#define MT2_EAPOLStart 1
+#define MT2_EAPOLLogoff 2
+#define MT2_EAPOLKey 3
+#define MT2_EAPOLASFAlert 4
+#define MAX_WPA_MSG 5
+
+#define WPA_FUNC_SIZE (MAX_WPA_PTK_STATE * MAX_WPA_MSG)
+
+typedef enum _WpaRole {
+ WPA_NONE, /* 0 */
+ WPA_Authenticator, /* 1 */
+ WPA_Supplicant, /* 2 */
+ WPA_BOTH, /* 3: Authenticator and Supplicant */
+} WPA_ROLE;
+
+/*for-wpa value domain of pMacEntry->WpaState 802.1i D3 p.114 */
+typedef enum _ApWpaState {
+ AS_NOTUSE, /* 0 */
+ AS_DISCONNECT, /* 1 */
+ AS_DISCONNECTED, /* 2 */
+ AS_INITIALIZE, /* 3 */
+ AS_AUTHENTICATION, /* 4 */
+ AS_AUTHENTICATION2, /* 5 */
+ AS_INITPMK, /* 6 */
+ AS_INITPSK, /* 7 */
+ AS_PTKSTART, /* 8 */
+ AS_PTKINIT_NEGOTIATING, /* 9 */
+ AS_PTKINITDONE, /* 10 */
+ AS_UPDATEKEYS, /* 11 */
+ AS_INTEGRITY_FAILURE, /* 12 */
+ AS_KEYUPDATE, /* 13 */
+} AP_WPA_STATE;
+
+/* For supplicant state machine states. 802.11i Draft 4.1, p. 97 */
+/* We simplified it */
+typedef enum _WpaState {
+ SS_NOTUSE, /* 0 */
+ SS_START, /* 1 */
+ SS_WAIT_MSG_3, /* 2 */
+ SS_WAIT_GROUP, /* 3 */
+ SS_FINISH, /* 4 */
+ SS_KEYUPDATE, /* 5 */
+} WPA_STATE;
+
+/* for-wpa value domain of pMacEntry->WpaState 802.1i D3 p.114 */
+typedef enum _GTKState {
+ REKEY_NEGOTIATING,
+ REKEY_ESTABLISHED,
+ KEYERROR,
+} GTK_STATE;
+
+/* for-wpa value domain of pMacEntry->WpaState 802.1i D3 p.114 */
+typedef enum _WpaGTKState {
+ SETKEYS,
+ SETKEYS_DONE,
+} WPA_GTK_STATE;
+
+/* WPA internal command type */
+#define WPA_SM_4WAY_HS_START 1
+#define WPA_SM_DISCONNECT 0xff
+
+/* WPA element IDs */
+typedef enum _WPA_VARIABLE_ELEMENT_ID {
+ WPA_ELEM_CMD = 1,
+ WPA_ELEM_PEER_RSNIE,
+ WPA_ELEM_LOCAL_RSNIE,
+ WPA_ELEM_PMK,
+ WPA_ELEM_RESV
+} WPA_VARIABLE_ELEMENT_ID;
+
+#define GROUP_SUITE 0
+#define PAIRWISE_SUITE 1
+#define AKM_SUITE 2
+#define RSN_CAP_INFO 3
+#define PMKID_LIST 4
+#define G_MGMT_SUITE 5
+
+/* */
+/* The definition of the cipher combination */
+/* */
+/* bit3 bit2 bit1 bit0 */
+/* +------------+------------+ */
+/* | WPA | WPA2 | */
+/* +------+-----+------+-----+ */
+/* | TKIP | AES | TKIP | AES | */
+/* | 0 | 1 | 1 | 0 | -> 0x06 */
+/* | 0 | 1 | 1 | 1 | -> 0x07 */
+/* | 1 | 0 | 0 | 1 | -> 0x09 */
+/* | 1 | 0 | 1 | 1 | -> 0x0B */
+/* | 1 | 1 | 0 | 1 | -> 0x0D */
+/* | 1 | 1 | 1 | 0 | -> 0x0E */
+/* | 1 | 1 | 1 | 1 | -> 0x0F */
+/* +------+-----+------+-----+ */
+/* */
+typedef enum _WpaMixPairCipher {
+ MIX_CIPHER_NOTUSE = 0x00,
+ WPA_NONE_WPA2_TKIPAES = 0x03, /* WPA2-TKIPAES */
+ WPA_AES_WPA2_TKIP = 0x06,
+ WPA_AES_WPA2_TKIPAES = 0x07,
+ WPA_TKIP_WPA2_AES = 0x09,
+ WPA_TKIP_WPA2_TKIPAES = 0x0B,
+ WPA_TKIPAES_WPA2_NONE = 0x0C, /* WPA-TKIPAES */
+ WPA_TKIPAES_WPA2_AES = 0x0D,
+ WPA_TKIPAES_WPA2_TKIP = 0x0E,
+ WPA_TKIPAES_WPA2_TKIPAES = 0x0F,
+} WPA_MIX_PAIR_CIPHER;
+
+/* The internal command list for ralink dot1x daemon using */
+typedef enum _Dot1xInternalCmd {
+ DOT1X_DISCONNECT_ENTRY,
+ DOT1X_RELOAD_CONFIG,
+} DOT1X_INTERNAL_CMD;
+
+/* 802.1x authentication format */
+typedef struct _IEEE8021X_FRAME {
+ UCHAR Version; /* 1.0 */
+ UCHAR Type; /* 0 = EAP Packet */
+ USHORT Length;
+} IEEE8021X_FRAME, *PIEEE8021X_FRAME;
+
+typedef struct GNU_PACKED _RSN_IE_HEADER_STRUCT {
+ UCHAR Eid;
+ UCHAR Length;
+ USHORT Version; /* Little endian format */
+} RSN_IE_HEADER_STRUCT, *PRSN_IE_HEADER_STRUCT;
+
+/* Cipher suite selector types */
+typedef struct GNU_PACKED _CIPHER_SUITE_STRUCT {
+ UCHAR Oui[3];
+ UCHAR Type;
+} CIPHER_SUITE_STRUCT, *PCIPHER_SUITE_STRUCT;
+
+/* Authentication and Key Management suite selector */
+typedef struct GNU_PACKED _AKM_SUITE_STRUCT {
+ UCHAR Oui[3];
+ UCHAR Type;
+} AKM_SUITE_STRUCT, *PAKM_SUITE_STRUCT;
+
+/* RSN capability */
+typedef struct GNU_PACKED _RSN_CAPABILITY {
+ USHORT Rsv:10;
+ USHORT GTKSAReplayCnt:2;
+ USHORT PTKSAReplayCnt:2;
+ USHORT NoPairwise:1;
+ USHORT PreAuth:1;
+} RSN_CAPABILITY, *PRSN_CAPABILITY;
+
+typedef struct _CIPHER_KEY {
+ UCHAR Key[16]; /* 128 bits max */
+ UCHAR TxMic[8];
+ UCHAR RxMic[8];
+ UCHAR TxTsc[16]; /* TSC value. Change it from 48bit to 128bit */
+ UCHAR RxTsc[16]; /* TSC value. Change it from 48bit to 128bit */
+ UCHAR CipherAlg; /* 0:none, 1:WEP64, 2:WEP128, 3:TKIP, 4:AES, 5:CKIP64, 6:CKIP128 */
+ UCHAR KeyLen; /* Key length for each key, 0: entry is invalid */
+ UCHAR Type; /* Indicate Pairwise/Group when reporting MIC error */
+} CIPHER_KEY, *PCIPHER_KEY;
+
+#endif /* WPA_CMM_H */
diff --git a/cleopatre/devkit/mt7601udrv/include/wsc.h b/cleopatre/devkit/mt7601udrv/include/wsc.h
new file mode 100644
index 0000000000..1c1b61ea45
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wsc.h
@@ -0,0 +1,820 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2006, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ wsc.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+ Paul Lin 06-08-08 Initial
+*/
+
+#ifndef __WSC_H__
+#define __WSC_H__
+
+/* WSC OUI SMI */
+#define WSC_OUI 0x0050f204
+#define WSC_SMI 0x00372A
+#define WSC_VENDOR_TYPE 0x00000001
+
+/* EAP code */
+#define EAP_CODE_REQ 0x01
+#define EAP_CODE_RSP 0x02
+#define EAP_CODE_FAIL 0x04
+#define EAP_TYPE_ID 0x01
+#define EAP_TYPE_NOTIFY 0x02
+#define EAP_TYPE_WSC 0xfe
+
+/* structure to store Simple Config Attributes Info */
+typedef struct GNU_PACKED _WSC_LV_INFO {
+ USHORT ValueLen;
+ UCHAR Value[512];
+} WSC_LV_INFO;
+
+typedef struct GNU_PACKED _WSC_IE_HEADER {
+ UCHAR elemId;
+ UCHAR length;
+ UCHAR oui[4];
+} WSC_IE_HEADER;
+
+/* WSC IE structure */
+typedef struct GNU_PACKED _WSC_IE
+{
+ USHORT Type;
+ USHORT Length;
+ UCHAR Data[1]; /* variable length data */
+} WSC_IE, *PWSC_IE;
+
+/* WSC fixed information within EAP */
+typedef struct GNU_PACKED _WSC_FRAME
+{
+ UCHAR SMI[3];
+ UINT VendorType;
+ UCHAR OpCode;
+ UCHAR Flags;
+} WSC_FRAME, *PWSC_FRAME;
+
+/* EAP frame format */
+typedef struct GNU_PACKED _EAP_FRAME {
+ UCHAR Code; /* 1 = Request, 2 = Response */
+ UCHAR Id;
+ USHORT Length;
+ UCHAR Type; /* 1 = Identity, 0xfe = reserved, used by WSC */
+} EAP_FRAME, *PEAP_FRAME;
+
+static inline BOOLEAN WscCheckWSCHeader(
+ IN PUCHAR pData)
+{
+ PWSC_FRAME pWsc;
+
+ pWsc = (PWSC_FRAME) pData;
+
+ /* Verify SMI first */
+ if (((pWsc->SMI[0] * 256 + pWsc->SMI[1]) * 256 + pWsc->SMI[2]) != WSC_SMI)
+ {
+ /* Wrong WSC SMI Vendor ID, Update WSC status */
+ return FALSE;
+ }
+
+ /* Verify Vendor Type */
+ if (cpu2be32(get_unaligned32(&pWsc->VendorType)) != WSC_VENDOR_TYPE)
+ {
+ /* Wrong WSC Vendor Type, Update WSC status */
+ return FALSE;
+ }
+ return TRUE;
+}
+#ifdef WSC_INCLUDED
+
+
+/* WSC HDR PSH BTN FUNC */
+/* WSC hardware push button function 0811 */
+#define WSC_HDR_BTN_CHECK_PERIOD MLME_TASK_EXEC_INTV /* unit: ms, check pin every 100ms */
+#define WSC_HDR_BTN_PRESS_TIME 2000 /* unit: ms, press button for 2s */
+#define WSC_HDR_BTN_CONT_TIMES (WSC_HDR_BTN_PRESS_TIME/WSC_HDR_BTN_CHECK_PERIOD)
+#define WSC_HDR_BTN_GPIO_0 ((UINT32)0x00000001) /* bit 0 for RT2860/RT2870 */
+#define WSC_HDR_BTN_GPIO_3 ((UINT32)0x00000008) /* bit 3 for RT2860/RT2870 */
+
+/* bit7: WPS PBC (0:off, 1:on) */
+#define WSC_HDR_BTN_MR_HDR_SUPPORT_SET(__pAd, __FlgIsSup) \
+ (__pAd)->WscHdrPshBtnFlag = __FlgIsSup;
+
+/* check if hardware push button is supported */
+#define WSC_HDR_BTN_MR_IS_HDR_SUPPORT(__pAd) \
+ ((__pAd)->WscHdrPshBtnFlag)
+
+/* run hardware push button handler */
+#define WSC_HDR_BTN_MR_HANDLE(__pAd) \
+ if ((__pAd)->WscHdrPshBtnFlag) WSC_HDR_BTN_CheckHandler(__pAd);
+
+/* bit3: WPS PBC function is controlled through GPIO[3] */
+/* currently only for RT2860 & RT2870 */
+#define WSC_HDR_BTN_MR_PRESS_FLG_GET(__pAd, __FlgIsPressed) \
+ { \
+ UINT32 __gpio_value, mask; \
+ RTMP_IO_READ32(__pAd, GPIO_CTRL_CFG, (&__gpio_value)); \
+ if (RTMP_TEST_MORE_FLAG(__pAd, fRTMP_ADAPTER_WSC_PBC_PIN0)) \
+ mask = WSC_HDR_BTN_GPIO_0; \
+ else \
+ mask = WSC_HDR_BTN_GPIO_3; \
+ if (__gpio_value & mask) \
+ __FlgIsPressed = 0; \
+ else \
+ __FlgIsPressed = 1; \
+ }
+/* WSC HDR PSH BTN FUNC */
+
+
+#define WSC_TIMER_INIT(_pAd, _pData, _time_var, _time_flg, _time_fn) \
+ do{ \
+ RTMPInitTimer((_pAd), (_time_var), GET_TIMER_FUNCTION(_time_fn), (_pData), FALSE); \
+ (_time_flg) = FALSE; \
+ }while(0)
+
+
+/*Messages for the WSC state machine, */
+#define WSC_MACHINE_BASE 34
+#define WSC_EAPOL_PACKET_MSG 34
+#define WSC_EAPOL_START_MSG 35
+#define WSC_EAPOL_UPNP_MSG 36
+
+#define MAX_WSC_MSG 3
+
+/* WSC Opcode */
+#define WSC_OPCODE_START 0x01
+#define WSC_OPCODE_ACK 0x02
+#define WSC_OPCODE_NACK 0x03
+#define WSC_OPCODE_MSG 0x04
+#define WSC_OPCODE_DONE 0x05
+#define WSC_OPCODE_FRAG_ACK 0x06
+
+/* Flags */
+#define WSC_MSG_FLAG_MF 0x01 /* More fragments */
+#define WSC_MSG_FLAG_LF 0x02 /* Length field */
+
+#define WSC_OPCODE_UPNP_MASK 0x10
+#define WSC_OPCODE_UPNP_DATA 0x11
+#define WSC_OPCODE_UPNP_MGMT 0x12
+#define WSC_OPCODE_UPNP_CTRL 0x13
+
+#define WSC_UPNP_MGMT_SUB_PROBE_REQ 0x01
+#define WSC_UPNP_MGMT_SUB_CONFIG_REQ 0x02
+#define WSC_UPNP_MGMT_SUB_REG_SELECT 0x03
+
+
+/*patch for Atheros External registrar */
+#define WSC_UPNP_DATA_SUB_INCLUDE_MAC 0x0100
+
+#define WSC_UPNP_DATA_SUB_NORMAL 0x00
+#define WSC_UPNP_DATA_SUB_TO_ALL 0x01
+#define WSC_UPNP_DATA_SUB_TO_ONE 0x02
+#define WSC_UPNP_DATA_SUB_ACK 0x03
+#define WSC_UPNP_DATA_SUB_M1 0x04
+#define WSC_UPNP_DATA_SUB_M2 0x05
+#define WSC_UPNP_DATA_SUB_M2D 0x06
+#define WSC_UPNP_DATA_SUB_M3 0x07
+#define WSC_UPNP_DATA_SUB_M4 0x08
+#define WSC_UPNP_DATA_SUB_M5 0x09
+#define WSC_UPNP_DATA_SUB_M6 0x0A
+#define WSC_UPNP_DATA_SUB_M7 0x0B
+#define WSC_UPNP_DATA_SUB_M8 0x0C
+#define WSC_UPNP_DATA_SUB_WSC_ACK 0x0D
+#define WSC_UPNP_DATA_SUB_WSC_NACK 0x0E
+#define WSC_UPNP_DATA_SUB_WSC_DONE 0x0F
+#define WSC_UPNP_DATA_SUB_WSC_UNKNOWN 0xff
+
+
+/* Wsc EAP Messges type */
+#define WSC_MSG_EAP_RSP_ID 0x21
+#define WSC_MSG_EAP_REG_RSP_ID 0x22
+#define WSC_MSG_EAP_ENR_RSP_ID 0x23
+#define WSC_MSG_EAP_UPNP_RSP_ID 0x24
+#define WSC_MSG_EAP_REQ_ID 0x25
+#define WSC_MSG_EAP_REQ_START 0x26
+#define WSC_MSG_EAP_FAIL 0x27
+#define WSC_MSG_EAP_FRAG_ACK 0x28
+#define WSC_MSG_PROB_RSP 0x01
+#define WSC_MSG_EAPOL_START 0x02
+#define WSC_MSG_M1 0x04
+#define WSC_MSG_M2 0x05
+#define WSC_MSG_M2D 0x06
+#define WSC_MSG_M3 0x07
+#define WSC_MSG_M4 0x08
+#define WSC_MSG_M5 0x09
+#define WSC_MSG_M6 0x0A
+#define WSC_MSG_M7 0x0B
+#define WSC_MSG_M8 0x0C
+#define WSC_MSG_WSC_ACK 0x0D
+#define WSC_MSG_WSC_NACK 0x0E
+#define WSC_MSG_WSC_DONE 0x0F
+#define WSC_MSG_UNKNOWN 0xff
+
+/* WSC connection mode */
+#define WSC_PIN_MODE 1
+#define WSC_PBC_MODE 2
+#define WSC_SMPBC_MODE 3
+
+/* Value of WSC_IE_DEV_PASS_ID 0x1012 */
+#define DEV_PASS_ID_PIN 0x0000
+#define DEV_PASS_ID_USER 0x0001
+#define DEV_PASS_ID_MACHINE 0x0002
+#define DEV_PASS_ID_REKEY 0x0003
+#define DEV_PASS_ID_PBC 0x0004
+#define DEV_PASS_ID_REG 0x0005
+#define DEV_PASS_ID_SMPBC 0x0006
+#define DEV_PASS_ID_NOSPEC 0xffff
+
+
+/* Common definition */
+#define WSC_VERSION 0x10
+#define WSC_CONFIG_METHODS 0x008C
+
+/* Wsc status code */
+#define STATUS_WSC_NOTUSED 0
+#define STATUS_WSC_IDLE 1
+#define STATUS_WSC_FAIL 2 /* WSC Process Fail */
+#define STATUS_WSC_LINK_UP 3 /* Start WSC Process */
+#define STATUS_WSC_EAPOL_START_RECEIVED 4 /* Received EAPOL-Start */
+#define STATUS_WSC_EAP_REQ_ID_SENT 5 /* Sending EAP-Req(ID) */
+#define STATUS_WSC_EAP_RSP_ID_RECEIVED 6 /* Receive EAP-Rsp(ID) */
+#define STATUS_WSC_EAP_RSP_WRONG_SMI 7 /* Receive EAP-Req with wrong WSC SMI Vendor Id */
+#define STATUS_WSC_EAP_RSP_WRONG_VENDOR_TYPE 8 /* Receive EAPReq with wrong WSC Vendor Type */
+#define STATUS_WSC_EAP_REQ_WSC_START 9 /* Sending EAP-Req(WSC_START) */
+#define STATUS_WSC_EAP_M1_SENT 10 /* Send M1 */
+#define STATUS_WSC_EAP_M1_RECEIVED 11 /* Received M1 */
+#define STATUS_WSC_EAP_M2_SENT 12 /* Send M2 */
+#define STATUS_WSC_EAP_M2_RECEIVED 13 /* Received M2 */
+#define STATUS_WSC_EAP_M2D_RECEIVED 14 /* Received M2D */
+#define STATUS_WSC_EAP_M3_SENT 15 /* Send M3 */
+#define STATUS_WSC_EAP_M3_RECEIVED 16 /* Received M3 */
+#define STATUS_WSC_EAP_M4_SENT 17 /* Send M4 */
+#define STATUS_WSC_EAP_M4_RECEIVED 18 /* Received M4 */
+#define STATUS_WSC_EAP_M5_SENT 19 /* Send M5 */
+#define STATUS_WSC_EAP_M5_RECEIVED 20 /* Received M5 */
+#define STATUS_WSC_EAP_M6_SENT 21 /* Send M6 */
+#define STATUS_WSC_EAP_M6_RECEIVED 22 /* Received M6 */
+#define STATUS_WSC_EAP_M7_SENT 23 /* Send M7 */
+#define STATUS_WSC_EAP_M7_RECEIVED 24 /* Received M7 */
+#define STATUS_WSC_EAP_M8_SENT 25 /* Send M8 */
+#define STATUS_WSC_EAP_M8_RECEIVED 26 /* Received M8 */
+#define STATUS_WSC_EAP_RAP_RSP_ACK 27 /* Processing EAP Response (ACK) */
+#define STATUS_WSC_EAP_RAP_REQ_DONE_SENT 28 /* Processing EAP Request (Done) */
+#define STATUS_WSC_EAP_RAP_RSP_DONE_SENT 29 /* Processing EAP Response (Done) */
+#define STATUS_WSC_EAP_FAIL_SENT 30 /* Sending EAP-Fail */
+#define STATUS_WSC_ERROR_HASH_FAIL 31 /* WSC_ERROR_HASH_FAIL */
+#define STATUS_WSC_ERROR_HMAC_FAIL 32 /* WSC_ERROR_HMAC_FAIL */
+#define STATUS_WSC_ERROR_DEV_PWD_AUTH_FAIL 33 /* WSC_ERROR_DEV_PWD_AUTH_FAIL */
+#define STATUS_WSC_CONFIGURED 34
+#define STATUS_WSC_SCAN_AP 35 /* Scanning AP */
+#define STATUS_WSC_EAPOL_START_SENT 36
+#define STATUS_WSC_EAP_RSP_DONE_SENT 37
+#define STATUS_WSC_WAIT_PIN_CODE 38
+#define STATUS_WSC_START_ASSOC 39
+#define STATUS_WSC_IBSS_WAIT_NEXT_SMPBC_ENROLLEE 40
+#define STATUS_WSC_IBSS_NEW_RANDOM_PIN 41
+#define STATUS_WSC_IBSS_FIXED_PIN 42
+
+/* All error message dtarting from 0x0100 */
+#define STATUS_WSC_PBC_TOO_MANY_AP 0x0101 /* Too many PBC AP avaliable */
+#define STATUS_WSC_PBC_NO_AP 0x0102 /* No PBC AP avaliable */
+#define STATUS_WSC_EAP_FAIL_RECEIVED 0x0103 /* Received EAP-FAIL */
+#define STATUS_WSC_EAP_NONCE_MISMATCH 0x0104 /* Receive EAP with wrong NONCE */
+#define STATUS_WSC_EAP_INVALID_DATA 0x0105 /* Receive EAP without integrity (Hmac mismatch) */
+#define STATUS_WSC_PASSWORD_MISMATCH 0x0106 /* Error PIN Code (R-Hash mismatch) */
+#define STATUS_WSC_EAP_REQ_WRONG_SMI 0x0107 /* Receive EAP-Req with wrong WPS SMI Vendor Id */
+#define STATUS_WSC_EAP_REQ_WRONG_VENDOR_TYPE 0x0108 /* Receive EAPReq with wrong WPS Vendor Type */
+#define STATUS_WSC_PBC_SESSION_OVERLAP 0x0109 /* AP PBC session overlap */
+#define STATUS_WSC_SMPBC_TOO_MANY_REGISTRAR 0x010a /* Too many SMPBC Registrars avaliable */
+#define STATUS_WSC_EMPTY_IPV4_SUBMASK_LIST 0x010b /* Empty available IPv4 Submask list */
+#define STATUS_WSC_SMPBC_NO_AP 0x010c /* No SMPBC AP avaliable */
+
+#define WSC_DISABLE 0x0
+#define WSC_ENROLLEE 0x1
+#define WSC_PROXY 0x2
+#define WSC_REGISTRAR 0x4
+#define WSC_ENROLLEE_PROXY (WSC_ENROLLEE | WSC_PROXY)
+#define WSC_ENROLLEE_REGISTRAR (WSC_ENROLLEE | WSC_REGISTRAR)
+#define WSC_PROXY_REGISTRAR (WSC_PROXY | WSC_REGISTRAR)
+#define WSC_ENROLLEE_PROXY_REGISTRAR (WSC_ENROLLEE | WSC_PROXY | WSC_REGISTRAR)
+
+/* Device request/response type */
+#define WSC_MSGTYPE_ENROLLEE_INFO_ONLY 0x00
+#define WSC_MSGTYPE_ENROLLEE_OPEN_8021X 0x01
+#define WSC_MSGTYPE_REGISTRAR 0x02
+#define WSC_MSGTYPE_AP_WLAN_MGR 0x03
+
+/* RF Band */
+#define WSC_RFBAND_24GHZ 0x01
+#define WSC_RFBAND_50GHZ 0x02
+
+/* Simple Config state */
+#define WSC_SCSTATE_UNCONFIGURED 0x01
+#define WSC_SCSTATE_CONFIGURED 0x02
+
+/* Common definition */
+#define WSC_MANUFACTURE "Ralink Technology, Corp."
+#ifdef CONFIG_AP_SUPPORT
+#define AP_WSC_MODEL_NAME "Ralink Wireless Access Point"
+#define AP_WSC_DEVICE_NAME "RalinkAPS"
+#endif /* CONFIG_AP_SUPPORT */
+#define WSC_MODEL_NUMBER "RT2860"
+#define WSC_MODEL_SERIAL "12345678"
+
+/* Time-Out, param for timer func, count by micro-sec, not ticks */
+#define WSC_EAPOL_START_TIME_OUT 2000
+#define WSC_EAP_ID_TIME_OUT 5000
+#define WSC_EAP_MSG_TIME_OUT 5000
+#define WSC_EAP_MSG_ACK_TIME_OUT 1000
+#define WSC_EAP_EAP_FAIL_TIME_OUT 1000
+#define WSC_TWO_MINS_TIME_OUT 120000
+#define WSC_UPNP_M2D_TIME_OUT 15000
+#define WSC_UPNP_MSG_TIME_OUT 15000
+#define WSC_PROFILE_RETRY_TIME_OUT 10000
+#ifdef WSC_LED_SUPPORT
+#define WSC_SUCCESSFUL_LED_PATTERN_TIMEOUT 300000 /* 300 seconds */
+#define WSC_WPS_FAIL_LED_PATTERN_TIMEOUT 15000 /* 15 seconds. */
+#define WSC_WPS_SKIP_TURN_OFF_LED_TIMEOUT 2500 /* 2.5 seconds. */
+#define WSC_WPS_TURN_OFF_LED_TIMEOUT 1000 /* 1 second. */
+#endif /* WSC_LED_SUPPORT */
+
+#ifdef WSC_V2_SUPPORT
+#define WSC_WPS_AP_SETUP_LOCK_TIME 60 /* 60 mins */
+#define WSC_WPS_AP_MAX_PIN_ATTACK 3
+#define WSC_LOCK_FOREVER_PIN_ATTACK 10
+#endif /* WSC_V2_SUPPORT */
+
+#define WSC_INIT_ENTRY_APIDX 0xFF
+#define WSC_MAX_DATA_LEN 1024
+
+#define WSC_ENTRY_GET_EAPOL_START 0x1
+#define WSC_ENTRY_GET_EAP_RSP_ID 0x2
+
+/* Pack struct to align at byte */
+/*#pragma pack(1) */
+
+/* General used field */
+
+/* UUID related definition */
+#define UUID_LEN_HEX 16 /* 128 bits => 16 bytes */
+#define UUID_LEN_STR 37 /* hex to string, plus 4 dash, plus 1 '\0' */
+#define UUID_VERSION 1 /* We currently just support version 1 */
+
+/* user define length add by woody */
+#define WSC_MANUFACTURE_LEN 64
+#define WSC_MODELNAME_LEN 32
+#define WSC_MODELNUNBER_LEN 32
+#define WSC_DEVICENAME_LEN 32
+#define WSC_SERIALNUNBER_LEN 32
+#define MAX_2ND_DEV_TYPE_LIST 2
+#define MAX_2ND_DEV_TYPE_LIST_BUFFER (1+(8*MAX_2ND_DEV_TYPE_LIST))
+
+typedef struct _WSC_UUID_T{
+ UINT32 timeLow;
+ UINT16 timeMid;
+ UINT16 timeHi_Version;
+ UCHAR clockSeqHi_Var;
+ UCHAR clockSeqLow;
+ UCHAR node[6];
+}WSC_UUID_T;
+
+/* For WSC state machine states. */
+/* We simplified it */
+typedef enum _WscState
+{
+ WSC_STATE_OFF,
+ WSC_STATE_INIT,
+ WSC_STATE_START,
+ WSC_STATE_FAIL,
+ WSC_STATE_CONFIGURED,
+ WSC_STATE_LINK_UP,
+ WSC_STATE_SEND_EAPOL_START,
+ WSC_STATE_WAIT_EAPOL_START,
+ WSC_STATE_WAIT_UPNP_START,
+ WSC_STATE_WAIT_REQ_ID,
+ WSC_STATE_WAIT_RESP_ID,
+ WSC_STATE_WAIT_WSC_START,
+ WSC_STATE_WAIT_M1,
+ WSC_STATE_SENT_M1,
+ WSC_STATE_SENT_M2D,
+ WSC_STATE_WAIT_M2,
+ WSC_STATE_RX_M2D,
+ WSC_STATE_WAIT_PIN,
+ WSC_STATE_WAIT_M3,
+ WSC_STATE_WAIT_M4,
+ WSC_STATE_WAIT_M5,
+ WSC_STATE_WAIT_M6,
+ WSC_STATE_WAIT_M7,
+ WSC_STATE_WAIT_M8,
+ WSC_STATE_WAIT_DONE,
+ WSC_STATE_WAIT_ACK,
+ WSC_STATE_WAIT_EAPFAIL,
+ WSC_STATE_WAIT_DISCONN
+} WSC_STATE;
+
+/* WSC saved message */
+typedef struct _WSC_MESSAGE
+{
+ INT Length; /* Length of saved message */
+ UCHAR Data[2048]; /* Contents */
+} WSC_MESSAGE, *PWSC_MESSAGE;
+
+
+/* Data structure to hold Enrollee and Registrar information */
+typedef struct _WSC_DEV_INFO
+{
+ UCHAR Version;
+ UCHAR Version2;
+ UCHAR Uuid[16];
+ UCHAR MacAddr[6];
+ UCHAR DeviceName[32];
+ UCHAR PriDeviceType[8];
+ UCHAR SecDevTypList[MAX_2ND_DEV_TYPE_LIST_BUFFER]; /* 2nd Device Type List, ref. P2P Spec. v1.1 Table 29*/
+ USHORT AuthTypeFlags;
+ USHORT EncrTypeFlags;
+ UCHAR ConnTypeFlags;
+ USHORT ConfigMethods;
+ UCHAR ScState;
+ UCHAR Manufacturer[64];
+ UCHAR ModelName[32];
+ UCHAR ModelNumber[32];
+ UCHAR SerialNumber[32];
+ UCHAR RfBand;
+ UINT OsVersion;
+ UINT FeatureId;
+ USHORT AssocState;
+ USHORT DevPwdId;
+ USHORT ConfigError;
+ UCHAR Ssid[32];
+ UCHAR NewKey[64 + 1]; /* not sure sprintf would add '\0' or not, add one byte for \0' */
+ INT NewKeyLen;
+ UCHAR NewKeyIndex;
+} WSC_DEV_INFO, *PWSC_DEV_INFO;
+
+/* data structure to store info of the instance of Registration protocol */
+typedef struct _WSC_REG_DATA
+{
+ /* filled in by device self */
+ WSC_DEV_INFO SelfInfo;
+ /* filled in by wps peer */
+ WSC_DEV_INFO PeerInfo;
+
+ /*Diffie Hellman parameters */
+/* BIGNUM *DH_PubKey_Peer; //peer's pub key stored in bignum format */
+/* DH *DHSecret; //local key pair in bignum format */
+ UCHAR EnrolleeRandom[192]; /* Saved random byte for public key generation */
+
+ UCHAR ReComputePke;
+ UCHAR Pke[192]; /*enrollee's raw pub key */
+ UCHAR Pkr[192]; /*registrar's raw pub key */
+
+ UCHAR SecretKey[192]; /* Secret key calculated by enrollee */
+
+ UCHAR StaEncrSettings[128]; /* to be sent in M2/M8 by reg & M7 by enrollee */
+ UCHAR ApEncrSettings[1024];
+
+ /* Saved Message content for authenticator calculation */
+ WSC_MESSAGE LastTx;
+ WSC_MESSAGE LastRx;
+
+ /* Device password */
+ UCHAR PIN[8];
+ UCHAR PinCodeLen;
+
+ /* From KDF Key */
+ UCHAR AuthKey[32];
+ UCHAR KeyWrapKey[16];
+ UCHAR Emsk[32];
+
+ USHORT EnrolleePwdId;
+ UCHAR EnrolleeNonce[16]; /*N1, from enrollee */
+ UCHAR RegistrarNonce[16]; /*N2, from registrar */
+ UCHAR SelfNonce[16];
+
+ UCHAR Psk1[16];
+ UCHAR Psk2[16];
+
+ UCHAR EHash1[32];
+ UCHAR EHash2[32];
+ UCHAR Es1[16];
+ UCHAR Es2[16];
+
+ UCHAR RHash1[32];
+ UCHAR RHash2[32];
+ UCHAR Rs1[16];
+ UCHAR Rs2[16];
+} WSC_REG_DATA, *PWSC_REG_DATA;
+
+
+/* WSC UPnP node info. */
+typedef struct _WSC_UPNP_NODE_INFO{
+ BOOLEAN bUPnPInProgress;
+ BOOLEAN bUPnPMsgTimerRunning;
+ BOOLEAN bUPnPMsgTimerPending;
+ UINT registrarID;
+ RALINK_TIMER_STRUCT UPnPMsgTimer;
+}WSC_UPNP_NODE_INFO, *PWSC_UPNP_NODE_INFO;
+
+#define MAX_PBC_STA_TABLE_SIZE 4
+typedef struct _WSC_STA_PBC_PROBE_INFO {
+ ULONG ReciveTime[MAX_PBC_STA_TABLE_SIZE];
+ UCHAR WscPBCStaProbeCount;
+ UCHAR StaMacAddr[MAX_PBC_STA_TABLE_SIZE][MAC_ADDR_LEN];
+ UCHAR Valid[MAX_PBC_STA_TABLE_SIZE];
+} WSC_STA_PBC_PROBE_INFO, *PWSC_STA_PBC_PROBE_INFO;
+
+
+
+typedef struct GNU_PACKED _WSC_PEER_DEV_INFO {
+ UCHAR WscPeerDeviceName[32];
+ UCHAR WscPeerManufacturer[64];
+ UCHAR WscPeerModelName[32];
+ UCHAR WscPeerModelNumber[32];
+ UCHAR WscPeerSerialNumber[32];
+ UCHAR WscPeerMAC[6];
+} WSC_PEER_DEV_INFO, *PWSC_PEER_DEV_INFO;
+
+#ifdef WSC_V2_SUPPORT
+#define WSC_PIN_ATTACK_CHECK 600
+#define WSC_V2_VERSION 0x20
+#define TLV_ASCII 0
+#define TLV_HEX 1
+
+typedef struct _WSC_TLV {
+ USHORT TlvTag;
+ USHORT TlvLen;
+ PUCHAR pTlvData;
+ UCHAR TlvType; /* 0: ASCII, 1: Hex */
+} WSC_TLV, *PWSC_TLV;
+
+typedef struct _WSC_V2_INFO {
+ WSC_TLV ExtraTlv;
+ BOOLEAN bWpsEnable; /* FALSE: disable WSC , TRUE: enable WSC */
+ BOOLEAN bEnableWpsV2; /* FALSE: not support WSC 2.0, TRUE: support WSC 2.0 */
+} WSC_V2_INFO, *PWSC_V2_INFO;
+#endif /* WSC_V2_SUPPORT */
+
+/* WSC control block */
+typedef struct _WSC_CTRL
+{
+ INT WscConfMode; /* 0 Wsc not enable; 1 un-configure AP ; 3 un-configure AP with Proxy ; */
+ /* 5 un-configure AP with Registrar ; 7 un-configure AP with proxy and Registrar */
+ INT WscMode; /* 1 PIN ;2 PBC set from UI dynamically */
+ UCHAR WscConfStatus; /* 1 un-configured; 2 configured; need to update to .dat */
+ USHORT WscConfigMethods; /* Registrar support list. The List is bitwise. PBC:0x0080 Lable:0x0004 Display:0x0008 */
+ INT WscStatus; /* for user to monitor the status */
+ INT WscState; /* WSC Protocl State: M1 to M8 */
+ UINT WscPinCode; /* record the UI's PIN code input when we are registrar */
+ UCHAR WscPinCodeLen; /* record the UI's PIN code input length when we are registrar */
+ BOOLEAN WscEnrollee4digitPinCode; /* flag to use 4 or 8 digit Device own PIN code. */
+ UINT WscEnrolleePinCode; /* recored Device own PIN code. */
+ UCHAR WscEnrolleePinCodeLen; /* recored Device own PIN code length */
+ INT WscSelReg; /* record the UI's PIN code input when we are registrar */
+ NDIS_802_11_SSID WscSsid; /* select a desired ssid to connect for PIN mode */
+ UCHAR WscPBCBssCount; /* Count of PBC activated APs. */
+ UCHAR WscBssid[MAC_ADDR_LEN]; /* select a desired bssid to connect */
+ WSC_REG_DATA RegData; /* Registrar pair data */
+ UCHAR lastId;
+ UCHAR WscUseUPnP;
+ BOOLEAN EapMsgRunning; /* already recived Eap-Rsp(Identity) and sent M1 or Eap-Req(Start) */
+ UCHAR WscRetryCount;
+ UCHAR EntryIfIdx;
+ UCHAR EntryAddr[MAC_ADDR_LEN];
+ BOOLEAN Wsc2MinsTimerRunning;
+ RALINK_TIMER_STRUCT Wsc2MinsTimer;
+ WSC_PROFILE WscProfile; /* Saved WSC profile after M8 */
+ WSC_UPNP_NODE_INFO WscUPnPNodeInfo; /*Use to save UPnP node related info. */
+
+ BOOLEAN EapolTimerRunning;
+ BOOLEAN EapolTimerPending;
+ RALINK_TIMER_STRUCT EapolTimer;
+
+ BOOLEAN WscPBCTimerRunning;
+ RALINK_TIMER_STRUCT WscPBCTimer;
+ BOOLEAN WscScanTimerRunning;
+ RALINK_TIMER_STRUCT WscScanTimer;
+ BOOLEAN WscProfileRetryTimerRunning;
+ RALINK_TIMER_STRUCT WscProfileRetryTimer;
+#ifdef WSC_LED_SUPPORT
+ ULONG WscLEDMode; /* WPS LED mode: LED_WPS_XXX definitions. */
+ ULONG WscLastWarningLEDMode; /* LED_WPS_ERROR or LED_WPS_SESSION_OVERLAP_DETECTED */
+ BOOLEAN bSkipWPSTurnOffLED; /* Skip the WPS turn off LED command. */
+ BOOLEAN WscLEDTimerRunning;
+ RALINK_TIMER_STRUCT WscLEDTimer;
+ BOOLEAN WscSkipTurnOffLEDTimerRunning;
+ RALINK_TIMER_STRUCT WscSkipTurnOffLEDTimer;
+ /* This variable is TRUE after the 120 seconds WPS walk time expiration. */
+ /* Note that in the case of LED mode 9, the error LED should be turned on only after WPS walk time expiration */
+ /* if the NIC cannot find any WPS PBC-enabled APs in the last scanning result. */
+ BOOLEAN bWPSWalkTimeExpiration;
+#endif /* WSC_LED_SUPPORT */
+ UCHAR WpaPsk[64];
+ INT WpaPskLen;
+ BOOLEAN bWscTrigger; /* TRUE: AP-Enrollee & AP-Registrar work, FALSE: AP-Enrollee & AP-Registrar stop working */
+ PVOID pAd;
+ UINT WscLastPinFromEnrollee;
+ BOOLEAN WscRejectSamePinFromEnrollee;
+#ifdef CONFIG_AP_SUPPORT
+ NDIS_802_11_SSID WscDefaultSsid; /* Default WPS SSID after WPS process complete with Enrollee when AP is un-configured Registrar. */
+ BOOLEAN bWCNTest;
+#endif /* CONFIG_AP_SUPPORT */
+ INT WscKeyASCII; /*WscKeyASCII (0:Hex, 1:ASCII(random length), others: ASCII length(8~63, default 8)) */
+ INT WscActionMode;
+ UCHAR Wsc_Uuid_E[UUID_LEN_HEX];
+ UCHAR Wsc_Uuid_Str[UUID_LEN_STR];
+
+ UCHAR WpsApBand; /* Preferred WPS AP PHY type. Ref: PREFERRED_WPS_AP_PHY_TYPE */
+/*add by woody */
+ UCHAR Flags;
+
+ WSC_PEER_DEV_INFO WscPeerInfo;
+ BOOLEAN bCheckMultiByte;
+#ifdef WSC_V2_SUPPORT
+ WSC_V2_INFO WscV2Info;
+#endif /* WSC_V2_SUPPORT */
+ RALINK_TIMER_STRUCT WscUpdatePortCfgTimer;
+ BOOLEAN WscUpdatePortCfgTimerRunning;
+#ifdef CONFIG_AP_SUPPORT
+ RALINK_TIMER_STRUCT WscSetupLockTimer;
+ BOOLEAN WscSetupLockTimerRunning;
+ RALINK_TIMER_STRUCT WscPinAttackCountCheckTimer;
+ BOOLEAN WscPinAttackCountCheckTimerRunning;
+ BOOLEAN bSetupLock;
+ UCHAR PinAttackCount;
+ UCHAR MaxPinAttack;
+ UINT SetupLockTime; /* unit: minute */
+#endif /* CONFIG_AP_SUPPORT */
+ BOOLEAN bWscAutoTigeer;
+ BOOLEAN bWscFragment;
+ PUCHAR pWscRxBuf;
+ INT WscRxBufLen;
+ USHORT WscFragSize;
+ INT WscTxBufLen;
+ PUCHAR pWscTxBuf;
+ BOOLEAN bWscLastOne;
+ BOOLEAN bWscFirstOne;
+ PUCHAR pWscCurBufIdx;
+ NDIS_SPIN_LOCK WscPeerListSemLock;
+ LIST_HEADER WscPeerList;
+ RALINK_TIMER_STRUCT M2DTimer;
+ BOOLEAN bM2DTimerRunning;
+ INT M2DACKBalance;
+} WSC_CTRL, *PWSC_CTRL;
+
+typedef struct GNU_PACKED _WSC_CONFIGURED_VALUE {
+ USHORT WscConfigured; /* 1 un-configured; 2 configured */
+ UCHAR WscSsid[32 + 1];
+ USHORT WscAuthMode; /* mandatory, 0x01: open, 0x02: wpa-psk, 0x04: shared, 0x08:wpa, 0x10: wpa2, 0x20: wpa2-psk */
+ USHORT WscEncrypType; /* 0x01: none, 0x02: wep, 0x04: tkip, 0x08: aes */
+ UCHAR DefaultKeyIdx;
+ UCHAR WscWPAKey[64 + 1];
+} WSC_CONFIGURED_VALUE;
+
+/*
+ Following definitions are used for UPnP module to communicate msg.
+*/
+
+/* Ralink specific message header for Linux specific NETLINK socket. */
+#define RTMP_WSC_NLMSG_HDR_LEN 30 /*signature(8) + envID(4) + ackID(4) + msgLen(4) + Flag(2) + segLen(2) + devAddr(6) */
+typedef struct GNU_PACKED _RTMP_WSC_NLMSG_HDR{
+ UCHAR signature[8]; /* Signature used to identify that this's a Ralink specific NETLINK message.
+ MUST be "RAWSCMSG" currently.
+ */
+ UINT envID; /* Unique event Identification assigned by sender. */
+ UINT ackID; /* Notify that this message is a repsone for the message whose event identifier is "ackID". */
+ UINT msgLen; /* Totally length for this message. This message may seperate in serveral packets. */
+ USHORT flags;
+ USHORT segLen; /* The "segLen" means the actual data length in this one msg packet.
+ Because the NETLINK socket just support 256bytes for "IWCUSTOM" typed message, so we may
+ need to do fragement for our msg. If one message was fragemented as serveral pieces, the
+ user space receiver need to re-assemble it.
+ */
+ UCHAR devAddr[MAC_ADDR_LEN]; /* MAC address of the net device which send this netlink msg. */
+}RTMP_WSC_NLMSG_HDR;
+
+
+/*
+ Ralink specific WSC Mesage Header definition.
+*/
+#define RTMP_WSC_MSG_HDR_LEN 12 /*msgType(2) + msgSubType(2) + ipAddr(4) + len(4) */
+typedef struct GNU_PACKED _RTMP_WSC_MSG_HDR{
+ USHORT msgType;
+ USHORT msgSubType;
+ UINT ipAddr;
+ UINT msgLen; /*Not include this header. */
+}RTMP_WSC_MSG_HDR;
+
+#define WSC_MSG_TYPE_ENROLLEE 0x1
+#define WSC_MSG_TYPE_PROXY 0x2
+#define WSC_MSG_TYPE_REGISTRAR 0x3
+#define WSC_MSG_TYPE_CTRL 0x4
+#define WSC_MSG_TYPE_MGMT 0x5
+
+PSTRING WscGetAuthTypeStr(
+ IN USHORT authFlag);
+
+PSTRING WscGetEncryTypeStr(
+ IN USHORT encryFlag);
+
+#define IWEVCUSTOM_MSG_MAX_LEN 255 /*refer to kernel definition. <linux/wireless.h> */
+#define IWEVCUSTOM_PAYLOD_MAX_LEN (IWEVCUSTOM_MSG_MAX_LEN - RTMP_WSC_NLMSG_HDR_LEN)
+
+
+#define WSC_U2KMSG_HDR_LEN 41
+typedef struct GNU_PACKED _RTMP_WSC_U2KMSG_HDR{
+ UINT envID; /*Event ID. */
+ UCHAR Addr1[MAC_ADDR_LEN]; /*RA, should be the MAC address of the AP. */
+ UCHAR Addr2[MAC_ADDR_LEN]; /*TA, should be the ipAddress of remote UPnP Device/CotrnolPoint. */
+ UCHAR Addr3[MAC_ADDR_LEN]; /*DA, Not used now. */
+ UCHAR rsvWLHdr[2]; /*Reserved space for remained 802.11 hdr content. */
+ UCHAR rsv1HHdr[LENGTH_802_1_H];/*Reserved space for 802.1h header */
+ IEEE8021X_FRAME IEEE8021XHdr; /*802.1X header */
+ EAP_FRAME EAPHdr; /*EAP frame header. */
+}RTMP_WSC_U2KMSG_HDR;
+/*--- Used for UPnP module to communicate msg. */
+
+/* define OpMode for WscSendMessage */
+#undef AP_MODE
+#undef AP_CLIENT_MODE
+#undef STA_MODE
+
+#define AP_MODE 0x00
+#define AP_CLIENT_MODE 0x01
+#define STA_MODE 0x02
+#define REGISTRAR_ACTION 0x40
+#define ENROLLEE_ACTION 0x80
+
+/* Definition for Config Methods */
+#define WPS_CONFIG_METHODS_USBA 0x0001
+#define WPS_CONFIG_METHODS_ETHERNET 0x0002
+#define WPS_CONFIG_METHODS_LABEL 0x0004
+#define WPS_CONFIG_METHODS_DISPLAY 0x0008
+#define WPS_CONFIG_METHODS_ENT 0x0010 /* External NFC Token */
+#define WPS_CONFIG_METHODS_INT 0x0020 /* Integrated NFC Token */
+#define WPS_CONFIG_METHODS_NFCI 0x0040 /* NFC Interface */
+#define WPS_CONFIG_METHODS_PBC 0x0080
+#define WPS_CONFIG_METHODS_KEYPAD 0x0100
+
+typedef struct _UUID_BSSID_CH_INFO {
+ UCHAR Uuid[16];
+ UCHAR Bssid[MAC_ADDR_LEN];
+ UCHAR Channel;
+ UCHAR Band;
+ UCHAR Ssid[MAX_LEN_OF_SSID];
+ UCHAR SsidLen;
+ UCHAR MacAddr[MAC_ADDR_LEN];
+} UUID_BSSID_CH_INFO, *PUUID_BSSID_CH_INFO;
+
+/*
+ Preferred WPS AP type.
+
+ a) PREFERRED_WPS_AP_PHY_TYPE_2DOT4_G_FIRST
+ Select 2.4G WPS AP first. Otherwise select 5G WPS AP.
+ b) PREFERRED_WPS_AP_PHY_TYPE_5_G_FIRST
+ Select the 5G WPS AP first. Otherwise select the 2.4G WPS AP.
+ c) PREFERRED_WPS_AP_PHY_TYPE_AUTO_SELECTION
+ Automactically select WPS AP.
+*/
+typedef enum _PREFERRED_WPS_AP_PHY_TYPE
+{
+ PREFERRED_WPS_AP_PHY_TYPE_2DOT4_G_FIRST = 0,
+ PREFERRED_WPS_AP_PHY_TYPE_5_G_FIRST,
+ PREFERRED_WPS_AP_PHY_TYPE_AUTO_SELECTION,
+ PREFERRED_WPS_AP_PHY_TYPE_MAXIMUM,
+} PREFERRED_WPS_AP_PHY_TYPE;
+
+typedef enum _WscSecurityMode{
+ WPA2PSKAES,
+ WPA2PSKTKIP,
+ WPAPSKAES,
+ WPAPSKTKIP,
+}WSC_SECURITY_MODE;
+
+typedef struct _WSC_PEER_ENTRY {
+ struct _WSC_PEER_ENTRY *pNext;
+ ULONG receive_time;
+ UCHAR mac_addr[MAC_ADDR_LEN];
+} WSC_PEER_ENTRY, *PWSC_PEER_ENTRY;
+
+
+#endif /* WSC_INCLUDED */
+
+#endif /* __WSC_H__ */
+
diff --git a/cleopatre/devkit/mt7601udrv/include/wsc_tlv.h b/cleopatre/devkit/mt7601udrv/include/wsc_tlv.h
new file mode 100644
index 0000000000..43eb906642
--- /dev/null
+++ b/cleopatre/devkit/mt7601udrv/include/wsc_tlv.h
@@ -0,0 +1,280 @@
+/*
+ ***************************************************************************
+ * Ralink Tech Inc.
+ * 4F, No. 2 Technology 5th Rd.
+ * Science-based Industrial Park
+ * Hsin-chu, Taiwan, R.O.C.
+ *
+ * (c) Copyright 2002-2006, Ralink Technology, Inc.
+ *
+ * All rights reserved. Ralink's source code is an unpublished work and the
+ * use of a copyright notice does not imply otherwise. This source code
+ * contains confidential trade secret material of Ralink Tech. Any attemp
+ * or participation in deciphering, decoding, reverse engineering or in any
+ * way altering the source code is stricitly prohibited, unless the prior
+ * written consent of Ralink Technology, Inc. is obtained.
+ ***************************************************************************
+
+ Module Name:
+ wsc_tlv.h
+
+ Abstract:
+
+ Revision History:
+ Who When What
+ -------- ---------- ----------------------------------------------
+ Name Date Modification logs
+ JuemingChen 06-09-11 Initial
+*/
+
+#ifndef __WSC_TLV_H__
+#define __WSC_TLV_H__
+
+/* Data Element Definitions */
+#define WSC_ID_AP_CHANNEL 0x1001
+#define WSC_ID_ASSOC_STATE 0x1002
+#define WSC_ID_AUTH_TYPE 0x1003
+#define WSC_ID_AUTH_TYPE_FLAGS 0x1004
+#define WSC_ID_AUTHENTICATOR 0x1005
+#define WSC_ID_CONFIG_METHODS 0x1008
+#define WSC_ID_CONFIG_ERROR 0x1009
+#define WSC_ID_CONF_URL4 0x100A
+#define WSC_ID_CONF_URL6 0x100B
+#define WSC_ID_CONN_TYPE 0x100C
+#define WSC_ID_CONN_TYPE_FLAGS 0x100D
+#define WSC_ID_CREDENTIAL 0x100E
+#define WSC_ID_ENCR_TYPE 0x100F
+#define WSC_ID_ENCR_TYPE_FLAGS 0x1010
+#define WSC_ID_DEVICE_NAME 0x1011
+#define WSC_ID_DEVICE_PWD_ID 0x1012
+#define WSC_ID_E_HASH1 0x1014
+#define WSC_ID_E_HASH2 0x1015
+#define WSC_ID_E_SNONCE1 0x1016
+#define WSC_ID_E_SNONCE2 0x1017
+#define WSC_ID_ENCR_SETTINGS 0x1018
+#define WSC_ID_ENROLLEE_NONCE 0x101A
+#define WSC_ID_FEATURE_ID 0x101B
+#define WSC_ID_IDENTITY 0x101C
+#define WSC_ID_IDENTITY_PROOF 0x101D
+#define WSC_ID_KEY_WRAP_AUTH 0x101E
+#define WSC_ID_KEY_IDENTIFIER 0x101F
+#define WSC_ID_MAC_ADDR 0x1020
+#define WSC_ID_MANUFACTURER 0x1021
+#define WSC_ID_MSG_TYPE 0x1022
+#define WSC_ID_MODEL_NAME 0x1023
+#define WSC_ID_MODEL_NUMBER 0x1024
+#define WSC_ID_NW_INDEX 0x1026
+#define WSC_ID_NW_KEY 0x1027
+#define WSC_ID_NW_KEY_INDEX 0x1028
+#define WSC_ID_NEW_DEVICE_NAME 0x1029
+#define WSC_ID_NEW_PWD 0x102A
+#define WSC_ID_OOB_DEV_PWD 0x102C
+#define WSC_ID_OS_VERSION 0x102D
+#define WSC_ID_POWER_LEVEL 0x102F
+#define WSC_ID_PSK_CURRENT 0x1030
+#define WSC_ID_PSK_MAX 0x1031
+#define WSC_ID_PUBLIC_KEY 0x1032
+#define WSC_ID_RADIO_ENABLED 0x1033
+#define WSC_ID_REBOOT 0x1034
+#define WSC_ID_REGISTRAR_CURRENT 0x1035
+#define WSC_ID_REGISTRAR_ESTBLSHD 0x1036
+#define WSC_ID_REGISTRAR_LIST 0x1037
+#define WSC_ID_REGISTRAR_MAX 0x1038
+#define WSC_ID_REGISTRAR_NONCE 0x1039
+#define WSC_ID_REQ_TYPE 0x103A
+#define WSC_ID_RESP_TYPE 0x103B
+#define WSC_ID_RF_BAND 0x103C
+#define WSC_ID_R_HASH1 0x103D
+#define WSC_ID_R_HASH2 0x103E
+#define WSC_ID_R_SNONCE1 0x103F
+#define WSC_ID_R_SNONCE2 0x1040
+#define WSC_ID_SEL_REGISTRAR 0x1041
+#define WSC_ID_SERIAL_NUM 0x1042
+#define WSC_ID_SC_STATE 0x1044
+#define WSC_ID_SSID 0x1045
+#define WSC_ID_TOT_NETWORKS 0x1046
+#define WSC_ID_UUID_E 0x1047
+#define WSC_ID_UUID_R 0x1048
+#define WSC_ID_VENDOR_EXT 0x1049
+#define WSC_ID_VERSION 0x104A
+#define WSC_ID_X509_CERT_REQ 0x104B
+#define WSC_ID_X509_CERT 0x104C
+#define WSC_ID_EAP_IDENTITY 0x104D
+#define WSC_ID_MSG_COUNTER 0x104E
+#define WSC_ID_PUBKEY_HASH 0x104F
+#define WSC_ID_REKEY_KEY 0x1050
+#define WSC_ID_KEY_LIFETIME 0x1051
+#define WSC_ID_PERM_CFG_METHODS 0x1052
+#define WSC_ID_SEL_REG_CFG_METHODS 0x1053
+#define WSC_ID_PRIM_DEV_TYPE 0x1054
+#define WSC_ID_SEC_DEV_TYPE_LIST 0x1055
+#define WSC_ID_PORTABLE_DEVICE 0x1056
+#define WSC_ID_AP_SETUP_LOCKED 0x1057
+#define WSC_ID_APP_LIST 0x1058
+#define WSC_ID_EAP_TYPE 0x1059
+#define WSC_ID_INIT_VECTOR 0x1060
+#define WSC_ID_KEY_PROVIDED_AUTO 0x1061
+#define WSC_ID_8021X_ENABLED 0x1062
+#define WSC_ID_APPSESSIONKEY 0x1063
+#define WSC_ID_WEPTRANSMITKEY 0x1064
+
+/* WFA Vendor Extension Subelements */
+#define WFA_EXT_ID_VERSION2 0x00
+#define WFA_EXT_ID_AUTHORIZEDMACS 0x01
+#define WFA_EXT_ID_NW_KEY_SHAREABLE 0x02
+#define WFA_EXT_ID_REQ_TO_ENROLL 0x03
+#define WFA_EXT_ID_SETTINGS_DELAY_TIME 0x04
+
+/* Association states */
+#define WSC_ASSOC_NOT_ASSOCIATED 0
+#define WSC_ASSOC_CONN_SUCCESS 1
+#define WSC_ASSOC_CONFIG_FAIL 2
+#define WSC_ASSOC_ASSOC_FAIL 3
+#define WSC_ASSOC_IP_FAIL 4
+
+/* Authentication types */
+#define WSC_AUTHTYPE_OPEN 0x0001
+#define WSC_AUTHTYPE_WPAPSK 0x0002
+#define WSC_AUTHTYPE_SHARED 0x0004
+#define WSC_AUTHTYPE_WPA 0x0008
+#define WSC_AUTHTYPE_WPA2 0x0010
+#define WSC_AUTHTYPE_WPA2PSK 0x0020
+#define WSC_AUTHTYPE_WPANONE 0x0080
+
+/* Config methods */
+#define WSC_CONFMET_USBA 0x0001
+#define WSC_CONFMET_ETHERNET 0x0002
+#define WSC_CONFMET_LABEL 0x0004
+#define WSC_CONFMET_DISPLAY 0x0008
+#define WSC_CONFMET_EXT_NFC_TOK 0x0010
+#define WSC_CONFMET_INT_NFC_TOK 0x0020
+#define WSC_CONFMET_NFC_INTF 0x0040
+#define WSC_CONFMET_PBC 0x0080
+#define WSC_CONFMET_KEYPAD 0x0100
+
+/* WSC error messages */
+#define WSC_ERROR_NO_ERROR 0
+#define WSC_ERROR_OOB_INT_READ_ERR 1
+#define WSC_ERROR_DECRYPT_CRC_FAIL 2
+#define WSC_ERROR_CHAN24_NOT_SUPP 3
+#define WSC_ERROR_CHAN50_NOT_SUPP 4
+#define WSC_ERROR_SIGNAL_WEAK 5
+#define WSC_ERROR_NW_AUTH_FAIL 6
+#define WSC_ERROR_NW_ASSOC_FAIL 7
+#define WSC_ERROR_NO_DHCP_RESP 8
+#define WSC_ERROR_FAILED_DHCP_CONF 9
+#define WSC_ERROR_IP_ADDR_CONFLICT 10
+#define WSC_ERROR_FAIL_CONN_REGISTRAR 11
+#define WSC_ERROR_MULTI_PBC_DETECTED 12
+#define WSC_ERROR_ROGUE_SUSPECTED 13
+#define WSC_ERROR_DEVICE_BUSY 14
+#define WSC_ERROR_SETUP_LOCKED 15
+#define WSC_ERROR_MSG_TIMEOUT 16
+#define WSC_ERROR_REG_SESSION_TIMEOUT 17
+#define WSC_ERROR_DEV_PWD_AUTH_FAIL 18
+#define WSC_ERROR_DO_MULTI_PBC_DETECTION 251
+#define WSC_ERROR_CAN_NOT_ALLOCMEM 252
+#define WSC_ERROR_WANTING_FIELD 253
+#define WSC_ERROR_HASH_FAIL 254
+#define WSC_ERROR_HMAC_FAIL 255
+
+/* Connection types */
+#define WSC_CONNTYPE_ESS 0x01
+#define WSC_CONNTYPE_IBSS 0x02
+
+/* Device password ID */
+#define WSC_DEVICEPWDID_DEFAULT 0x0000
+#define WSC_DEVICEPWDID_USER_SPEC 0x0001
+#define WSC_DEVICEPWDID_MACHINE_SPEC 0x0002
+#define WSC_DEVICEPWDID_REKEY 0x0003
+#define WSC_DEVICEPWDID_PUSH_BTN 0x0004
+#define WSC_DEVICEPWDID_REG_SPEC 0x0005
+
+/* Device type */
+#define WSC_DEVICETYPE_COMPUTER "Computer"
+#define WSC_DEVICETYPE_AP "Access_Point"
+#define WSC_DEVICETYPE_ROUTER_AP "Router_AP"
+#define WSC_DEVICETYPE_PRINTER "Printer"
+#define WSC_DEVICETYPE_PRINTER_BRIDGE "Printer_Brigde"
+#define WSC_DEVICETYPE_ELECT_PIC_FRAME "Electronic_Picture_Frame"
+#define WSC_DEVICETYPE_DIG_AUDIO_RECV "Digital_Audio_Receiver"
+#define WSC_DEVICETYPE_WIN_MCE "Windows_Media_Center_Extender"
+#define WSC_DEVICETYPE_WIN_MOBILE "Windows_Mobile"
+#define WSC_DEVICETYPE_PVR "Personal_Video_Recorder"
+#define WSC_DEVICETYPE_VIDEO_STB "Video_STB"
+#define WSC_DEVICETYPE_PROJECTOR "Projector"
+#define WSC_DEVICETYPE_IP_TV "IP_TV"
+#define WSC_DEVICETYPE_DIG_STILL_CAM "Digital_Still_Camera"
+#define WSC_DEVICETYPE_PHONE "Phone"
+#define WSC_DEVICETYPE_VOID_PHONE "VoIP_Phone"
+#define WSC_DEVICETYPE_GAME_CONSOLE "Game_console"
+#define WSC_DEVICETYPE_OTHER "Other"
+
+/* Encryption type */
+#define WSC_ENCRTYPE_NONE 0x0001
+#define WSC_ENCRTYPE_WEP 0x0002
+#define WSC_ENCRTYPE_TKIP 0x0004
+#define WSC_ENCRTYPE_AES 0x0008
+
+/* WSC Message Types */
+#define WSC_ID_BEACON 0x01
+#define WSC_ID_PROBE_REQ 0x02
+#define WSC_ID_PROBE_RESP 0x03
+#define WSC_ID_MESSAGE_M1 0x04
+#define WSC_ID_MESSAGE_M2 0x05
+#define WSC_ID_MESSAGE_M2D 0x06
+#define WSC_ID_MESSAGE_M3 0x07
+#define WSC_ID_MESSAGE_M4 0x08
+#define WSC_ID_MESSAGE_M5 0x09
+#define WSC_ID_MESSAGE_M6 0x0A
+#define WSC_ID_MESSAGE_M7 0x0B
+#define WSC_ID_MESSAGE_M8 0x0C
+#define WSC_ID_MESSAGE_ACK 0x0D
+#define WSC_ID_MESSAGE_NACK 0x0E
+#define WSC_ID_MESSAGE_DONE 0x0F
+#define WSC_ID_MESSAGE_EAP_REQ_ID 0x21
+#define WSC_ID_MESSAGE_EAP_REQ_START 0x22
+#define WSC_ID_MESSAGE_EAP_FAIL 0x23
+#define WSC_ID_MESSAGE_UNKNOWN 0xFF
+
+/* Device Type categories for primary and secondary device types */
+#define WSC_DEVICE_TYPE_CAT_COMPUTER 1
+#define WSC_DEVICE_TYPE_CAT_INPUT_DEVICE 2
+#define WSC_DEVICE_TYPE_CAT_PRINTER 3
+#define WSC_DEVICE_TYPE_CAT_CAMERA 4
+#define WSC_DEVICE_TYPE_CAT_STORAGE 5
+#define WSC_DEVICE_TYPE_CAT_NW_INFRA 6
+#define WSC_DEVICE_TYPE_CAT_DISPLAYS 7
+#define WSC_DEVICE_TYPE_CAT_MM_DEVICES 8
+#define WSC_DEVICE_TYPE_CAT_GAME_DEVICES 9
+#define WSC_DEVICE_TYPE_CAT_TELEPHONE 10
+
+/* Device Type sub categories for primary and secondary device types */
+#define WSC_DEVICE_TYPE_SUB_CAT_COMP_PC 1
+#define WSC_DEVICE_TYPE_SUB_CAT_COMP_SERVER 2
+#define WSC_DEVICE_TYPE_SUB_CAT_COMP_MEDIA_CTR 3
+#define WSC_DEVICE_TYPE_SUB_CAT_PRTR_PRINTER 1
+#define WSC_DEVICE_TYPE_SUB_CAT_PRTR_SCANNER 2
+#define WSC_DEVICE_TYPE_SUB_CAT_CAM_DGTL_STILL 1
+#define WSC_DEVICE_TYPE_SUB_CAT_STOR_NAS 1
+#define WSC_DEVICE_TYPE_SUB_CAT_NW_AP 1
+#define WSC_DEVICE_TYPE_SUB_CAT_NW_ROUTER 2
+#define WSC_DEVICE_TYPE_SUB_CAT_NW_SWITCH 3
+#define WSC_DEVICE_TYPE_SUB_CAT_DISP_TV 1
+#define WSC_DEVICE_TYPE_SUB_CAT_DISP_PIC_FRAME 2
+#define WSC_DEVICE_TYPE_SUB_CAT_DISP_PROJECTOR 3
+#define WSC_DEVICE_TYPE_SUB_CAT_MM_DAR 1
+#define WSC_DEVICE_TYPE_SUB_CAT_MM_PVR 2
+#define WSC_DEVICE_TYPE_SUB_CAT_MM_MCX 3
+#define WSC_DEVICE_TYPE_SUB_CAT_GAM_XBOX 1
+#define WSC_DEVICE_TYPE_SUB_CAT_GAM_XBOX_360 2
+#define WSC_DEVICE_TYPE_SUB_CAT_GAM_PS 3
+#define WSC_DEVICE_TYPE_SUB_CAT_PHONE_WM 1
+
+typedef struct _WSC_TLV_0B {
+ /*USHORT tag;*/
+ USHORT len;
+} WSC_TLV_0B, *PWSC_TLV_0B;
+
+#endif /* __WSC_TLV_H__ */
+